Docsity

Numerical Analysis Writing Assignment Solutions: Taylor Expansions and Secant Method - Pro, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
CHE/COSC/MATH 4340-01 Numerical Analysis
Solution of Writing Assignment 04
Due Date: Thursday, 02/26/09
Problem 1. Using Taylor expansions for f(x+h)and f(x+k), derive the following approximation to
f0(x):
f0(x)≈k2f(x+h)−h2f(x+k)+(h2−k2)f(x)
(k−h)kh .
Answer: By Taylor’s Theorem
f(x+h) = f(x) + h f 0(x) + 1
2f00(x)h2+1
6f000(ξh)h3
f(x+k) = f(x) + k f 0(x) + 1
2f00(x)k2+1
6f000(ξk)k3
,
(0.1)
where ξhis between xand x+hand ξkis between xand x+k. Multiply the first equation by k2and the
second equation by h2and subtract one from the other yielding
k2f(x+h)−h2f(x+k) = (k2−h2)f(x) + kh(k−h)f0(x) + 1
6(f000(ξh)−f000(ξk))(kh)2(k−h).(0.2)
Solve for f0(x):
f0(x) = k2f(x+h)−h2f(x+k)+(h2−k2)f(x)
(k−h)kh +1
6(f000(ξk)−f000(ξh))(kh),(0.3)
from which we obtain the desired result.
1
pf3
pf4
pf5

Partial preview of the text

Download Numerical Analysis Writing Assignment Solutions: Taylor Expansions and Secant Method - Pro and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

CHE/COSC/MATH 4340-01 Numerical Analysis

Solution of Writing Assignment 04 Due Date: Thursday, 02/26/

Problem 1. Using Taylor expansions for f (x + h) and f (x + k), derive the following approximation to f ′(x): f ′(x) ≈ k^2 f (x + h) − h^2 f (x + k) + (h^2 − k^2 ) f (x) (k − h)kh

Answer: By Taylor’s Theorem

f (x + h) = f (x) + h f ′(x) +

f ′′(x)h^2 +

f ′′′(ξh)h^3

f (x + k) = f (x) + k f ′(x) +

f ′′(x)k^2 +

f ′′′(ξk)k^3 ,

where ξh is between x and x + h and ξk is between x and x + k. Multiply the first equation by k^2 and the second equation by h^2 and subtract one from the other yielding

k^2 f (x + h) − h^2 f (x + k) = (k^2 − h^2 ) f (x) + kh(k − h) f ′(x) +

( f ′′′(ξh) − f ′′′(ξk))(kh)^2 (k − h). (0.2)

Solve for f ′(x):

f ′(x) = k^2 f (x + h) − h^2 f (x + k) + (h^2 − k^2 ) f (x) (k − h)kh

( f ′′′(ξk) − f ′′′(ξh))(kh), (0.3)

from which we obtain the desired result.

Problem 2. If the Secant method is applied to f (x) = x^2 − 2 with x 0 = 0 and x 1 = 1, what is x 2? Answer: Using Secant Method we have

xn+ 1 = xn − xn − xn− 1 x^2 n − x^2 n− 1

(x^2 n − 2 )

= xn −

xn − xn− 1 (xn − xn− 1 )(xn + xn− 1 ) (x^2 n − 2 )

= xn − x^2 n − 2 xn + xn− 1

Using this relation we get

x 2 = x 1 − x^21 − 2 x 1 + x 0

Problem 4. Assume that r is a zero of multiplicity 2 of the polynomial p(x).

  • Prove that Newton’s method converges linearly. Hint: Appropriately use Taylor expansions p(r) = p(xn − en) and p′(r) = p′(xn − en). As usual en = xn − r.

Answer: Notice the error equation associated with Newton’s method can be written as

en+ 1 = en − p(xn) p′(xn)

en p′(xn) − p(xn) p′(xn)

Moreover, by Taylor’s expansion

0 = p(r) = p(xn − en) = p(xn) − p′(xn)en +

p′′(sn)e^2 n 0 = p′(r) = p′(xn − en) = p′(xn) − p′′(tn)en,

each of them gives p′(xn)en − p(xn) =

p′′(sn)e^2 n p′(xn) = p′′(tn)en,

Putting these two expressions into the error equation yields

en+ 1 =

p′′(sn)e^2 n p′′(tn)en

[ (^) p′′(sn) 2 p′′(tn)

]

en. (0.10)

This last equation establishes the linear convergence of Newton’s method for finding a zero of multiplicity 2.

  • Now consider a variation of Newton’s method

xn+ 1 = xn − 2 p(xn) p′(xn)

Prove that it converges quadratically to r. Hint: Appropriately use Taylor expansions p(xn) = p(r + en) and p′(xn) = p′(r + en). Answer: For this variation, the error equation becomes

en+ 1 = en − 2 p(xn) p′(xn)

en p′(xn) − 2 p(xn) p′(xn)

By Taylor’s expansion

p(xn) = p(r + en) = p(r) + p′(r)en +

p′′(r)e^2 n +

p′′′(zn)e^3 n

=

p′′(r)e^2 n +

p′′′(zn)e^3 n,

p′(xn) = p′(r + en) = p′(r) + p′′(r)en +

p′′′(wn)e^2 n

= p′′(r)en +

p′′′(wn)e^2 n.

Using these two we get

en p′(xn) − 2 p(xn) = p′′(r)e^2 n +

p′′′(wn)e^3 n − p′′(r)e^2 n −

p′′′(zn)e^3 n =

[ 1

p′′′(wn) −

p′′′(zn)

]

e^3 n.

Furthermore, we also know that p′(xn) = p′(r + en) = p′(r) + p′′(an)en = p′′(an)en. Putting these last two identities to the error equation gives

en+ 1 =

[

1 2 p ′′′(wn) − 1 3 p ′′′(zn)

]

e^3 n p′′(an)en

[

1 2 p ′′′(wn) − 1 3 p ′′′(zn)

]

p′′(an) e^2 n. (0.14)

As the method converges, we know that wn → r, zn → r, and an → r, from which we deduce that

en+ 1 ≈

[ (^) p′′′(r) 6 p′′(r)

]

e^2 n, (0.15)

which is a statement of quadratic convergence.