Numerical Methods I - Solutions 2

MATH 3241 /EECS 3121 - Suggested Solutions for Practice Problem 2


For odd number questions you can find the solutions at the back of
text book. You need add more details following the hints below.
_________________________________________________________________

Sec 2.1, no 1

f(x)=sqrt(x)-cos(x), a1=0, b1=1.

f(a1)=-1<0, f(b1)=1-cos(1)=0.46>0;

p1=(a1+b1)/2=0.5, f(p1)=sqrt(0.5)-cos(0.5)=-0.17<0;

a2=p1=0.5, b2=b1=1, p2=(a2+b2)/2=0.75, f(p2)=0.13>0;

a3=a2=0.5, b3=p2=0.75, p3=(a3+b3)/2=0.625.
_________________________________________________________________

Sec 2.1, no 2

(a) p3=-0.6875 (b) p3=1.09375
_________________________________________________________________

Sec 2.1, no 11 

(a) 2   (b) -2  (c) -1  (d) 1
___________________________________________________________________

Sec 2.1, no 13

n>=12 & p12=1.3787

____________________________________________________________________

Sec 2.2, no 2

         a)    (a) p4=1.10782; (b) p4=0.987506; (c) p4=1.12364; (d) p4=1.12412

         b)    Part (d) gives the best answer since |p4-p3| is the smallest. 
_________________________________________________________________

Sec 2.2, no 7,

Use p_0=pi, p_1=pi+1/2,

|p_n-p|< k^n/(1-k)|p_1-p_0| = 2/3(1/4)^n< 0.01 -> n>=4. 

But p_3=3.626996 is accurate to within 0.01.
__________________________________________________________________

Sec 2.2, no 20 

         a)    p=limp_n=lim(2p_n-Ap^2_{n-1})=2p-Ap^2 -> p=1/A

         b)   any subinterval [c, d] of (1/(2A), 3/(2A)) containing 1/A.
_________________________________________________________________

Sec 2.2, no 23 

(a) Let g(x) = x/2 +1/x. If M is a number > sqrt(2), then g maps

[sqrt(2),M] onto [sqrt(2),M] and g'(x) = 1/2 - x^-2, so |g'(x)| <= 0.5 < 1

for x in [sqrt(2),M].  So, by Theorem 2.3, there is a unique fixed point

in [sqrt(2),M] and it can be got by iterating g starting at any point in

[sqrt(2),M].  Using L for this fixed point, we have x_n -> L and x_(n-1)

-> L. Using this in the formula x_n = x_(n-1)/2 +1/x_(n-1), we get L = L/2

+ 1/L. This gives L^2 = 2 and since L is in [1,M], we get L = sqrt(2). 

 

(b) We have, from the given fact, x_0^2 + 2 > 2 sqrt(2) x_0, and also 

x_1 = x_0/2 +1/x_0 gives          x_0^2 + 2 = 2 x_1 x_0, so we get

x_1 > sqrt(2)

 

(c) If x_0 > sqrt(2), then proceed as in (a). If 0 < x_0 < sqrt(2), then,

by (b), x_1 > sqrt(2) and we can proceed as in (a).
__________________________________________________________________

Sec 2.3, no 1

f(x)=x^2-6, f?(x)=2x

Newton? iteration:

p_{n+1}=p_n-[(p_n)^2-6]/2p_n=p_n/2+3/p_n.

p_0=1, -> p_1=1/2+3/1=7/2, 

-> p_2=(7/2)/2+3/(7/2)=7/4+6/7
____________________________________________________________________

Sec 2.3, no 3

         a)    2.45454; 

         b)    2.44444; 

         c)    Part (b) is better
____________________________________________________________________

Sec 2.3, no. 31 

This formula has subtraction of nearly equal numbers if p_{n-1} 

and p_{n-2} are nearly equal.
_______________________________________________________________

Sec 2.4, no.6 

(a) That the sequence converges linearly to 0 follows from 

p_{n+1}/p_n -> 1. In order to have 1/n <= 5*10^-2, we need n>=20.

(b) That the sequence converges linearly to 0 follows from 

p_{n+1}/p_n -> 1. In order to have 1/n^2 <= 5*10^-2, we need n>=sqrt(20)

or n>=5.

____________________________________________________________________

Sec 2.4, no 7

a.  Here p_{n+1)/(p_n)^2 -> 1 (in fact =1).

We have 

|10^(-2^(n+1)) - 0| / |10^(-2^n) - 0|^2 = 1 for all n so the result

follows from Definition 2.6

 

b. We have 

|10^(-(n+1)^k) - 0| / |10^(-n^k) - 0|^2 = 10^[2n^k - (n+1)^k]

and this approaches infinity as n approaches infinity. (Clearly the

exponent 2n^k - (n+1)^k which is equal to n^k[2-(1+1/n)^k] becomes

infinite as n becomes infinite. That is no positive constant exists to

satisfy Definition 2.6.
____________________________________________________________________

Sec 2.4, no 14

Let e_n=p_n-p, then |e_{n+1}| \approx lambda |e_n|^alpha

Since |e_{n+1}| \approx C |e_n||e_{n-1}|, we have

Lambda |e_n|^alpha \approx C|e_n|lambda^{-1/alpha)|e_n|^{1/alpha}

-> alpha=1+1/alpha -> alpha=(1+sqrt(5))/2.
_____________________________________________________________________