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

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:

Numerical Methods for Engineers, Chapter 6, Problem 7P , additional homework tip  1

The graph obtained is,

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:

Numerical Methods for Engineers, Chapter 6, Problem 7P , additional homework tip  3

The graph obtained is,

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:

Numerical Methods for Engineers, Chapter 6, Problem 7P , additional homework tip  5

The graph obtained is,

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
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 6 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
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781337278461
Author:Ron Larson
Publisher:Cengage Learning
Text book image
College Algebra (MindTap Course List)
Algebra
ISBN:9781305652231
Author:R. David Gustafson, Jeff Hughes
Publisher:Cengage Learning
Text book image
Functions and Change: A Modeling Approach to Coll...
Algebra
ISBN:9781337111348
Author:Bruce Crauder, Benny Evans, Alan Noell
Publisher:Cengage Learning
Text book image
Algebra and Trigonometry (MindTap Course List)
Algebra
ISBN:9781305071742
Author:James Stewart, Lothar Redlin, Saleem Watson
Publisher:Cengage Learning
Text book image
College Algebra
Algebra
ISBN:9781938168383
Author:Jay Abramson
Publisher:OpenStax
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