


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 Analysis I Midterm Exam Solutions CMSC 666 / MAPL 666 Fall 2008
1a. The existence of p 2 follows from the Lagrange form of the interpolating polynomial, and uniqueness from the fundamental theorem of algebra.
b. For j = 0, we have the error formula
|f (x) − p 2 (x)| =
∣x^
x − h 2
(x − h) f^
′′′(ξx) 3!
∣ for some^ ξx ∈^ (0, h)
≤ 144 K√ 3 h^3 ,
which implies that α 0 = 3.
For j = 1, the function e 0 (x) = f (x) − p 2 (x) has zeros at three points 0, h/ 2 and h, so that e′ 0 (x) = f ′(x) − p′ 2 (x) has zeros at two points, say ˆx 0 and ˆx 1 , in (0, h). That is, p′ 2 is a linear polynomial that interpolates f ′^ at ˆx 0 and ˆx 1. This leads to the error formula
f ′(x) − p′ 2 (x) = (x − xˆ 0 )(x − xˆ 1 )
f ′′′(ζx) 2
and
|f ′(x) − p′ 2 (x)| ≤
|f ′′′(ζx)| 2
h^2 ,
giving α 1 = 2. Similarly, for j = 2, e 1 (x) = f ′(x) − p′ 2 (x) has two zeros in (0, h), so that e′ 1 has one zero. That is, p′′ 2 interpolates f ′′^ at one point ˜x 0 , and
f ′′(x) − p′′ 2 (x) = (x − x˜ 0 )f ′′′(ηx),
|f ′′(x) − p′′ 2 (x)| ≤ Kh,
with α 2 = 1.
2a. The trapezoidal rule is
Q(f ) =
(β − α) 2 (f (α) + f (β)).
The error formula, as derived in class from the interpolation error formula, is
I(f ) − Q(f ) = −h^3 f ′′(η) 12
2b. The variant rule Qˆ(f ) satisfies
I(f ) − Qˆ(f ) = −
h^3 8
f ′′(η 1 ) + f ′′(η 2 ) 12
2c. Let xm = (α + β)/2 be the midpoint. Assuming the third derivative of f is continuous, we can write
f ′′(η) = f ′′(xm) + O(h/2), f ′′(η 1 ) = f ′′(xm) + O(h/2), f ′′(η 2 ) = f ′′(xm) + O(h/2),
Therefore
I(f ) − Q(f ) = −
h^3 f ′′(xm) + O(h^4 ),
and
I(f ) − Qˆ(f ) = −
h^3 8 2 f ′′(xm) + O(h^4 ) = −
h^3 4 f ′′(xm) + O(h^4 ).
If we ignore the high-order (O(h^4 )) terms in the two expressions above, we have
I(f ) − Qˆ(f ) ≈
(I(f ) − Q(f )).
Equivalently,
4(I(f ) − Qˆ(f )) ≈ (I(f ) − Q(f )) = (I(f ) − Qˆ(f )) + ( Qˆ(f ) − Q(f )),
which implies that
(I(f ) − Qˆ(f )) ≈
( Qˆ(f ) − Q(f )).
Thus, the expression on the right here, which is computable, can be used to estimate the error for the refined rule.
d. An adaptive rule for computing I(f ) ≡
∫ (^) b a f^ (x)dx^ can be designed as follows. Suppose we wish to make the error I(f ) − Q(f ) less than some tolerance τ. Apply the rule (trapezoidal, in this case) and the combined rule from part (b) on the interval [a, b], and compute the error estimate. If this estimate is less than τ in absolute value, then accept the result. If not, divide the interval in half and repeat this strategy on both the left and right half-intervals, with tolerance τ /2. Continue this procedure in a recursive manner. If the estimate is accurate, then for fine enough intervals the tolerances will eventually be satisfied and the global error will be forced to be less than τ. In practice, the result is only accepted with a tolerance somewhat smaller than τ to try to compensate for the fact that the error is only being estimated.
3a. Application of the power method to A produces the eigenvalue of A with largest modulus. If that eigenvalue is negative, then it is the leftmost eigenvalue sought. If it is positive, call it σ. The eigenvalues of the shifted matrix A−σI are λ − σ where λ is an eigenvalue of A. The one with largest modulus is λlef t − σ, which can also be found by the power method; λlef t can be recovered by adding
The result follows by dividing by n^2.
b. It follows from the first identity of part (a) that f (x) =
∑n j=0 f^ (x)βn,j^ (x). Therefore
f (x) − pn(x) =
∑^ n
j=
[f (x) − f (xj )] βn,j (x). (2)
Since f is continuous, given > 0, there exists δ such that
|f (x) − f (x′)| ≤ 2 whenever |x − x′| ≤ δ.
Write (2) as
f (x) − pn(x) =
∑^ n
j s.t.|x−xj |≤δ
[f (x) − f (xj )] βn,j (x) +
∑^ n
j s.t.|x−xj |>δ
[f (x) − f (xj )] βn,j (x).
The absolute value of the first sum here is bounded by
∑^ n
j s.t.|x−xj |≤δ
|f (x) − f (xj )| βn,j (x) ≤
∑^ n
j=
βn,j (x) =
(We are using the fact that βn,j (x) ≥ 0 to expand the sum to all indices here.)
For the second term, first let J be a shorthand notation for the set of indices j involved, i.e., where |x − xj | > δ. The fact that f is continuous on the closed interval implies that it is bounded, |f (x)| ≤ M for all x ∈ [a, b], which leads to
|f (x) − f (xj )| ≤ 2 M.
For j ∈ J , |x − xj | = |x − jn | > δ, which implies
( x − (^) nj
δ^2 or 1 < (^) δ^12
x − (^) nj
Using this, we have
∑
j∈J
βn,j (x) <
j∈J
1 δ^2
x − jn
βn,j (x)
< (^) δ^12
x^2
∑^ n
j=
βn,j (x) − 2 x
∑^ n
j=
j n βn,j^ (x) +
∑^ n
j=
j^2 n^2 βn,j^ (x)
= (^) δ^12
x^2 − 2 x^2 + (1 − (^) n^1 )x^2 + (^1) n x
= (^) δ^12 n^1 x(1 − x).
It follows that the second term is bounded above by
2 M nδ^2
x(1 − x) <
nδ^2
for all large enough n.