EBK NUMERICAL METHODS FOR ENGINEERS
EBK NUMERICAL METHODS FOR ENGINEERS
7th Edition
ISBN: 9780100254145
Author: Chapra
Publisher: YUZU
bartleby

Videos

Textbook Question
Book Icon
Chapter 6, Problem 7P

Locate the first positive root of

f ( x ) = sin x + cos ( 1 + x 2 ) 1

Where x is in radians. Use four iterations of the secant method with initial guesses of (a) x i 1 = 1.0  and x i = 3.0 : (b) x i 1 = 1.5  and  x i = 2.5  and  (c) x i 1 =  1 .5 and  x i = 2.25 to locate the root. (d) Use the graphical method to explain your results.

(a)

Expert Solution
Check Mark
To determine

To calculate: Thefirst positive root of the function f(x)=sinx+cos(1+x2)1 by the use of secant method with the initial guess of xi1=1.0 and xi=3.0 up to fourth iteration.

Answer to Problem 7P

Solution:

The first positive root of the function f(x)=sinx+cos(1+x2)1 is 0.39633.

Explanation of Solution

Given Information:

The function, f(x)=sinx+cos(1+x2)1. And, the initial guessesare xi1=1.0 and xi=3.0.

Formula used:

The iterative equation of secant method is,

xi+1=xif(xi)(xi1xi)f(xi1)f(xi)

And, formula for approximate error is,

εa=|xi+1xixi+1|100%

Calculation:

Consider the function,

f(x)=sinx+cos(1+x2)1

For i=0, the initial guess is x1=1.0 and x0=3.0, thus the first iteration is,

x0+1=x0f(x0)(x01x0)f(x01)f(x0)x1=3[{sin(3)+cos(1+(3)2)1}(13)][{sin(1)+cos(1+(1)2)1}{sin(3)+cos(1+(3)2)1}]=3[{1.69795}(2)][{0.57468}{1.69795}]=0.02323

Therefore, the approximate error is,

εa=|0.0232330.02323|×100%=|3.023230.02323|×100%=13014.33%

Use x1=0.02323 and x0=3.0, the second iteration is,

x1+1=x1f(x1)(x11x1)f(x11)f(x1)x2=0.02323[{sin(0.02323)+cos(1+(0.02323)2)1}(3+0.02323)][{sin(3)+cos(1+(3)2)1}{sin(0.02323)+cos(1+(0.02323)2)1}]=0.02323[{0.48338}(3.02323)][{1.69795}{0.48338}]=1.22643

Therefore, the approximate error is,

εa=|1.226430.023231.22643|×100%=|1.249661.22643|×100%=101.89%

Use x2=1.22643 and x1=0.02323, the third iteration is,

x2+1=x2f(x2)(x21x2)f(x21)f(x2)x3=1.22643[{sin(1.22643)+cos(1+(1.22643)2)1}(0.02323+1.22643)][{sin(0.02323)+cos(1+(0.02323)2)1}{sin(1.22643)+cos(1+(1.22643)2)1}]=1.22643[{2.7449}(1.2032)][{0.48338}{2.7449}]=0.2339

Therefore, the approximate error is,

εa=|0.2339+1.226430.2339|×100%=|1.460330.2339|×100%=624.34%

Use x3=0.2339 and x2=1.22643, the fourth iteration is,

x3+1=x3f(x3)(x31x3)f(x31)f(x3)x4=0.2339[{sin(0.2339)+cos(1+(0.2339)2)1}(1.226430.2339)][{sin(1.22643)+cos(1+(1.22643)2)1}{sin(0.2339)+cos(1+(0.2339)2)1}]=0.2339[{0.27475}(1.46033)][{2.7449}{0.27475}]=0.39633

Therefore, the approximate error is,

εa=|0.396330.23390.39633|×100%=|0.162430.39633|×100%=40.98%

Similarly, all the iteration can be summarized as below,

i xi εa=|xi+1xixi+1|100%
0 3
1 0.02323 13014.33%
2 1.22643 101.89%
3 0.2339 624.34%
4 0.39633 40.98%

Hence, the first positive root is 0.39633.

(b)

Expert Solution
Check Mark
To determine

To calculate: The first positive root of the function f(x)=sinx+cos(1+x2)1 by the use of secant method with the initial guess of xi1=1.5 and xi=2.5 up to fourth iteration.

Answer to Problem 7P

Solution:

The first positive root of the function f(x)=sinx+cos(1+x2)1 is 2.53211.

Explanation of Solution

Given Information:

The function, f(x)=sinx+cos(1+x2)1. And, the initial guesses are xi1=1.5 and xi=2.5.

Formula used:

The iterative equation of secant method is,

xi+1=xif(xi)(xi1xi)f(xi1)f(xi)

And, formula for approximate error is,

εa=|xi+1xixi+1|100%

Calculation:

Consider the function,

f(x)=sinx+cos(1+x2)1

For i=0, the initial guess is x1=1.5 and x0=2.5, thus the first iteration is,

x0+1=x0f(x0)(x01x0)f(x01)f(x0)x1=2.5[{sin(2.5)+cos(1+(2.5)2)1}(1.52.5)][{sin(1.5)+cos(1+(1.5)2)1}{sin(2.5)+cos(1+(2.5)2)1}]=2.5[{0.1664}(1)][{0.9966}{0.1664}]=2.35692

Therefore, the approximate error is,

εa=|2.356922.52.35692|×100%=|0.143082.35692|×100%=6.07%

Use x1=2.35692 and x0=2.5, the second iteration is,

x1+1=x1f(x1)(x11x1)f(x11)f(x1)x2=2.35692[{sin(2.35692)+cos(1+(2.35692)2)1}(2.52.35692)][{sin(2.5)+cos(1+(2.5)2)1}{sin(2.35692)+cos(1+(2.35692)2)1}]=2.35692[{0.66986}(0.14308)][{0.1664}{0.66986}]=2.5473

Therefore, the approximate error is,

εa=|2.54732.356922.5473|×100%=|0.190382.5473|×100%=7.47%

Use x2=2.5473 and x1=2.35692, the third iteration is,

x2+1=x2f(x2)(x21x2)f(x21)f(x2)x3=2.5473[{sin(2.5473)+cos(1+(2.5473)2)1}(2.356922.5473)][{sin(2.35692)+cos(1+(2.35692)2)1}{sin(2.5473)+cos(1+(2.5473)2)1}]=2.5473[{0.0829}(0.19038)][{0.66986}{0.0829}]=2.52633

Therefore, the approximate error is,

εa=|2.526332.54732.52633|×100%=|0.020972.52633|×100%=0.83%

Use x3=2.52633 and x2=1.22643, the fourth iteration is,

x3+1=x3f(x3)(x31x3)f(x31)f(x3)x4=2.52633[{sin(2.52633)+cos(1+(2.52633)2)1}(2.54732.52633)][{sin(2.5473)+cos(1+(2.5473)2)1}{sin(2.52633)+cos(1+(2.52633)2)1}]=2.52633[{0.03152}(0.02097)][{0.0829}{0.03152}]=2.53211

Therefore, the approximate error is,

εa=|2.532112.526332.53211|×100%=|0.005782.53211|×100%=0.23%

Similarly, all the iteration can be summarized as below,

i xi εa=|xi+1xixi+1|100%
0 2.5
1 2.35692 6.07%
2 2.5473 7.47%
3 2.52633 0.83%
4 2.53211 0.23%

Hence, the first positive root is 2.53211.

(c)

Expert Solution
Check Mark
To determine

To calculate: The first positive root of the function f(x)=sinx+cos(1+x2)1 by the use of secant method with the initial guess of xi1=1.5 and xi=2.25 up to fourth iteration.

Answer to Problem 7P

Solution:

The first positive root of the function f(x)=sinx+cos(1+x2)1 is 1.9446.

Explanation of Solution

Given Information:

The function, f(x)=sinx+cos(1+x2)1. And, the initial guesses are xi1=1.5 and xi=2.25.

Formula used:

The iterative equation of secant method is,

xi+1=xif(xi)(xi1xi)f(xi1)f(xi)

And, formula for approximate error is,

εa=|xi+1xixi+1|100%

Calculation:

Consider the function,

f(x)=sinx+cos(1+x2)1

For i=0, the initial guess is x1=1.5 and x0=2.25, thus the first iteration is,

x0+1=x0f(x0)(x01x0)f(x01)f(x0)x1=2.25[{sin(2.25)+cos(1+(2.25)2)1}(1.52.25)][{sin(1.5)+cos(1+(1.5)2)1}{sin(2.25)+cos(1+(2.25)2)1}]=2.25[{0.7538}(0.75)][{0.9966}{0.7538}]=1.92702

Therefore, the approximate error is,

εa=|1.927022.251.92702|×100%=|0.322981.92702|×100%=16.76%

Use x1=1.92702 and x0=2.25, the second iteration is,

x1+1=x1f(x1)(x11x1)f(x11)f(x1)x2=1.92702[{sin(1.92702)+cos(1+(1.92702)2)1}(2.251.92702)][{sin(2.25)+cos(1+(2.25)2)1}{sin(1.92702)+cos(1+(1.92702)2)1}]=1.92702[{0.06176}(0.32298)][{0.7538}{0.06176}]=1.95148

Therefore, the approximate error is,

εa=|1.951481.927021.95148|×100%=|0.024461.95148|×100%=1.25%

Use x2=1.95148 and x1=1.92702, the third iteration is,

x2+1=x2f(x2)(x21x2)f(x21)f(x2)x3=1.95148[{sin(1.95148)+cos(1+(1.95148)2)1}(1.927021.95148)][{sin(1.92702)+cos(1+(1.92702)2)1}{sin(1.95148)+cos(1+(1.95148)2)1}]=1.95148[{0.02415}(0.02446)][{0.06176}{0.02415}]=1.9446

Therefore, the approximate error is,

εa=|1.94461.951481.9446|×100%=|0.006881.9446|×100%=0.35%

Use x3=1.9446 and x2=1.95148, the fourth iteration is,

x3+1=x3f(x3)(x31x3)f(x31)f(x3)x4=1.9446[{sin(1.9446)+cos(1+(1.9446)2)1}(1.951481.9446)][{sin(1.95148)+cos(1+(1.95148)2)1}{sin(1.9446)+cos(1+(1.9446)2)1}]=1.9446[{0.00002961}(0.00688)][{0.02415}{0.00002961}]=1.9446

Therefore, the approximate error is,

εa=|1.94461.94461.9446|×100%=|01.9446|×100%=0.00%

Similarly, all the iteration can be summarized as below,

i xi εa=|xi+1xixi+1|100%
0 2.25
1 1.92702 16.76%
2 1.95148 1.25%
3 1.9446 0.35%
4 1.9446 0.00%

Hence, the first positive root is 1.9446.

(d)

Expert Solution
Check Mark
To determine

The explanation of the result obtained by the secant method of the function f(x)=sinx+cos(1+x2)1 with the initial guesses (xi1=1.0 and xi=3.0), (xi1=1.5 and xi=2.5) and (xi1=1.5 and xi=2.25) by the graphical method.

Answer to Problem 7P

Solution:

For the initial guesses xi1=1.0 and xi=3.0, the first iteration gives a negative value due to the improper choice of initial guess.

For the initial guesses xi1=1.5 and xi=2.5, the root is converged towards the second positive root instead of first positive root.

For the initial guesses xi1=1.5 and xi=2.25, the root is converged towards the first positive root x=1.9446.

Explanation of Solution

Given Information:

The function, f(x)=sinx+cos(1+x2)1.

Consider the function,

f(x)=sinx+cos(1+x2)1

From part (a), the result obtained with the initial guesses xi1=1.0 and xi=3.0 is,

i xi εa=|xi+1xixi+1|100%
0 3
1 0.02323 13014.33%
2 1.22643 101.89%
3 0.2339 624.34%
4 0.39633 40.98%

Use MATLAB to draw the graph of the function as below,

Code:

function f = g(x)

% f is assigned a value of function f(x).

f=sin(x)+cos(1+(x^2))-1;

%function is defined.

end

Output:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 6, Problem 7P , additional homework tip  1

The graph obtained is,

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 6, Problem 7P , additional homework tip  2

From the graph, it is observed that the first iteration gives a negative value due to the improper choice of initial guess.

From part (b), the result obtained with the initial guesses xi1=1.5 and xi=2.5 is,

i xi εa=|xi+1xixi+1|100%
0 2.5
1 2.35692 6.07%
2 2.5473 7.47%
3 2.52633 0.83%
4 2.53211 0.23%

Use MATLAB to draw the graph of the function as below,

Code:

function f = g(x)

% f is assigned a value of function f(x).

f=sin(x)+cos(1+(x^2))-1;

%function is defined.

end

Output:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 6, Problem 7P , additional homework tip  3

The graph obtained is,

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 6, Problem 7P , additional homework tip  4

From the graph, it is observed that the root is converges towards the second positive root with these initial guesses instead of first positive root.

From part (c), the result obtained with the initial guesses xi1=1.5 and xi=2.25 is,

i xi εa=|xi+1xixi+1|100%
0 2.25
1 1.92702 16.76%
2 1.95148 1.25%
3 1.9446 0.35%
4 1.9446 0.00%

Use MATLAB to draw the graph of the function as below,

Code:

function f = g(x)

% f is assigned a value of function f(x).

f=sin(x)+cos(1+(x^2))-1;

%function is defined.

Output:

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 6, Problem 7P , additional homework tip  5

The graph obtained is,

EBK NUMERICAL METHODS FOR ENGINEERS, Chapter 6, Problem 7P , additional homework tip  6

From the graph, it is observed that the root is converges towards the first positive root with these initial guesses rapidly. Hence, these guesses are the proper selection to locate the first positive root by secant method.

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
Find the three unknown on this problems using Elimination Method and Cramer's Rule. Attach your solutions and indicate your final answer. Problem 1. 7z 5y 3z 16 %3D 3z 5y + 2z -8 %3D 5z + 3y 7z = 0 Problem 2. 4x-2y+3z 1 *+3y-4z -7 3x+ y+2z 5
x^2-5x^(1/3)+1=0 Has a root between 2 and 2.5 use bisection method to three iterations by hand.
For the DE: dy/dx=2x-y    y(0)=2     with h=0.2, solve for y using each method below in the range of 0 <= x <= 3: Q1) Using Matlab to employ the Euler Method (Sect 2.4)  Q2) Using Matlab to employ the Improved Euler Method (Sect 2.5 close all clear all % Let's program exact soln for i=1:5 x_exact(i)=0.5*i-0.5; y_exact(i)=-x_exact(i)-1+exp(x_exact(i)); end plot(x_exact,y_exact,'b') % now for Euler's h=0.5 x_EM(1)=0; y_EM(1)=0; for i=2:5 x_EM(i)=x_EM(i-1)+h; y_EM(i)=y_EM(i-1)+(h*(x_EM(i-1)+y_EM(i-1))); end hold on plot (x_EM,y_EM,'r') % Improved Euler's Method h=0.5 x_IE(1)=0; y_IE(1)=0; for i=2:1:5     kA=x_IE(i-1)+y_IE(i-1);     u=y_IE(i-1)+h*kA;     x_IE(i)=x_IE(i-1)+h;     kB=x_IE(i)+u;     k=(kA+kB)/2;     y_IE(i)=y_IE(i-1)+h*k; end hold on plot(x_IE,y_IE,'k')

Chapter 6 Solutions

EBK NUMERICAL METHODS FOR ENGINEERS

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
Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press
Text book image
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON
Text book image
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education
Text book image
Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY
Text book image
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning
Text book image
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Find the solutions to a trig equation between 0 and 2pi; Author: Brian McLogan;https://www.youtube.com/watch?v=h7trDHjKCYc;License: Standard YouTube License, CC-BY