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 13, Problem 8P

Employ the following methods to find the maximum of the function from Prob. 13.7:

(a) Golden-section search ( x l = 2 , x u = 1 , ε s = 1 % ) .

(b) Parabolic interpolation ( x 0 = 2 , x 1 = 1 , x 2 = 1 , iterations = 4 ) . Select new points sequentially as in the secant method.

(c) Newton's method ( x 0 = 1 , ε s = 1 % )

(a)

Expert Solution
Check Mark
To determine

To calculate: The maximum of the function f(x)=x42x38x25x with the help of Golden-section search. Take initial guesses as xl=2,xu=1, andan acceptable error as et=1%.

Answer to Problem 8P

Solution:

The maximum of the function f(x)=x42x38x25x is, x=0.3468 after 14 iterations.

Explanation of Solution

Given information:

The function f(x)=x42x38x25x. Initial guesses xl=2,xu=1 and value of acceptable error is et=1%.

Formula used:

The golden-search method with two initial guesses, xl and xu that encloses one local extreme of function f(x). Two interior points x1 and x2 with the golden ratio d is given by,

d=512( xuxl)x1=xl+dx2=xud

Evaluated the function at the above two interior points. Two results can occur,

If f(x1)>f(x2), then x2 becomes the new xl for the next iteration.

If f(x2)>f(x1), then x1 becomes the new xu for the next iteration.

Calculation:

Consider function f(x), in standard form as

f(x)=x42x38x25x

With xl=2 , xu=1 and εs=1%

Iteration 1: First golden ratio is used to create two interior points as,

d=512( xuxl)=512( 1(2))=3(512)=1.8541

The two interior points are as follows:

First point is,

x1=xl+d=2+1.8541=0.1459

Second point is,

x2=xud=11.8541=0.8541

Now, comparing the value of function at these interior points as shown below:

For x=0.1459,

f(x1)=x142x138x125x1=(0.1459)42(0.1459)38(0.1459)25(0.1459)=0.5650

For x=0.8541,

f(x2)=x242x238x225x2=(0.8541)42(0.8541)38(0.8541)25(0.8541)=0.8514

As f(x1)>f(x2),

Therefore, the maximum is in the interval defined by x2,x1 and xu

Where, x1 is the optimum.

The error at this point can be computed as follow:

εs=(1R)| xuxlxopt |100,  where R=512εs=(1512)| 1(2)0.1459 |100εs=(1512)(30.1459)100εs=785.40%

Therefore, the domain of x to the left of x2 from 2 to x2 can be eliminated; because it does not contain the maximum value.

For this case, x20.8541 becomes new xl for the next round.

Iteration 2: Here, xl=0.8541 and xu=1. The first golden ratio is used to create two interior points as follow:

d=512( xuxl)=512( 1(0.8541 ))=1.1459

The two new interior points are as follows:

First point is,

x1=xl+d=0.8541 +1.1459=0.2918

Second point is,

x2=xud=11.1459=0.1459

Now, comparing the value of function at these interior points as shown below:

For x=0.2918,

f(x1)=x142x138x125x1=(0.2918)42(0.2918)38(0.2918)25(0.2918)=2.197

For x=0.1459,

f(x2)=x242x238x225x2=(0.1459)42(0.1459)38(0.1459)25(0.1459)=0.5650

As f(x2)>f(x1)

For this case, x1=0.2918 become new xu, for the next round.

Now,

εs(1R)|xuxlxopt|100,where R=512εs(1512)|1(0.8541)0.1459|100εs(1512)(1.85410.1459)100εs485.40%

Iteration 3: Here, xl=0.8541 and xu=0.2918. The first golden ratio is used to create two interior points as follow:

d=512( xuxl)=512( 0.2918(0.8541))=0.7082

The two new interior points are as follows:

First interior point is,

x1=xl+d=0.8541+0.7082=0.1459

Second interior point is,

x2=xud=0.29180.7082=0.4164

Now, comparing the value of function at these interior points as shown below:

For x=0.1459,

f(x1)=x142x138x125x1=(0.1459)42(0.1459)38(0.1459)25(0.1459)=0.5650

For x=0.4164,

f(x2)=x242x238x225x2=(0.4164)42(0.4164)38(0.4164)25(0.4164)=0.8090

As f(x2)>f(x1)

Therefore, for this case, x1=0.1459 becomes new xu for the next round.

Proceeding like this the iterations can be tabulated below as:

ixlf(xl)x2f(x2)x1f(x1)xuf(xu)xoptεscomparison12220.85410.85140.14590.56501160.1459785.41f(x1)>f(x2)20.85410.85140.14590.56500.29182.1971160.1459485.41f(x2)>f(x1)30.85410.85140.41640.80900.14590.56500.29182.1970.4164105.11f(x2)>f(x1)40.85410.85140.58360.47500.41640.80900.14590.56500.416464.96f(x1)>f(x2)50.58360.47500.41640.80900.31310.83300.14590.56500.313153.40f(x1)>f(x2)60.41640.80900.31310.83300.24920.77600.14590.56500.313133f(x2)>f(x1)70.41640.80900.35250.84100.31310.83300.24920.77640.352518.11f(x2)>f(x1)80.41640.80900.37690.83510.35250.84100.31310.83300.352511.19f(x1)>f(x2)90.37690.83510.35250.84100.33750.84010.31310.83300.35256.92f(x2)>f(x1)100.37690.83510.36190.83930.35250.84100.33750.84010.35254.28f(x1)>f(x2)110.36190.83930.35250.84100.34680.84100.33750.84010.34682.69f(x1)>f(x2)120.35250.84100.34680.84100.34320.84120.33750.84010.34681.66f(x1)>f(x2)130.35250.84100.34900.84110.34680.84100.34320.84120.34681.03f(x1)>f(x2)140.34900.84110.34680.84100.34540.84110.34320.84120.34680.63f(x1)>f(x2)

Thus, the result converges to true value x=0.3468.

(b)

Expert Solution
Check Mark
To determine

To calculate: The maximum of the function f(x)=x42x38x25x with the help of parabolic interpolation. Take initial guesses as x0=2,x1=1,x2=1.

Answer to Problem 8P

Solution:

The maximum of the function f(x)=x42x38x25x is, x=0.3472 after 4 iterations.

Explanation of Solution

Given information:

The function f(x)=x42x38x25x. Initial guesses x0=2,x1=1,x2=1 and the number of iterations is, 4.

Formula used:

Consider three points jointly bracket an optimum, thus a unique parabola through these three points can be determined. On differentiating and setting it equal to zero estimate of optimal can be computed.

Consider x0,x1 and x2 as initial guesses and x3 be the value of x that corresponds to the maximum value of quadratic which fit into guesses, then,

x3=f(x0)(x12x22)+f(x1)(x22x02)+f(x2)(x02x12)2f(x0)(x1x2)+2f(x1)(x2x0)+2f(x2)(x0x1) …… (1)

Calculation:

Consider function f(x), in standard form as:

f(x)=x42x38x25x

With initial guesses x0=2,x1=1,x2=1.

Iteration 1: Function values at these three initial points is,

For x=2,

f(x0)=f(2)=(2)42(2)38(2)25(2)=22

For x=1,

f(x1)=f(1)=(1)42(1)38(1)25(1)=2

For x=1,

f(x2)=f(1)=(1)42(1)38(1)25(1)=16

Substitute the value of x0,x1,x2 and f(x0),f(x1),f(x2) in equation (1) to get value of x3,

x3=f(x0)(x12x22)+f(x1)(x22x02)+f(x2)(x02x12)2f(x0)(x1x2)+2f(x1)(x2x0)+2f(x2)(x0x1)=(22)((1)212)+(2)(12(2)2)+(16)((2)2(1)2)2(22)((1)1)+2(2)(1(2))+2(16)((2)(1))=0.3889

The value of function at x3 is,

f(x3)=f(0.3889)=(0.3889)42(0.3889)38(0.3889)25(0.3889)=0.8293

Therefore, f(x3)>f(x1) then the new value of x is to the right of intermediate point x1  and the lower guess x0  is discarded.

Iteration 2: Now the initial guesses are x0=1,x1=0.3889,x2=1

Function values at these three initial points are,

For x=1,

f(x0)=f(1)=(1)42(1)38(1)25(1)=2

For x=0.3889,

f(x1)=f(0.3889)=(0.3889)42(0.3889)38(0.3889)25(0.3889)=0.8293

For x=1,

f(x2)=f(1)=(1)42(1)38(1)25(1)=16

Substitute the value of x0,x1,x2 and f(x0),f(x1),f(x2) in equation (1) to get value of x3,

x3=f(x0)(x12x22)+f(x1)(x22x02)+f(x2)(x02x12)2f(x0)(x1x2)+2f(x1)(x2x0)+2f(x2)(x0x1)=(2)((0.3889)212)+(0.8293)(12(1)2)+(16)((1)2(0.3889)2)2(2)((0.3889)1)+2(0.8293)(1(1))+2(16)((1)(0.3889))=0.4179

The value of the provided function at x3 is,

f(x3)=f(0.4179)=(0.4179)42(0.4179)38(0.4179)25(0.4179)=0.8077

Therefore, f(x1)>f(x3) then the new value of x is to the right of intermediate point x1  and the upper guess x2 is discarded.

Iteration 3: Now the initial guesses are x0=1,x1=0.4179,x2=0.3889 

Function values at these three initial points is,

For x=1,

f(x0)=f(1)=(1)42(1)38(1)25(1)=2

The function for x1

f(x1)=f(0.4179)=(0.4179)42(0.4179)38(0.4179)25(0.4179)=0.8077

And for x2,

f(x2)=f(0.3889)=(0.3889)42(0.3889)38(0.3889)25(0.3889)=0.8293

Substitute the value of x0,x1,x2 and f(x0),f(x1),f(x2) in equation (1) to get value of x3,

x3=f(x0)(x12x22)+f(x1)(x22x02)+f(x2)(x02x12)2f(x0)(x1x2)+2f(x1)(x2x0)+2f(x2)(x0x1)={(2)((0.4179)2(0.3889)2)+(0.8077)((0.3889)2(1)2)+(0.8293)((1)2(0.4179)2)}{2(2)((0.4179)(0.3889))+2(0.8077)((0.3889)(1))+2(0.8293)((1)(0.4179))}=0.3476

And value of function at x3 is,

f(x3)=f(0.3476)=(0.3476)42(0.3476)38(0.3476)25(0.3476)=0.8408

Therefore, f(x3)>f(x1) then the new value of x is to the right of intermediate point x1  and the lower guess x0  is discarded.

Iteration 4: Now the initial guesses are x0=0.4179,x1=0.3889,x2=0.3476 

Function values at these three initial points is,

For x=0.4179,

f(x0)=f(0.4179)=(0.4179)42(0.4179)38(0.4179)25(0.4179)=0.8077

For x=0.3889,

f(x1)=f(0.3889)=(0.3889)42(0.3889)38(0.3889)25(0.3889)=0.8293

For x=0.3476,

f(x2)=f(0.3476)=(0.3476)42(0.3476)38(0.3476)25(0.3476)=0.8408

Substitute the value of x0,x1,x2 and f(x0),f(x1),f(x2) in equation (1) to get value of x3,

x3=(f(x0)(x12x22)+f(x1)(x22x02)+f(x2)(x02x12))(2f(x0)(x1x2)+2f(x1)(x2x0)+2f(x2)(x0x1))=((0.8077)((0.3889)2(0.3476)2)+(0.8293)((0.3476)2(0.4179)2)+(0.8408)((0.4179)2(0.3889)2))(2(0.8077)((0.3889)(0.3476))+2(0.8293)((0.3476)(0.4179))+2(0.8408)((0.4179)(0.3889)))=0.3472

And value of function at x3 is,

f(x3)=f(0.3472)=(0.3472)42(0.3472)38(0.3472)25(0.3472)=0.8408

Therefore, f(x1)>f(x3) then the new value of x is to the right of intermediate point x1  and the lower guess x0  is discarded.

And the process continues with a summary shown below in a table:

ix0f(x0)x1f(x1)x2f(x2)x3f(x3)εa(%)1222121160.38890.82932120.38890.82931160.41790.80776.943120.41790.80770.38890.82930.34760.840820.2240.41790.80770.38890.82930.34760.84080.34720.84080.115

Thus, after four iterations result is converging to true value x=0.3472.

(c)

Expert Solution
Check Mark
To determine

To calculate: The maximum of the function f(x)=x42x38x25x with the help of Newton’s method. Take initial guess as x0=1.

Answer to Problem 8P

Solution:

The maximum of the function f(x)=x42x38x25x is, 0.3472.

Explanation of Solution

Given information:

The function f(x)=x42x38x25x. Initial guess is x0=1 and the acceptable error is, et=1%.

Formula used:

Newton Method is similar to Newton Raphson as it does not require initial guesses that bracket the optimum solution.

For any function f(x) optimal solution can be attained by performing iterations following the formula given below:

xi+1=xif(xi)f(xi) ...... (1)

Calculation:

Consider function f(x),

f(x)=x42x38x25x

With initial guesses x0=1,εt=1%.

First and second derivatives of function that is, f(x) and f(x), can be evaluated as:

f(x)= 4x36x216x5f(x)=12x212x16

Iteration 1:Initially for x0=1, values of first and second derivatives of function are as follows:

f(x)= 4x36x216x5f(1)=4(1)36(1)216(1)5=9

For second derivative,

f(x)=12x212x16f(1)=12(1)212(1)16=16

Therefore, x1 is calculated using formula given as equation (2),

x1=x0f(x0)f(x0)=1(9)(16)=0.4375

And

f(x1)=x142x138x125x1=(0.4375)42(0.4375)38(0.4375)25(0.4375)=0.7871

Iteration 2:Now for x1=0.4375, values of first and second derivatives of function are as follows:

f(x1)= 4x136x1216x15f(0.4375)=4(0.4375)36(0.4375)216(0.4375)5=1.1865

For second derivative,

f(x)=12x212x16f(0.4375)=12(0.4375)212(0.4375)16=13.045

Therefore, x2 is calculated using formula given as equation (2)

x2=x1f(x1)f(x1)=0.4375(1.1865)(13.045)=0.3465

And

f(x2)=x242x238x225x2=(0.3465)42(0.3465)38(0.3465)25(0.3465)=0.8408

Iteration 3:Now for x2=0.3465, values of first and second derivatives of function are as follows:

f(x2)= 4x236x2216x25f(0.3465)=4(0.3465)36(0.3465)216(0.3465)5=0.0099

For second derivative,

f(x2)=12x2212x216f(0.3465)=12(0.3465)212(0.3465)16=13.2827

Therefore, x3 is calculated using formula given as equation (2)

x3=x2f(x2)f(x2)=0.3465(0.0099)(13.2827)=0.3472

And

f(x3)=x342x338x325x3=(0.3472)42(0.3472)38(0.3472)25(0.3472)=0.8408

Iteration 4:Now for x3=0.3472, values of first and second derivatives of function are as follows:

f(x3)= 4x336x3216x35f(0.3472)=4(0.3472)36(0.3472)216(0.3472)5=0.00067

For second derivative,

f(x2)=12x2212x216f(0.3472)=12(0.3472)212(0.3472)16=13.2801

Therefore, x4 is calculated using formula given as equation (2)

x4=x3f(x3)f(x3)=0.3472(0.00067)(13.2801)=0.347250

Maintaining the error percentage using equation (3) iterations can be summarized as shown in table below:

ixf(x)f(x)f(x)εa01291610.43750.78711.86513.04616.1620.34650.84080.093113.2850.1130.34720.84080.009913.28000

Thus, within four iterations, the result converges to true value 0.3472.

Therefore, the maximum of the function f(x)=x42x38x25x is 0.3472.

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!

Additional Math Textbook Solutions

Find more solutions based on key concepts
Reading, Writing, and Rounding Whole Numbers Write in words. 357

Mathematics for the Trades: A Guided Approach (11th Edition) (What's New in Trade Math)

Provide an example of a qualitative variable and an example of a quantitative variable.

Elementary Statistics ( 3rd International Edition ) Isbn:9781260092561

For Problems 23-28, write in simpler form, as in Example 4. logbFG

Finite Mathematics for Business, Economics, Life Sciences and Social Sciences

1. How is a sample related to a population?

Elementary Statistics: Picturing the World (7th Edition)

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.
Recommended textbooks for you
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
College Algebra (MindTap Course List)
Algebra
ISBN:9781305652231
Author:R. David Gustafson, Jeff Hughes
Publisher:Cengage Learning
Text book image
Glencoe Algebra 1, Student Edition, 9780079039897...
Algebra
ISBN:9780079039897
Author:Carter
Publisher:McGraw Hill
Text book image
College Algebra
Algebra
ISBN:9781305115545
Author:James Stewart, Lothar Redlin, Saleem Watson
Publisher:Cengage Learning
Text book image
Algebra: Structure And Method, Book 1
Algebra
ISBN:9780395977224
Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:McDougal Littell
Text book image
Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781337278461
Author:Ron Larson
Publisher:Cengage Learning
Finding Local Maxima and Minima by Differentiation; Author: Professor Dave Explains;https://www.youtube.com/watch?v=pvLj1s7SOtk;License: Standard YouTube License, CC-BY