Weak 3
Weak 3
1 Introduction
Introduction
f (1.8 + h) − f (1.8)
h
With h = 0.1 gives:
ln 1.9 − ln 1.8 0.64185389 − 0.58778667
= = 0.5406722.
0.1 0.1
Because f (x) = − x12 and 1.8 < ξ < 1.9, a bound for this approximation
error is:
|hf ′′ (ξ)| |h| 0.1
= 2 < = 0.0154321.
2 2ξ 2(1.8)2
The approximation and error bounds when h = 0.05 and h = 0.01 are
found in a similar manner andNumerical
Mg. Dennis Quispe Sánchez
the results are shown in theMarch
Dierentiation
table.
23, 2024 8 / 22
Simulation
Since f ′ (x) = x1 , the exact value of f (1.8) is 0.555, and in this case, the
error bounds are quite close to the true approximation error.
n
(x − x0 ) . . . (x − xn )
f (n+1) (ξ(x)).
X
f ′ (x) = f (xk )L′k (x) + Dx
(n + 1)!
k=0
(x − x0 ) . . . (x − xn ) h (n+1) i
+ Dx f (ξ(x)) .
(n + 1)!
f (n+1) (ξ(xj )) Y
n
X n
′
f (xj ) = f (xk )L′k (xj ) + (xj − xk ),
(n + 1)!
k=0 k=0
k̸=j
1 3 1 h2
′
f (x0 ) = − f (x0 ) + 2f (x0 + h) − f (x0 + 2h) + f (3) (ξ0 ),
h 2 2 3
1 1 1 h2
′
f (x0 + h) = − f (x0 ) + f (x0 + 2h) − f (3) (ξ1 ),
h 2 2 6
and
1 1 3 h2
f (x0 + 2h) =
′
f (x0 ) − 2f (x0 + h) + f (x0 + 2h) + f (3) (ξ2 ).
h 2 2 3
As a matter of convenience, the variable substitution x0 for x0 + h is used in
the middle equation to change this formula to an approximation for f ′ (x0 )
and
1 h2
f ′ (x0 ) = [f (x0 − 2h) − 4f (x0 − h) + 3f (x0 )] + f ′′ (ξ2 ).
2h 3
Finally, note that the last of these equations can be obtained from the rst
by simply replacing h with −h, so there are actually only two formulas:
1 h2
f ′ (x0 ) = [−3f (x0 ) + 4f (x0 + h) − f (x0 + 2h)] + f ′′′ (ξ0 ),
2h 3
where ξ0 lies between x0 and x0 + 2h
1 h2
f (x0 ) =[f (x0 + h) − f (x0 − h)] − f ′′′ (ξ1 ),
2h 6
where ξ1 lies between x0 − h and x0 + h.
1 h4
f ′ (x0 ) = [f (x0 − 2h) − 8f (x0 − h) + 8f (x0 + h) − f (x0 + 2h)]+ f (5) (ξ)
12h 30
where ξ lies between x0 − 2h and x0 + 2h.
1
f ′ (x0 ) = [−25f (x0 ) + 48f (x0 + h) − 36f (x0 + 2h)
12h
h4
+16f (x0 + 3h) − 3f (x0 + 4h)] + f (5) (ξ)
5
where ξ lies between x0 and x0 + 4h.
Values for f (x) = x · e x are given in Table 2. Use all the applicable
three-point and ve-point formulas to approximate f ′ (2.0).
x f (x)
1.8 10.889365
1.9 12.703199
2.0 14.778112
2.1 17.148957
2.2 19.855030