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 6P

Employ the following methods to find the maximum of

f ( x ) = 4 x 1.8 x 3 + 1.2 x 3 0.3 x 4

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

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

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

(a)

Expert Solution
Check Mark
To determine

To calculate: The maximum of the function f(x)=4x1.8x2+1.2x30.3x4 with the help of Golden-section search. Take initial guesses as xi=2,xu=4 and acceptable error as et=1%.

Answer to Problem 6P

Solution:

The maximum of the function f(x)=4x1.8x2+1.2x30.3x4 is, 2.486 after 11 iterations.

Explanation of Solution

Given information:

The function f(x)=4x1.8x2+1.2x30.3x4. Initial guesses xl=2,xu=4 and value of acceptable error is et=1%.

Formula used:

In the golden–section search algorithm two interior points are chosen which satisfies the golden ratio.

The method starts with two initial guesses, xl and xu that encloses one local extreme of function f(x). Next, two interior points x1 and x2 are chosen which satisfies the golden ratio,

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

Here d is the difference and x1 and x2 are two interior points,

The value of the function is evaluated at these two interior points. Two results can occur:

(1). If f(x1)>f(x2), then the domain of x to the left of x2 from xl to x2 can be eliminated because it does not contain the maximum. For this case, x2 becomes new xl for the next iteration.

(2). If f(x2)>f(x1), then the domain of x to the right of x1 from x1 to xu, can be eliminated because it does not contain the maximum. For this case, x1 becomes new xu for the next iteration.

And the process is repeated for a number of times till the value reaches close to a particular number.

Calculation:

Consider function f(x), in standard form as

f(x)=4x1.8x2+1.2x30.3x4=0.3x4+1.2x31.8x2+4x

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

Now,

εs=(1R)|xuxlxopt|100,where R=5121=(1512)|4(2)xopt|xopt=(1512)(6)xopt=2.292

Let’s continue with the iterations to reach to xopt.

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

d=512( xuxl)=512( 4(2))=3(51)=3.708

The two interior points are,

x1=xl+d=2+3.708=1.708

x2=xud=43.708=0.292

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

For x=1.708,

f(x1)=0.3x14+1.2x131.8x12+4x1=0.3(1.708)4+1.2(1.708)31.8(1.708)2+4(1.708)=5.007

For x=0.292,

f(x2)=0.3x24+1.2x231.8x22+4x2=0.3(0.292)4+1.2(0.292)31.8(0.292)2+4(0.292)=1.042

As f(x1)>f(x2)

Therefore, the domain of x to the left of x2 from 2 to x2 can be eliminated because it does not contain the maximum. For this case, x2=0.292 becomes new  xl for the next round.

Iteration 2: Here xl=0.292 and xu=4, first golden ratio is used to create two interior points as,

d=512( xuxl)=512( 40.292)=2.291

The two new interior points are,

x1=xl+d=0.292+2.291=2.583

x2=xud=42.291=1.709

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

For x=2.583,

f(x1)=0.3x14+1.2x131.8x12+4x1=0.3(2.583)4+1.2(2.583)31.8(2.583)2+4(2.583)=5.648

For x=1.709,

f(x2)=0.3x24+1.2x231.8x22+4x2=0.3(1.709)4+1.2(1.709)31.8(1.709)2+4(1.709)=5.009

As f(x1)>f(x2)

Therefore, the domain of x to the left of x2 from 0.292 to x2 can be eliminated because it does not contain the maximum. For this case, x2=1.709 becomes new  xl for the next round.

Iteration 3: Here xl=1.709 and xu=4, first golden ratio is used to create two interior points as,

d=512( xuxl)=512( 41.709)=1.416

The two new interior points are,

x1=xl+d=1.709+1.416=3.125

x2=xud=41.416=2.584

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

For x=3.125,

f(x1)=0.3x14+1.2x131.8x12+4x1=0.3(3.125)4+1.2(3.125)31.8(3.125)2+4(3.125)=2.933

For x=2.584,

f(x2)=0.3x24+1.2x231.8x22+4x2=0.3(2.584)4+1.2(2.584)31.8(2.584)2+4(2.584)=5.646

As f(x2)>f(x1)

Therefore, for this case, x1=3.125 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)1229.600.2921.0421.7085.007412.820.2921.0421.7095.0092058350648412.831.7095.0092.5845.6463.1252.933412.841.7095.0092.255.8672.5845.6463.1252.93351.7095.0092.0435.6652.255.8672.5845.64662.0435.6652.2495.8672.3775.8772.5845.64672.2495.8672.4565.8282.3775.8772.5845.64682.4565.8672.5045.7742.5355.7322.5845.64692.4565.8672.4865.7982.5055.7752.5355.732102.4565.8672.4755.8102.4865.7982.5055.775112.4565.8672.4685.8182.4755.8102.4865.798Comparisonf(x1)>f(x2)f(x1)>f(x2)f(x2)>f(x1)f(x2)>f(x1)f(x1)>f(x2)f(x1)>f(x2)f(x1)>f(x2)f(x2)>f(x1)f(x2)>f(x1)f(x2)>f(x1)f(x2)>f(x1)

(b)

Expert Solution
Check Mark
To determine

To calculate: The maximum of the function f(x)=4x1.8x2+1.2x30.3x4 with the help of parabolic interpolation. Take initial guesses as x0=1.75,x1=2,x2=2.5.

Answer to Problem 6P

Solution:

The maximum of the function f(x)=4x1.8x2+1.2x30.3x4 is, 2.3263 after 4 iterations.

Explanation of Solution

Given information:

The function f(x)=4x1.8x2+1.2x30.3x4. Initial guesses x0=1.75,x1=2,x2=2.5 and the number of iteration 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)=4x1.8x2+1.2x30.3x4=0.3x4+1.2x31.8x2+4x

With initial guesses x0=1.75,x1=2 and x2=2.5.

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

For x=1.75,

f(x0)=f(1.75)=0.3(1.75)4+1.2(1.75)31.8(1.75)2+4(1.75)=5.1051

For x=2,

f(x1)=f(2)=0.3(2)4+1.2(2)31.8(2)2+4(2)=5.6

For x=2.5,

f(x2)=f(2.5)=0.3(2.5)4+1.2(2.5)31.8(2.5)2+4(2.5)=5.7812

Substituting these values 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)=5.1051(222.52)+5.6(2.521.752)+5.7813(1.75222)2(5.1051)(22.5)+2(5.6)(2.51.75)+2(5.7813)(1.752)=2.3341

And value of function at x3 is,

f(x3)=f(2.3341)=0.3(2.3341)4+1.2(2.3341)31.8(2.3341)2+4(2.3341)=5.8852

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=2,x1=2.5 and x2=2.3341

Function values at these three initial points is,

For x=2,

f(x0)=f(2)=0.3(2)4+1.2(2)31.8(2)2+4(2)=5.6

For x=2.5,

f(x1)=f(2.5)=0.3(2.5)4+1.2(2.5)31.8(2.5)2+4(2.5)=5.7813

For x=2.3341,

f(x2)=f(2.3341)=0.3(2.3341)4+1.2(2.3341)31.8(2.3341)2+4(2.3341)=5.8852

Substituting these values 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)=5.6(2.522.33412)+5.7813(2.3341222)+5.8852(222.52)2(5.6)(2.52.3341)+2(5.7813)(2.33412)+2(5.8852)(22.5)=2.3112

And value of function at x3 is,

f(x3)=f(2.3112)=0.3(2.3112)4+1.2(2.3112)31.8(2.3112)2+4(2.3112)=5.8846

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 3: Now the initial guesses are x0=2.5,x1=2.3341 and x2=2.3112

Function values at these three initial points is,

For x=2.5,

f(x0)=f(2.5)=0.3(2.5)4+1.2(2.5)31.8(2.5)2+4(2.5)=5.7813

The function for x1

f(x1)=f(2.3341)=0.3(2.3341)4+1.2(2.3341)31.8(2.3341)2+4(2.3341)=5.8852

And for x2,

f(x2)=f(2.3112)=0.3(2.3112)4+1.2(2.3112)31.8(2.3112)2+4(2.3112)=5.8846

Substituting these values 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)=(5.7813(2.334122.31122)+5.8852(2.311222.52)+5.8846(2.522.33412))(2(5.7813)(2.33412.3112)+2(5.8852)(2.31122.5)+2(5.8846)(2.52.3341))=2.3260

And value of function at x3 is,

f(x3)=f(2.3260)=0.3(2.3260)4+1.2(2.3260)31.8(2.3260)2+4(2.3260)=5.8853

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=2.3341,x1=2.3112 and x2=2.3260

Function values at these three initial points is,

For x=2.3341,

f(x0)=f(2.3341)=0.3(2.3341)4+1.2(2.3341)31.8(2.3341)2+4(2.3341)=5.8852

For x=2.3112,

f(x1)=f(2.3112)=0.3(2.3112)4+1.2(2.3112)31.8(2.3112)2+4(2.3112)=5.8846

For x=2.3260,

f(x2)=f(2.3260)=0.3(2.3260)4+1.2(2.3260)31.8(2.3260)2+4(2.3260)=5.8853

Substituting these values 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)=(5.8852(2.311222.32602)+5.8846(2.326022.33412)+5.8853(2.334122.31122))(2(5.8852)(2.31122.3260)+2(5.8846)(2.32602.3341)+2(5.8853)(2.33412.3112))=2.3263

And value of function at x3 is,

f(x3)=f(2.3263)=0.3(2.3263)4+1.2(2.3263)31.8(2.3263)2+4(2.3263)=5.8853

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.

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

ix0f(x0)x1f(x1)x2f(x2)x3f(x3)11.755.105125.62.55.78132.33415.8852f(x3)>f(x1)225.62.55.78132.33415.88522.31125.8846f(x3)>f(x1)32.55.78132.33415.88522.31125.88462.32605.8853f(x3)>f(x1)42.33415.88522.31125.88462.32605.88532.32635.8853f(x3)>f(x1)

(c)

Expert Solution
Check Mark
To determine

To calculate: The maximum of the function f(x)=4x1.8x2+1.2x30.3x4 with the help of Newton’s method. Take initial guess as x0=3.

Answer to Problem 6P

Solution:

The maximum of the function f(x)=4x1.8x2+1.2x30.3x4 is, 2.3264.

Explanation of Solution

Given information:

The function f(x)=4x1.8x2+1.2x30.3x4. Initial guess is x0=3 and the acceptable error is, et=1%.

Formula used:

Newton Method is open method 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), in standard form as:

f(x)=4x1.8x2+1.2x30.3x4=0.3x4+1.2x31.8x2+4x

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

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

f(x)= 1.2x3+3.6x23.6x+4f(x)=3.6x2+7.2x3.6

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

f(x)= 1.2x3+3.6x23.6x+4f(3)= 1.2(3)3+3.6(3)23.6(3)+4=6.8

For second derivative,

f(x)=3.6x2+7.2x3.6f(3)=3.6(3)2+7.2(3)3.6=14.4

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

x1=x0f(x0)f(x0)=3(6.8)(14.4)=2.5278

And

f(x1)=0.3x14+1.2x131.8x12+4x1=0.3(2.5278)4+1.2(2.5278)31.8(2.5278)2+4(2.5278)=5.7434

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

f(x)= 1.2x3+3.6x23.6x+4f(2.5278)= 1.2(2.5278)3+3.6(2.5278)23.6(2.5278)+4=1.4792

For second derivative,

f(x)=3.6x2+7.2x3.6f(2.5278)=3.6(2.5278)2+7.2(2.5278)3.6=8.4028

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

x2=x1f(x1)f(x1)=2.5278(1.4794)(8.403)=2.3517

And

f(x2)=0.3x24+1.2x231.8x22+4x2=0.3(2.3517)4+1.2(2.3517)31.8(2.3517)2+4(2.3517)=5.8833

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

f(x)= 1.2x3+3.6x23.6x+4f(2.3517)= 1.2(2.3517)3+3.6(2.3517)23.6(2.3517)+4=0.1639

For second derivative,

f(x)=3.6x2+7.2x3.6f(2.3517)=3.6(2.3517)2+7.2(2.3517)3.6=6.5779

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

x3=x2f(x2)f(x2)=2.3517(0.1636)(6.5775)=2.3268

And

f(x3)=0.3x34+1.2x331.8x32+4x3=0.3(2.3268)4+1.2(2.3268)31.8(2.3268)2+4(2.3268)=5.8853

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

f(x)= 1.2x3+3.6x23.6x+4f(2.3268)= 1.2(2.3268)3+3.6(2.3268)23.6(2.3268)+4=0.0030

For second derivative,

f(x)=3.6x2+7.2x3.6f(2.3268)=3.6(2.3268)2+7.2(2.3268)3.6=6.3377

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

x4=x3f(x3)f(x3)=2.3268(0.0030)(6.3377)=2.3264

And

f(x4)=0.3x44+1.2x431.8x42+4x4=0.3(2.3264)4+1.2(2.3264)31.8(2.3264)2+4(2.3264)=5.8853

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

ixf(x)f(x)f(x)033.96.814.412.52785.74341.47928.402822.35175.88330.16396.577932.32685.88530.00306.337742.32645.88530.00006.3332

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

Therefore, the maximum of the function f(x)=4x1.8x2+1.2x30.3x4 is 2.3264.

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
Employ the following methods to find the maximum of f(x) = 4x – 1.8x² + 1.2x3 – 0.3x4 (a) Golden-section search (x,= -2, x, = 4, ɛ = 15%). (b) Parabolic interpolation (x, = 1.75, x, = 2, x3 = 2.5, iterations = 5).
1. S(x) = *+vī-2r %3D V9-x find the domain only.
G(n) =>(d)o(d) is multiplicative function. If p is prime then G(p*), fork >1 equals %3D dịn Select one: Op -- 0.
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: 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
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
College Algebra
Algebra
ISBN:9781938168383
Author:Jay Abramson
Publisher:OpenStax
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 (MindTap Course List)
Algebra
ISBN:9781305652231
Author:R. David Gustafson, Jeff Hughes
Publisher:Cengage Learning
Text book image
College Algebra
Algebra
ISBN:9781305115545
Author:James Stewart, Lothar Redlin, Saleem Watson
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