Numerical Methods for Engineers
Numerical Methods for Engineers
7th Edition
ISBN: 9780073397924
Author: Steven C. Chapra Dr., Raymond P. Canale
Publisher: McGraw-Hill Education
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 23, Problem 8P

Compute the first-order central difference approximations of O ( h 4 ) for each of the following functions at the specified location and for the specified step size:

(a) y = x 3 + 4 x 15 at x = 0 , h = 0.25

(b) y = x 2 cos x at x = 0.4 , h = 0.1

(c) y = tan ( x / 3 ) at x = 3 , h = 0.5

(d) y = sin ( 0.5 x ) / x at x = 1 , h = 0.2

(e) y = e x + x at x = 2 , h = 0.2

Compare your results with the analytical solutions.

(a)

Expert Solution
Check Mark
To determine

To calculate: The first order central difference approximations of O(h4) for y=x3+4x15 at x=0, where step size is h=0.25 also compare the result with the analytic solution.

Answer to Problem 8P

Solution:

Analytic value of the first derivative is 4 and numeric value is 4

Explanation of Solution

Given information:

The function, y=x3+4x15

The value of x, x=0

Step size h=0.25

Formula used:

Central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Here, h is step size and xi+1=xi+h

Calculation:

Consider the function,

f(x)=x3+4x15

Differentiate the function with respect to x,

f(x)=3x2+4

Now substitute x=0 in the above equation,

f(0)=3(0)2+4=4

Thus, the analytic value of the first derivative of the function is 4.

Again, consider the function,

f(x)=x3+4x15

Here, xi=0 and h=0.25

The value of xi+1 is,

xi+1=xi+h=0+0.25=0.25

The value of the function at xi+1=0.25 is,

f(0.25)=(0.25)3+4(0.25)15=13.984375

The value of xi+2 is,

xi+2=xi+1+h=0.25+0.25=0.5

The value of the function at xi+2=0.5 is,

f(0.5)=(0.5)3+4(0.5)15=12.875

The value of xi1 is,

xi1=xih=00.25=0.25

The value of the function at xi1=0.25 is,

f(0.25)=(0.25)3+4(0.25)15=16.015625

The value of xi2 is,

xi2=xi1h=0.250.25=0.5

The value of the function at xi2=0.5 is,

f(0.5)=(0.5)3+4(0.5)15=17.125

Now, central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Substitute the values of f(xi+2),f(xi+1),f(xi1),f(xi2),xi=0 and h=0.25 in the above formula,

f'(0)=(12.875)+8(13.984375)8(16.015625)+(17.125)12(0.25)=123=4

Therefore, the analytic value of the first derivative at x=0 is 4 and numerical value is also 4.

(b)

Expert Solution
Check Mark
To determine

To calculate: The first order central difference approximations of O(h4) for y=x2cosx at x=0.4, where step size is h=0.1 also compare the result with the analytic solution.

Answer to Problem 8P

Solution:

Analytic value of the first derivative is 0.674542 and numeric value is 0.674504

Explanation of Solution

Given information:

The function, y=x2cosx

The value of x, x=0.4

Step size h=0.1

Formula used:

Central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Here, h is step size and xi+1=xi+h

Calculation:

Consider the function,

f(x)=x2cosx

Differentiate the function with respect to x,

f(x)=2xcosxx2sinx

Now substitute x=0.4 in the above equation,

f(0.4)=2(0.4)cos(0.4)(0.4)2sin(0.4)=0.674542

Thus, the analytic value of the first derivative of the function is 4.

Again, consider the function,

f(x)=x2cosx

Here, xi=0.4 and h=0.1

The value of xi+1 is,

xi+1=xi+h=0.4+0.1=0.5

The value of the function at xi+1=0.5 is,

f(0.5)=(0.5)2cos(0.5)=0.219396

The value of xi+2 is,

xi+2=xi+1+h=0.5+0.1=0.6

The value of the function at xi+2=0.6 is,

f(0.6)=(0.6)2cos(0.6)=0.297121

The value of xi1 is,

xi1=xih=0.40.1=0.3

The value of the function at xi1=0.3 is,

f(0.3)=(0.3)2cos(0.3)=0.0859803

The value of xi2 is,

xi2=xi1h=0.30.1=0.2

The value of the function at xi2=0.2 is,

f(0.2)=(0.2)2cos(0.2)=0.0392027

Now, central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Substitute the values of f(xi+2),f(xi+1),f(xi1),f(xi2),xi=0.4 and h=0.1 in the above formula,

f'(0.4)=(0.297121)+8(0.219396)8(0.0859803)+(0.0392027)12(0.1)=0.809407301.2=0.674504

Therefore, the analytic value of the first derivative at x=0.4 is 0.674542 and numerical value is 0.674504.

(c)

Expert Solution
Check Mark
To determine

To calculate: The first order central difference approximations of O(h4) for y=tan(x3) at x=3, where step size is h=0.5 also compare the result with the analytic solution.

Answer to Problem 8P

Solution:

Analytic value of the first derivative is 1.14184 and numeric value is 1.092486

Explanation of Solution

Given information:

The function, y=tan(x3)

The value of x, x=3

Step size h=0.5

Formula used:

Central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Here, h is step size and xi+1=xi+h

Calculation:

Consider the function,

f(x)=tan(x3)

Differentiate the function with respect to x,

f(x)=(13)sec2(x3)

Now substitute x=3 in the above equation,

f(3)=(13)sec2(33)=1.14184

Thus, the analytic value of the first derivative of the function is 1.14184.

Again, consider the function,

f(x)=tan(x3)

Here, xi=3 and h=0.5

The value of xi+1 is,

xi+1=xi+h=3+0.5=3.5

The value of the function at xi+1=3.5 is,

f(3.5)=tan(3.53)=2.33825

The value of xi+2 is,

xi+2=xi+1+h=3.5+0.5=4

The value of the function at xi+2=4 is,

f(4)=tan(43)=4.131729

The value of xi1 is,

xi1=xih=30.5=2.5

The value of the function at xi1=2.5 is,

f(2.5)=tan(2.53)=1.100778

The value of xi2 is,

xi2=xi1h=2.50.5=2

The value of the function at xi2=2 is,

f(2)=tan(23)=0.786843

Now, central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Substitute the values of f(xi+2),f(xi+1),f(xi1),f(xi2),xi=3 and h=0.5 in the above formula,

f'(3)=(4.131729)+8(2.338254)8(1.100778)+0.78684312(0.5)=6.5549226=1.092486

Therefore, the analytic value of the first derivative at x=3 is 1.14184 and numerical value is 1.092486.

(d)

Expert Solution
Check Mark
To determine

To calculate: The first order central difference approximations of O(h4) for y=sin(0.5x)x at x=1, where step size is h=0.2 also compare the result with the analytic solution.

Answer to Problem 8P

Solution:

Analytic value of the first derivative is 0.26003 and numeric value is 0.25908

Explanation of Solution

Given information:

The function, y=sin(0.5x)x

The value of x, x=1

Step size h=0.2

Formula used:

Central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Here, h is step size and xi+1=xi+h

Calculation:

Consider the function,

f(x)=sin(0.5x)x

Differentiate the function with respect to x,

f(x)=0.25cos(0.5x)x32sin(0.5x)x2

Now substitute x=1 in the above equation,

f(1)=0.25cos(0.51)(1)32sin(0.51)(1)2=0.26003

Thus, the analytic value of the first derivative of the function is 0.26003.

Again, consider the function,

f(x)=sin(0.5x)x

Here, xi=1 and h=0.2

The value of xi+1 is,

xi+1=xi+h=1+0.2=1.2

The value of the function at xi+1=1.2 is,

f(1.2)=sin(0.51.2)1.2=0.433954

The value of xi+2 is,

xi+2=xi+1+h=1.2+0.2=1.4

The value of the function at xi+2=1.4 is,

f(1.4)=sin(0.51.4)1.4=0.398355

The value of xi1 is,

xi1=xih=10.2=0.8

The value of the function at xi1=0.8 is,

f(0.8)=sin(0.50.8)0.8=0.540569

The value of xi2 is,

xi2=xi1h=0.80.2=0.6

The value of the function at xi2=0.6 is,

f(0.6)=sin(0.50.6)0.6=0.629480

Now, central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Substitute the values of f(xi+2),f(xi+1),f(xi1),f(xi2),xi=3 and h=0.5 in the above formula,

f'(xi)=(0.398355)+8(0.433954)8(0.540569)+0.62948012(0.2)=0.6217952.4=0.25908

Therefore, the analytic value of the first derivative at x=1 is 0.26003 and numerical value is 0.25908.

(e)

Expert Solution
Check Mark
To determine

To calculate: The first order central difference approximations of O(h4) for y=ex+x at x=2, where step size is h=0.2 also compare the result with the analytic solution.

Answer to Problem 8P

Solution:

Analytic value of the first derivative is 8.389056 and numeric value is 8.38866

Explanation of Solution

Given information:

The function, y=ex+x

The value of x, x=2

Step size h=0.2

Formula used:

Central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Here, h is step size and xi+1=xi+h

Calculation:

Consider the function,

f(x)=ex+x

Differentiate the function with respect to x,

f(x)=ex+1

Now substitute x=2 in the above equation,

f(2)=e(2)+1=8.389056

Thus, the analytic value of the first derivative of the function is 8.389056.

Again, consider the function,

f(x)=ex+x

Here, xi=2 and h=0.2

The value of xi+1 is,

xi+1=xi+h=2+0.2=2.2

The value of the function at xi+1=2.2 is,

f(2.2)=e(2.2)+(2.2)=11.2250

The value of xi+2 is,

xi+2=xi+1+h=2.2+0.2=2.4

The value of the function at xi+2=2.4 is,

f(2.4)=e(2.4)+(2.4)=13.4232

The value of xi1 is,

xi1=xih=20.2=1.8

The value of the function at xi1=1.8 is,

f(1.8)=e(1.8)+(1.8)=7.84965

The value of xi2 is,

xi2=xi1h=1.80.2=1.6

The value of the function at xi2=1.6 is,

f(1.6)=e(1.6)+(1.6)=6.55303

Now, central difference approximation of O(h4) for first derivative is given by,

f'(xi)=f(xi+2)+8f(xi+1)8f(xi1)+f(xi2)12h

Substitute the values of f(xi+2),f(xi+1),f(xi1),f(xi2),xi=3 and h=0.5 in the above formula,

f'(xi)=13.4232+8(11.2250)8(7.84965)+6.5530312(0.2)=20.132632.4=8.38866

Therefore, the analytic value of the first derivative at x=2 is 8.389056 and numerical value is 8.38866.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
2. In a computer network some pairs of computers are connected by network cables. Your goal is to set up the computers so that messages can be sent quickly from any computer to any other computer. For this you have identified each of the n com- puters uniquely with a number between 1 and n, and have decided that a message should consist of two such numbers, identifying the sender and the recipient, fol- lowed by the content of the message. As cables are relatively short, you can assume that sending a message across a single cable takes an amount of time that is the same irrespective of the length of the cable. You can further assume that at most one message travels between computer at any point, so that you don't have to worry about inference among messages. (a) Define a graph or network that models the computer network and allows you to answer the remaining parts of this question. (b) Consider two computers, a sender and a recipient. Using the graph or network you have defined,…
3. A spreadsheet consists of cells indexed by a row and a column. Each cell contains either a value or a formula that depends on the values of other cells. (a) Describe a graph, digraph, or network that models an arbitrary spreadsheet and allows you to answer the remaining parts of this question. (b) Explain, by referring to the graph, digraph, or network, when it is possible to change the value of cell x without changing the value of cell y. (c) Explain, by referring to the graph, digraph, or network, when it is possible to calculate the values of all cells in the spreadsheet. Consider the following spreadsheet with 5 rows, 7 columns, and 35 cells. For exam- ple, cell el contains a value, whereas cell al contains a formula that depends on the values cells el and 95. a b с 1 el+g5 al-c5 110 d al+cl 180 e f g f5-el c1+c2 2 al+b1 a2+c4 240 a2+c2 120 f5-e2 e3+e5 3 a2+b2 a3-c3 100 a3+c1 200 f5-e3 f1+f2 4 a3+b3 a4+c2 220 a4+c2 100 f5-e4 f3+f4 5 a4+b4 a5-c1 130 a5+c5 120 g3+g4 g1+g2 (d) Can…
1. Let W, U, and S be graphs defined as follows: • V(W) is the set of countries in the world; • V(U) is the set of countries in the European Union; V(S) is the set of countries in the Schengen Area; ● for X = {W,U,S}, E(X) is the set of pairs of countries in V(X) that share a land border. Recall that land borders between countries in the Schengen Area are special in that they can be crossed without a passport. (a) The notions of a country and a land border are somewhat ambiguous. Explain the notions you will use to get a precise definition of the graphs W, U, and S. (b) Is S a subgraph of U? Is U an induced subgraph of W? Justify your answers. (c) Using non-mathematical language, explain what it means for a country x if VEV(S) and dw (v) = 0. Give all such countries. Let A = {v Є V(W) \V(S) such that |Nw(v)| > 0 and Nw (v) ≤ V(S)}. (d) Using non-mathematical language, explain what the set A represents in terms of countries and land borders. Give a specific element of A or explain why A…

Chapter 23 Solutions

Numerical Methods for Engineers

Knowledge Booster
Background pattern image
Advanced Math
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Advanced Engineering Mathematics
Advanced Math
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Wiley, John & Sons, Incorporated
Text book image
Numerical Methods for Engineers
Advanced Math
ISBN:9780073397924
Author:Steven C. Chapra Dr., Raymond P. Canale
Publisher:McGraw-Hill Education
Text book image
Introductory Mathematics for Engineering Applicat...
Advanced Math
ISBN:9781118141809
Author:Nathan Klingbeil
Publisher:WILEY
Text book image
Mathematics For Machine Technology
Advanced Math
ISBN:9781337798310
Author:Peterson, John.
Publisher:Cengage Learning,
Text book image
Basic Technical Mathematics
Advanced Math
ISBN:9780134437705
Author:Washington
Publisher:PEARSON
Text book image
Topology
Advanced Math
ISBN:9780134689517
Author:Munkres, James R.
Publisher:Pearson,
01 - What Is A Differential Equation in Calculus? Learn to Solve Ordinary Differential Equations.; Author: Math and Science;https://www.youtube.com/watch?v=K80YEHQpx9g;License: Standard YouTube License, CC-BY
Higher Order Differential Equation with constant coefficient (GATE) (Part 1) l GATE 2018; Author: GATE Lectures by Dishank;https://www.youtube.com/watch?v=ODxP7BbqAjA;License: Standard YouTube License, CC-BY
Solution of Differential Equations and Initial Value Problems; Author: Jefril Amboy;https://www.youtube.com/watch?v=Q68sk7XS-dc;License: Standard YouTube License, CC-BY