Homework Assignment #2
Homework Assignment #2
Homework Assignment #2
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Homework</strong> <strong>Assignment</strong> <strong>#2</strong><br />
2-1 Use the Bisection method to find p n , n = 1, 2, ..., 10 for f(x) = √ x − cos x on [0, 1]. (Algorithm 1)<br />
2-2 Find an approximation to √ 3 correct to within 10 −4 using the Bisection Algorithm. [Hint: Consider<br />
f(x) = x 2 − 3.]<br />
2-3 Use the fixed-point iteration method to find an approximation to √ 3 that is accurate to within 10 −4 .<br />
Compare your result and the number of iterations required with the answer obtained in the Bisection<br />
Algorithm.<br />
2-4 (i) Use the following algebraic manipulation to show that each has a fixed point at p precisely when<br />
f(p) = 0, where f(x) = x 4 + 2x 2 − x − 3.<br />
(a) g 1 (x) = (3 + x − 2x 2 ) 1/4 (b) g 2 (x) =<br />
(c) g 3 (x) =<br />
(<br />
x + 3 − x<br />
4<br />
2<br />
) 1/2<br />
( ) x + 3 1/2<br />
x 2 (d) g 4 (x) = 3x4 + 2x 2 + 3<br />
+ 2<br />
4x 3 + 4x − 1<br />
(ii) Perform four iterations, if possible, on each of the function g i . Let p 0 = 1 and p n+1 = g(p n ), for<br />
n = 0, 1, 2, 3. which function do you think gives the best approximation to the solution.<br />
(Algorithm 2)<br />
2-5 (i) Show that if A is any positive number then the sequence defined by<br />
converges to √ A whenever x 0 > 0.<br />
(ii) What happens if x 0 < 0 ?<br />
x n = 1 2 x n−1 +<br />
A<br />
2x n−1<br />
, for n ≥ 1,<br />
2-6 Let f(x) = x 2 − 6 and p 0 = 1. Use Newton’s method to find p 2 .<br />
2-7 Let f(x) = x 2 − 6 and p 0 = 3, p 1 = 2, find p 3 .<br />
(a) Use the Secant method.<br />
(b) Use the method of False Position.<br />
(c) Which of (a) or (b) is closer to √ 6.<br />
2-8 Suppose p is a zero of multiplicity m of f, where f ′′′ is continuous on an open interval containing p.<br />
Show that the following fixed-point method has g ′ (p) = 0:<br />
g(x) = x − mf(x)<br />
f ′ (x)<br />
2-9 Show that the Bisection Algorithm gives a sequence with an error bound that converges linearly to 0.<br />
2-10 Use Steffensen’s method with p 0 = 2 to compute an approximation to √ 3 accurate to within 10 −4 .<br />
Compare your result and the numbers of iterations required with the answer obtained in the Bisection<br />
Algorithm and fixed-point iteration method.<br />
2-11 The following sequences converge to 0. Use Aitken’s ∆ 2 method to generate {̂p n } until |̂p n | ≤<br />
5 × 10 −2 : (a) p n = 1 n , n ≥ 1. (b) p n = 1 n 2 , n ≥ 1.<br />
1
Solutions for <strong>Homework</strong> <strong>Assignment</strong> <strong>#2</strong><br />
2-1<br />
n p n f(p n ) n p n f(p n )<br />
1 0.5 −0.170476 6 0.640625 −0.00133182<br />
2 0.75 0.134337 7 0.648438 0.00822774<br />
3 0.625 −0.0203937 8 0.644531 0.00344555<br />
4 0.6875 0.0563213 9 0.642578 0.00105626<br />
5 0.65626 0.0178067 10 0.641602 −0.000137933<br />
2-2 p 13 = 1.7320557, p = 1.732050807568877, and |p − p 13 | = 4.86 × 10 −6 .<br />
2-4<br />
(a) p n f(p n ) (b) p n f(p n )<br />
0 1.18921 0.63922 0 1.22474 1.02526<br />
1 1.08006 −0.386228 1 0.993666 −1.04402<br />
2 1.14967 0.240826 2 1.22857 1.06842<br />
3 1.10782 −0.147105 3 0.987506 −1.08621<br />
(c) p n f(p n ) (d) p n f(p n )<br />
0 1.1547 0.289744 0 1.14286 0.175344<br />
1 1.11643 −0.0700688 1 1.12448 0.0032932<br />
2 1.12605 0.0177429 2 1.1241231639 1.23208 × 10 −6<br />
3 1.12364 −0.00444148 3 1.124123029704334 1.72659 × 10 −13<br />
Hence the (d) is the best iterative function.<br />
2-5 (i) Since A > 0 and x 0 > 0, x 1 = 1 2 x 0 + A<br />
2x 0<br />
> 0. Then x n > 0 for all n. Suppose x n converges to p ≥ 0, then<br />
p = 1 2 p + A 2p ⇒ p = √ A.<br />
(ii) If x 0 < 0, then x 1 = 1 2 x 0 + A<br />
2x 0<br />
< 0. Then x n < 0 for all n. Then x n converges to p ≤ 0, then<br />
p = 1 2 p + A 2p ⇒ p = −√ A.<br />
2-6 f(x) = x 2 − 6, f ′ (x) = 2x, and p 0 = 1, the Newton’s method p n+1 = p n − f(p n)<br />
f ′ (p n ) . Then p 1 = 1 − f(1)<br />
f ′ (1) = 3.5<br />
and p 2 = 3.5 − f(3.5)<br />
f ′ (3.5) = 2.607. (The exact solution √ 6 ≈ 2.4494897)<br />
2-7 The Secant method and False Position is p n = p n−1 − f(p n−1)(p n−1 − p n−2 )<br />
, p 0 = 3, p 1 = 2.<br />
f(p n−1 ) − f(p n−2 )<br />
(a) p 0 = 3, p 1 = 2, f(p 0 ) = 3 and f(p 1 ) = −2. Then p 2 = p 1 − f(p 1)(p 1 − p 0 )<br />
f(p 1 ) − f(p 0 ) = 2.4, and f(p 2) = −0.24.<br />
Then we have p 3 = p 2 − f(p 2)(p 2 − p 1 )<br />
f(p 2 ) − f(p 1 ) = 2.45454.<br />
(b) As in the Secant method. Since f(p 1 ) < 0 and f(p 2 ) < 0, then p 3 = p 2 − f(p 2)(p 2 − p 0 )<br />
f(p 2 ) − f(p 0 ) = 2.44444.<br />
The exact solution √ 6 ≈ 2.4494897. Hence (b) is closer to √ 6.<br />
2-8 f(x) = (x − p) m q(x) where lim q(x) ≠ 0. Then<br />
x→p<br />
m(x − p) m q(x)<br />
g(x) = x −<br />
m(x − p) m−1 q(x) + (x − p) m q ′ (x) = x − m(x − p)q(x)<br />
mq(x) + (x − p)q ′ (x) .<br />
Therefore, g ′ (p) = 1 − mq(p)[mq(p)]<br />
[mq(p)] 2<br />
= 0. If f ′′′ is continuous, the sequence produces quadratic convergence.<br />
p − p n+1 (b − a)/2 n+1<br />
2-9 lim = lim<br />
n→∞ p − p n n→∞ (b − a)/2 n = 1 . Then the Bisection Algorithm is linearly convergence.<br />
2<br />
2-10 For g(x) = 0.5(x + 3 x ) and p 0 = 0.5, then p 4 = 1.73205.<br />
2-11 (a) ˆp 10 = 0.0 ¯45, (b) ˆp 2 = 0.0363.<br />
2