Anda di halaman 1dari 3

ChemE 109 - Numerical and Mathematical Methods in Chemical and Biological Engineering Fall 2007 Solution to Homework Set

3 1. Recall the derivation of the Newton iteration formula discussed in the lecture; it was based on a Taylor series expansion of the function f (x) around an estimate of the root x(m) , truncated after the linear term. You are asked to derive a more accurate iteration scheme as follows: Start from the Taylor series expansion of f (x) around x(m) , and truncate it after the quadratic term; derive then a general iteration formula for x(m+1) , and explain how you would use it. Solution: From Taylor series, we have f (xroot ) = f (x0 ) + Dene a= then we have df 0 1 d2 f 0 (xroot x0 )2 (x )(xroot x0 ) + (x ) + O((xroot x0 )3 = 0 2 dx 2 dx 2 1 d2 f 0 df 0 (x ) b = (x ) c = f (x0 ) 2 2 dx dx

a(x x0 )2 + b(x1 x0 ) + c = 0 b b2 4ac 1 0 x x = 2a b b2 4ac x1 = x0 + 2a

2. For the nonlinear functions that follow, provide the Newton iteration formula that you would use to nd the roots of f (x) = 0: (a) f (x) = 2x5 6x3 + 1 (b) f (x) = e2x + x (c) f (x) = sin x x Do not solve the equations! Solution: Newton iteration formula x(m+1) = x(m) (a) f (x) = 2x5 6x3 + 1 f (x) = 10x 18x x
4 2 (m+1)

f x(m) f x(m)

=x

(m)

2x(m) 6x(m) + 1 2 4 10x(m) 18x(m)

(b) f (x) = e2x + x f (x) = 2e (c) f (x) = sin x x f (x) = cos x 1 x(m+1) = x(m) sin x(m) x(m) cos x(m) 1
2x

+1x

(m+1)

=x

(m)

e2x + x(m) 2e2x(m) + 1

(m)

3. For the nonlinear functions that follow, provide the Secant iteration formula that you would use to nd the roots of f (x) = 0: (a) f (x) = x4 + 3x3 + 2x + 1 (b) f (x) = xe2x x + 1 (c) f (x) = cos x2 + x3 Do not solve the equations! Solution: Secant iteration formula x(m+1) = x(m) x(m) x(m1) (x(m) x(m1) )f x(m) (m) (m) f x = x f x(m) f x(m1) f x(m) f x(m1)
4 3

(a) f (x) = x4 + 3x3 + 2x + 1 x


(m+1)

=x

(m)

(x(m) x(m1) )(x(m) + 3x(m) + 2x(m) + 1) 4 3 4 3 (x(m) + 3x(m) + 2x(m) ) (x(m1) + 3x(m1) + 2x(m1) )

(b) f (x) = xe2x x + 1 x


(m+1)

=x

(m)

(x(m) x(m1) )(x(m) e2x x(m) + 1) (m) 2x(m) (x e x(m) + 1) (x(m1) e2x(m1) x(m1) + 1)

(m)

(c) f (x) = cos x2 + x3 x(m+1) = x(m) (x(m) x(m1) )(cos x(m) + x(m) ) 2 3 2 3 (cos x(m) + x(m) ) (cos x(m1) + x(m1) )
2 3

4. Consider the following nonlinear vector function:


2 f 1 ( x) x1 x2 x3 x2 1 + x2 1.14 x1 x2 x2 F (x) = f2 (x) = 3 0.19 ex1 ex2 + x3 0.45 f 3 ( x)

Show the form of all the equations needed to perform the multi-variable Newton iteration formula for solving F (x) = 0. Do not solve the equations! Solution: From Taylor series, we have F (xroot ) = F (x0 ) + F (x0 )(xroot x0 ) + O((xroot x0 )2 ) = 0
2

F ( x0 ) + Find F (x0 )

F (x0 )(x1 x0 ) = 0 F (x0 )1 F (x0 ) f1 (x0 ) x2 f2 (x0 ) x2 f3 (x0 ) x2 f1 (x0 ) x3


f3 (x0 )

x1 = x0

f1 (x0 ) x1 F (x0 ) =
f2 (x0 ) x1 f3 (x0 )

f2 (x0 ) x3 x3

x1

x2 x3 2x1 x1 x3 + 2x2 x1 x2 x2 x1 2x3 = x1 ( e x2 ) 1 e x1 = x0

F (x0 )1 F (x0 )
1 0 0 0 2 02 x x x x0 1 + x2 1.14 1 2 3 0 02 x0 1 x2 x3 0.19

0 0 0 0 0 0 0 x0 2 x3 2 x1 x1 x3 + 2 x2 x1 x2 x0 x0 2x0 = x0 2 1 3 0 ex1 e( x0 1 2)

ex1 ex2 + x0 3 0.45