EBK NUMERICAL METHODS FOR ENGINEERS
EBK NUMERICAL METHODS FOR ENGINEERS
7th Edition
ISBN: 9780100254145
Author: Chapra
Publisher: YUZU
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
3. Using the trial function u¹(x) = a sin(x) and weighting function w¹(x) = b sin(x) find an approximate solution to the following boundary value problems by determining the value of coefficient a. For each one, also find the exact solution using Matlab and plot the exact and approximate solutions. (One point each for: (i) finding a, (ii) finding the exact solution, and (iii) plotting the solution) a. (U₁xx -2 = 0 u(0) = 0 u(1) = 0 b. Modify the trial function and find an approximation for the following boundary value problem. (Hint: you will need to add an extra term to the function to make it satisfy the boundary conditions.) (U₁xx-2 = 0 u(0) = 1 u(1) = 0
Determine if the system is consistent or inconsistent. Justify your answer and find all solutions to the system of linear equations. Justification should be written on your solution paper. Transform the matrix into ROW ECHELON FORM (REF) using row operations. 2x +8y+ 6z = 20 4x+2y-2z =-2 3x-y+z = 11 Enter final answer: (x, y, z) =(
Solve the initial value problem. y" + 4y' + 20y = 0: y(0) = 2 y (0) = - 3 %3D Chapter 6, Section 6.2, Go Tutorial Problem 12 Find Y(s). 2s + 5 Y(s): s2 + 4s + 20 2s + 5 Y(s) = s2 + 4s + 20 2s – 5 Y(s) : + 4s + 20 2 + 4s + 20 Y(s) 2s + 5

Chapter 23 Solutions

EBK NUMERICAL METHODS FOR ENGINEERS

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Principles of Heat Transfer (Activate Learning wi...
Mechanical Engineering
ISBN:9781305387102
Author:Kreith, Frank; Manglik, Raj M.
Publisher:Cengage Learning
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