









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Numerical Computing S’09 MATH/CSCI 4800- Homework-2 Solutions
(a) Let f (x) = ln x + x^2 − 3. Since f (1) = −2 and f (2) = ln 2 + 1 > 0 , a root lies in the bracket [1, 2]. (b) The first approximation to the root is
r 1 =
with error estimate e 1 =
Now, f (3/2) = ln(3/2) − 3 /4 = − 0. 3445 < 0. Therefore, the root lies in the bracket [3/ 2 , 2]. The second approximation to the root is
r 2 =
with error estimate e 2 =
Finally, f (7/4) = ln(7/4)+49/ 8 −3 = 3. 685 > 0. Therefore, the root lies in the bracket [3/ 2 , 7 /4]. The third approximation to the root is
r 2 =
with error estimate e 3 =
Thus the answer is 13/8 = 1. 625.
(a) Conditioning refers to the sensitivity of a mathematical problem to small disturbances in input. A mathematical problem is ill-conditioned if small disturbances in input (or backward error) correspond to large disturbances in output (or forward error). Conditioning is an attribute of the mathematical problem itself, and is independent of the numerical algorithm chosen to solve the problem. (b) The exact root of f (x) is x∗ = 1/ 3 and the approximate root xc = 0. 3333. Therefore the forward error is ef = |x∗ − xc| = | 1 / 3 − 0. 3333 | = 0. 00003333.... The perturbed function whose root is xc is given by f (x) − f (xc), yielding a backward error of eb = |f (xc)| = |f (0.3333)|. (i) For f (x) = 3x − 1 , eb = |3(0.3333) − 1 | = 0.0001 = 10−^4. (ii) For f (x) = (3x − 1)^2 , eb = |[3(0.3333) − 1]^2 | = 10−^8. (iii) For f (x) = (3x − 1)^3 , eb = |[3(0.3333) − 1]^3 | = 10−^12. (iv) For f (x) = (3x − 1)( 1 /3), eb = |[3(0.3333) − 1]( 1 /3)| = 10−^4 /^3 = 0. 0464.... Case (iii) is the most ill-conditioned as it has the largest ratio of forward error to backward error. (c) Since x^2 sin x^2 = x^4 sin x^2 x^2 and limx→ 0 sin(x^2 )/x^2 = 1, the multiplicity of the root r = 0 is 4. For the approximate root xc = 0. 01 , the forward error is ef = |r − xc| = 0. 01. The backward error is eb = |f (xc)| = 0 .0001 sin(0.0001) ≈ 10 −^8. The large forward error to backward error ratio makes the probelem ill-conditioned.
(b) Text: Section 1.4, Page 63, Problem 4(b).
(a) We have f (x) = x^2 +
x + 1 − 3 x, f ′(x) = 2x −
(x + 1)^2
so that Newton’s method becomes
xn+1 = xn −
f (xn) f ′(xn)
= xn −
x^2 n + (^) xn^1 +1 − 3 xn 2 xn − (^) (xn+1)^12 − 3
With x 0 = 1 the next two iterates turn out to be x 1 = − 0. 2 , x 2 = 0. 180856. (b) We have f (x) = x^3 − x^2 − 5 x − 3 = 0. The two roots are (i) r = −1 and (ii) r = 3. Note that
f ′(x) = 3x^2 − 2 x − 5 ,
and that f ′(−1) = 3 + 2 − 5 = 0 while f ′(3) = 27 − 6 − 5 = 16 6 = 0. Thus 3 is a root with multiplicity 1 while -1 is a root with multiplicity greater than 1. Since f is a cubic and has only 3 roots, -1 must be a root with multiplicity 2. According to Theorem 1.11, when f ′(r) 6 = 0 the convergence is quadratic and the errors en satisfy lim n→∞
en+ e^2 n
f ′′(r) 2 f ′(r) This theorem will apply to the single root r = 3. We already have f ′(3) = 16. Also, f ′′^ = 6 x − 2 = 16 for r = 3. Therefore M = 16/(2 × 16) = 12. To the multiple root r = −1 we apply Theorem (1.12), which says that for a root with multiplicity m, lim n→∞
en+ en
m − 1 m
Here, m = 2 so that S = 1/ 2.
(a) When compared to bisection, the secant method converges more rapidly (advantage) but like Newton’s method, may not converge at all if initial guesses are not sufficiently close to the root (disadvantage). When compared to Newton’s method, the secant method does not require evaluation of the derivative (advantage) but has a slower rate of convergence (disadvantage). (b) In the block of numbers [1, 2], the separation between adjacent machine numbers is mach = 1 / 2 p−^1 for a machine with precision p. Therefore, this is also the smallest sensible tolerance to apply. Starting with a bracket of length unity, the first approximation to the root has an error bound of 1/ 2. After one interval halving the error bound becomes 1/ 22 , and so on. Therefore, after p − 2 interval halvings the error bound will be 1/ 2 p−^1.
(b) Plot a semilog graph to show the variation of β 1 with α.
You may use a rootfinder of your choice (bisection, Newton or secant). Supply the Matlab scripts, a well-labelled graph, well-formatted numerical output, and a brief explanation. It will be useful to plot the graph of f (βn) for each α to get a rough sense of where the root lies. Accuracy to 3 digits will suffice.
alpha
frequency
Fundamental Frequency versus alpha