Spring 2004 David M. Rocke EAD 115 April 27, 2004
Spring 2004 David M. Rocke EAD 115 April 27, 2004
Midterm Examination
NAME
For all problems on this midterm examination, we will use the function
.
1. Compute the 0 through third order Taylor series approximations of f (1) at
x = 0 (i.e., the Maclaurin series). Compute the true absolute error Et and the
approximate relative error Ea in each case, where the latter is obtained from
the change in the approximation from one iteration to the next.
Solution We have
fˆ0 (1) = 6
fˆ1 (1) = 6 − 11(1) = −5
fˆ2 (1) = 6 − 11(1) − (1/2)(6)(1) = −8
fˆ3 (1) = 6 − 11(1) − (1/2)(6)(1) + (1/6)(12)(1) = −6
The respective true absolute errors are 12, 1, 2, and 0, while the estimated
absolute errors of the last three are 11, 3, and 2 (the first one has no estimated
error since there is no previous approximation).
NAME 2
f (1) = −6
f (.9) = −4.872
f (1.1) = −7.068
f (1) = −11
(−7.068) − (−6)
fˆF (1) = = −10.68, |Et| = 0.32
0.1
(−6) − (−4.872)
fˆB (1) = = −11.28, |Et| = 0.28
0.1
(−7.068) − (−4.872)
fˆC (1) = = −10.98, |Et| = 0.02
0.2
The centered difference quotient, which has error O(h2 ), has a much smaller
true error than the forward and backward difference quotients, which have
O(h) error.
NAME 3
3. Verify by the signs of the function values that a root of f (x) lies between
0.2 and 0.7. Perform three iterations of the bisection algorithm to obtain an
approximate answer. What is the estimated absolute error in each case? If
the true root is 0.5, what is the true absolute error?
Solution Here are the iterates. Note that the first two are of opposite signs
as required:
f (0.2) = 3.696
f (0.7) = −2.484
f (0.45) = 0.62475, Et = 0.05, Ea = 0.25
f (0.575) = −0.9366, Et = 0.075, Ea = 0.125
f (0.5125) = −0.15625, Et = 0.0125, Ea = 0.0625
NAME 4
4. Using the same starting interval of 0.2 to 0.7, perform two iterations of the
false position algorithm (use 6 significant figures). What are the estimated
and true absolute errors at the second iteration?
Solution We have
f (0.2) = 3.69600
f (0.7) = −2.48400
5. One can construct a fixed point iteration for a root of f (x) as follows:
Show that this will converge if the iterations are started sufficiently close to
x = 0.5. Perform two iterations of the algorithm starting at x = 1. Find the
true and estimated absolute errors in each case.
Solution This will converge when |g (x)| < 1, where g(x) = (2x3 − 3x2 +
6)/11. We have g (x) = (6x2 − 6x)/11 = 6(x2 − x)/11. At x = 0.5, this is
(6/11)(−1/4) = −3/22 = −0.13636 < 1. All this, so long as the starting point
is near enough to 0.5.1
x0 = 1, |Et| = 0.5
x1 = 5/11 = 0.45454, |Et| = 0.04545 |Ea| = .54545
x2 = 0.50618 |Et| = 0.00618 |Ea| = .05164
1
The derivative is less than 1 in absolute value so long as the starting value is between -0.943
and 1.943, but the fixed point iteration actually converges for a larger region. There are three roots
to f (x), which are -2, 0.5, and 3. If the starting iterate is between -2 and 3, the iterations converge
to the root x = 0.5. If the starting point is larger than 3 or smaller than -2, it diverges.
6. Perform two iterations of Newton-Raphson to find a root of f (x) starting at
x = 1. Carry six significant figures. Find the true and estimated absolute
errors in each case.
Solution We have
Then
x0 = 1
f (x0 ) = −6
f (x0 ) = −11
x1 = x0 − f (x0 )/f (x0 )
= 1 − (−6)/(−11)
= 0.454545 |Et| = 0.045454 |Ea| = 0.5454
f (x1 ) = 0.567994
f (x1 ) = −12.48760
x2 = 0.454545 − 0.567994/(−12.48760)
= 0.500030 |Et| = 0.000030 |Ea| = 0.4548