Soru
1. Let f(x)=sin(x) where x is measured in radians. (a) Calculate approximations to f'(0.8) using formula (3 ) with h=0.1,h=0.01 and h=0.001 Carry eight or nine decimal places. (b) Compare with the value f'(0.8)=cos(0.8) (c) Compute bounds for the truncation error (4). Use vert f^(3)(c)vert leqslant cos(0.7)approx 0.764842187 for all cases.
Çözüm
4.7
(273 Oylar)
Bilal
Uzman · 3 yıl öğretmeni
Uzman doğrulaması
Cevap
(a) To calculate approximations to
using the formula (3), we can use the forward difference formula:
Let's calculate the approximations for
,
, and
:For
:
For
:
For
:
(b) Comparing the approximations with the value
, we have:
\vert f'(x) - f'(x)\vert \leq \frac{h^2}{6}\vert f^{(3)}(c)\vert
f'(x)
f'(x)
h
c
[x, x+h]
\vert f^{(3)}(c)\vert \leqslant \cos(0.7) \approx 0.764842187
\vert f'(0.8) - \cos(0.8)\vert \leq \frac{h^2}{6}\cdot 0.764842187
h=0.1
\vert f'(0.8) - \cos(0.8)\vert \leq \frac{(0.1)^2}{6}\cdot 0.764842187 \approx 0.001271
h=0.01
\vert f'(0.8) - \cos(0.8)\vert \leq \frac{(0.01)^2}{6}\cdot 0.764842187 \approx 0.000127
h=0.001
\vert f'(0.8) - \cos(0.8)\vert \leq \frac{(0.001)^2}{6}\cdot 0.764842187 \approx 0.0000127$