

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!


x 0 0. 5 +
f (x) 1 3
f ′ (x) ∫ (^1)
0 f (x) dx ≈
Solution: All answers end up being 2.
The easy way: the best we can do is assume f (x) is a line, so let f (x) = 1 + 2x and fill the boxes.
Harder method:
Estimate f (0.5) by linear interpolation (i.e., averaging): f (0.5) ≈
1+ 2
Estimate f
′ (0), f
′ (0.5), and f
′ (1) with the forward-, centered-, and backward-difference formulas
(with h = 0.5 in the case of f
′ (0.5)). They all end up calculating the same thing: the slope
3 − 1 1
Estimate
1 0
f (x) dx with the trapezoidal rule:
1 2
0
f (x) dx, with step size h.
You have measured T (0.2) = 3.0 and T (0.1) = 3.3. Assume that the composite trapezoidal rule
makes error
0 f (x) dx − T (h) ≈ Kh
2 (for a non-zero constant K).
(a) Estimate the exact value of
1 0
f (x) dx as accurately as possible.
(b) Estimate the absolute error
1 0
f (x) dx − T (0.1)
∣ as accurately as possible.
(c) Estimate how small h must be for T (h) to approximate
0 f (x)dx to within 10
− 3
Solution: 3. 0 − 3. 3 ≈ K(0.2)
2 − K(0.1)
2 = 0. 03 K, so K ≈
− 0. 3
(a)
1 0
f (x) dx ≈ T (0.1) − K(0.1)
2 = 3..
(b)
1 0
f (x) dx − T (0.1)
2 | = 0..
(c) |Kh
2 | < 10
− 3 ⇐⇒ h
2 < 10
− 4 ⇐⇒ h < 10
− 2 .
values of a and b:
− 1
f (x) dx ≈ af
Solution:
Degree of precision ≥ 0 , if 2 a + b =
− 1
x
0 dx = 2 (∗)
Degree of precision ≥ 1 , if 0 =
1
− 1
x
1 dx = 0 (trivial)
Degree of precision ≥ 2 , if 2
a =
− 1
x
2 dx =
Date: Tuesday 7/28.
1
By (∗∗), a =
. By (∗), b =
. We may now check:
Degree of precision ≥ 3 , if 0 =
1
− 1
x
3 dx = 0 (true)
Degree of precision ≥ 4 , if 2
1
− 1
x
4 dx =
(false)
Therefore, the degree of precision is 3.
(a) Fill in the blanks using Euler’s method:
t 0. 0 1. 0 2. 0 3. 0 4. 0
y(t) 0. 0
(b) Find a Lipschitz constant L for the problem.
(c) Find a formula for y
′′ in terms of t and y.
(d) Redo (a) with a Taylor method, order 2.
Solution:
(a) The iteration is wi+1 = wi + (1)(t 2 i
t 0. 0 1. 0 2. 0 3. 0 4. 0
y(t) 0 0 1 7 30
(b)
∂ ∂y (t
2
∣ = 2 is bounded above by L = 2.
(c) y ′′ =
d dt
(t 2
2
(d) The iteration is wi+1 = wi + (1)(t 2 i
(1) 2
2
2(t 2
t 0. 0 1. 0 2. 0 3. 0 4. 0
y(t) 0 0 3 25 146
wi+1 = wi + hf (ti + h, wi).
Solution: Compute Taylor terms...
... for y(ti + h) (using Taylor series for y(t)
centered at ti):
y(t) = y(t)
→ wi
y
′ (t) = f (t, y(t))
→ f (ti, wi)h
y
′′ (t) = ft(t, y(t)) + fy (t, y(t))f (t, y(t))
→ [ft(ti, wi) + fy (ti, wi)f (ti, wi)]
h 2
... for wi+1 (as a function of h):
wi+1 = wi + hf (ti + h, wi)
→ wi
w
′ i+1 =^ f^ (ti^ +^ h, wi) +^ hft(ti^ +^ h, wi)
→ f (ti, wi)h
w
′′ i+ = 2ft(ti + h, wi) + hftt(ti + h, wi)
→ [2ft(ti, wi)]
h 2
Since the degree-2 Taylor terms don’t match, yi+1 − wi+1 = O(h
2 ). Thus τi+1 = O(h).
2