Numerical Analysis I, Fall 2017 (http://www.math.nthu.edu.tw/˜ wangwc/)

Quiz 04

Nov 24, 2017.

1. Give an approximation, f′′_{h}(x), of of f′′(x) from f(x − h), f(x) and f(x + h). Then derive an error identity of the form f′′(x) − f′′_{h}(x) = C_{1}f^{(?)}(ξ)h^{?}.

Ans: Refer to the textbook for the derivation of error term. (12 pts)

f′′_{h}(x) = \frac{1}{h^{2}} [f(x − h) − 2f(x) + f(x + h)] (4 pts)

f′′(x) − f′′_{h}(x) = C_{1}f^{(4)}(ξ)h^{2} (4 pts)

2. Find min_{h>0} e(h) = min_{h>0} |f′′(x)−f′′_{h}(x)| where f′′_{h}(x) is the three point formula from previous problem. Express the critical value h^{∗} and the minimum e(h^{∗}) in terms of machine ε as O(ε^{α}) and find α for them.

Ans: The round-off error is bounded by

\frac{4ϵ}{h^{2}} + \frac{h^{2}}{12}M

where M is an upper bound of |f^{(4)}|. (12 pts) Thus, the optimal h^{∗} = O(ϵ^{1/4}) (4 pts) and e(h^{∗}) = O(ϵ^{1/2}) (4 pts).

3. Derive a fourth order approximation of f′(x) from f(x), f(x ± h), f(x ± 2h), f(x ± 3h), · · ·. Assume f ∈ C^{∞} and show that your formula satisfies |f′(x) − f′_{h}(x)| ≤ Ch^{4}.

Ans: Refer to the textbook for the derivation of approximation. (12 pts)

f′_{h}(x) = \frac{1}{12h}[f(x − 2h) − 8f(x − h) + 8f(x + h) − f(x + 2h)] (4 pts)

Show the inequality of error term. (4 pts)

4. Let x_{0} = a, x_{1} = \frac{a+b}{2}, and x_{2} = b. Write down trapezoidal rule, the midpoint rule and Simpson’s rule approximations of ∫_{a}^{b} f(x)dx. Then derive the error formula (equality) for any one of them of your choice.

Ans: Refer to the textbook for the derivation of error term (4 pts). Error term (4 pts). Trapezoidal: \frac{h}{2}[f(x_{0}) + f(x_{2})] where h = b − a (4 pts). Error: −\frac{h^{3}}{12}f′′(ξ). Midpoint: 2hf(x_{1}) where h = (b − a)/2 (4 pts). Error: \frac{h^{3}}{3} f′′(ξ). Simpson’s: \frac{h}{3}[f(x_{0}) + 4f(x_{1}) + f(x_{2})] where h = (b − a)/2 (4 pts). Error: −\frac{h^{5}}{90}f^{(4)}(ξ).

5. Evaluate the degree of precision for all three methods in previous problem. Give definition and show details. You may choose any a, b for your convenience (−1, 1 are recommended).

Ans: Definition of degree of precision. (5 pts) Trapezoidal: DOP=1, details. (5 pts) Midpoint: DOP=1, details. (5 pts) Simpson’s: DOP=3, details. (5 pts)

Quiz 04

Nov 24, 2017.

1. Give an approximation, f′′_{h}(x), of of f′′(x) from f(x − h), f(x) and f(x + h). Then derive an error identity of the form f′′(x) − f′′_{h}(x) = C_{1}f^{(?)}(ξ)h^{?}.

2. Find min_{h>0} e(h) = min_{h>0} |f′′(x)−f′′_{h}(x)| where f′′_{h}(x) is the three point formula from previous problem. Express the critical value h^{∗} and the minimum e(h^{∗}) in terms of machine ε as O(ε^{α}) and find α for them.

3. Derive a fourth order approximation of f′(x) from f(x), f(x ± h), f(x ± 2h), f(x ± 3h), · · ·. Assume f ∈ C^{∞} and show that your formula satisfies |f′(x) − f′_{h}(x)| ≤ Ch^{4}.

4. Let x_{0} = a, x_{1} = \frac{a+b}{2}, and x_{2} = b. Write down trapezoidal rule, the midpoint rule and Simpson’s rule approximations of ∫_{a}^{b} f(x)dx. Then derive the error formula (equality) for any one of them of your choice.

5. Evaluate the degree of precision for all three methods in previous problem. Give definition and show details. You may choose any a, b for your convenience (−1, 1 are recommended).