TMA4125 Matematikk 4N Spring 2017

TMA4125 Matematikk
4N
Spring 2017
Norwegian University of Science
and Technology
Institutt for matematiske fag
1
Solutions to exercise set 8
a) We begin by noting that all of the schemes are valid in the sense that a fixed
point of each will be a root of the given polynomial. It remains to check for
convergence by computing the derivatives. We first consider
xn+1 = x3n − 1,
i.e. xn+1 = g(xn ), where g(x) = x3 −1. Then g 0 (x) = 3x2 , and hence |g 0 (x)| > 1
on the whole of the interval [1, 1.5]. Hence this scheme will not converge. Next
we look at
−2
xn+1 = x−1
n + xn
so g(x) = x−1 + x−2 , and g 0 (x) = −x−2 − 2x−3 . Then g 0 is increasing on [1, 1.5],
and g(1.5) = −1.1, i.e. |g 0 (x)| > 1 on [1, 1.5], and this will not converge either.
It remains to check
1
xn+1 = (xn + 1) 3 ,
2
for which we find g 0 (x) = 31 (x + 1)− 3 . This is decreasing and greater than
zero on [1, 1.5]. As g 0 (x) = 0.2099..., we have |g 0 (x)| ≤ 0.21 < 1 on [1, 1.5].
Moreover, since g(x) is increasing each application of g keeps us in the interval
[1, 1.5] where |g 0 (x)| ≤ 0.21, hence we have convergence.
b) We find the following sequence of values: x0 = 1, x1 = 1.2599, x2 = 1.3122, x3 =
1.3223, x4 = 1.3242. As the first three digits of x3 and x4 are equal, we conclude
that x = 1.32 to 3 significant digits.
2
a) As f (x) = xm − a, we have f 0 (x) = mxm−1 . Then
g(x) = x −
b) Now
ie
√
3
f (x)
xm − a
1
a
=
x
−
= x(1 − ) +
0
m−1
f (x)
mx
m
mxm−1
2 solves x3 − 2 = 0, so we use the above scheme with m = 3 and a = 2,
2
1
xn+1 = (xn + 2 )
3
xn
As an illustration, we start at x0 = 1, although other initial values are possible.
We then find x1 = 1.3333, x2 = 1.2639, x3 = 1.2599, x4 = 1.2599, i.e x = 1.2599
to 5 significant figures.
1
c) For the estimate, we Taylor expand about the solution s = a m . Then
1
xn+1 = g(s − n ) = g(s) − g 0 (s)n + g 00 (s)2n + . . .
2
March 5, 2017
Page 1 of 3
Solutions to exercise set 8
Now g(s) = s and g 0 (s) = 0, hence we find
1
n+1 = s − xn+1 ≈ g 00 (s)2n
2
It remains to compute the second derivative. Then
a(1 − m) −m
1
0
+
x
g (x) = 1 −
m
m
1
1
and hence g 00 (x) = a(m − 1)x−m−1 . Setting in s = a m gives s−m−1 = a−1 a− m ,
and hence
1 00
m−1 −1
g (s) =
a m
2
2
i.e. we obtain an estimate
n+1 ≈ −
3
m−1 −1 2
a m n
2
a) Here f (x) = x2 − 4x + 1 = 0, and for the secant method we have
xn+1 = xn − f (xn )
xn − xn−1
f (xn ) − f (xn−1 )
Now f (xn ) − f (xn−1 ) = x2n − x2n−1 − 4xn + 4xn−1 , so we can use the suggested
factorization to find
xn − xn−1
1
=
f (xn ) − f (xn−1 )
(xn + xn−1 − 4)
It follows that
xn+1 =
xn xn−1 − 1
xn (xn + xn−1 − 4) − x2n + 4xn − 1
=
xn + xn−1 − 4
xn + xn−1 − 4
b) Implementing the above three times with x0 = 5, x1 = 4 gives x2 = 3.8, x3 =
3.7368, x4 = 3.7321, x5 = 3.7320 (performed in exact arithmetic, but rounded
to 5 significant digits).
4
a) We begin by computing the Jacobian of the mapping
! ∂
∂
(x
−
cos
y)
(x
−
cos
y)
1
sin y
∂x
∂y
DF = ∂
=
∂
sin x
1
∂x (x − cos y) ∂y (y − cos x)
We then have
DF
−1
1
=
1 − sin x sin y
1
− sin y
− sin x
1
Newtons method is then
1
xn+1
xn
1
− sin yn
xn − cos yn
=
−
yn+1
yn
1
yn − cos xn
1 − sin xn sin yn − sin xn
March 5, 2017
Page 2 of 3
Solutions to exercise set 8
and hence
1
xn (1 − sin xn sin yn ) − (xn − cos yn ) + sin yn (yn − cos xn )
xn+1
=
yn+1
1 − sin xn sin yn yn (1 − sin xn sin yn ) + sin xn (xn − cos yn ) − (yn − cos xn )
which on rearranging gives
1
xn+1
cos yn + (yn − xn sin xn − cos xn ) sin yn
=
yn+1
1 − sin xn sin yn cos xn + (xn − yn sin yn − cos yn ) sin xn
b) Performing three iterations from x0 = 0, y0 = 1 using the above formula
gives x1 = 0.5403, y1 = 1, then x2 = 0.7516, y2 = 0.7488, and at last x3 =
0.7391, y3 = 0.7391 (working to 4 significant figures).
March 5, 2017
Page 3 of 3