Difference Formulas for f' (x) ≈ Approx error ξ Difference Formulas for f' (x) ≈ Approx error ξ
Difference Formulas for f' (x) ≈ Approx error ξ Difference Formulas for f' (x) ≈ Approx error ξ
Difference Formulas for f' (x) ≈ Approx error ξ Difference Formulas for f' (x) ≈ Approx error ξ
Approximation:
f’(x0) = f(1)(x0)
Two-Point Formula
Lagrange Taylor
Three-Point Formula Series
Interpolation
Polynomial
Five-Point Formula
Difference
Difference Formulas
Formulas for
for f’(x)
f’(x) ≈≈ Approx
Approx error
error ξξ
Five- Forward-difference -25f(x0) + 48f(x0+h) -36f(x0+2h) +16f(x0+3h) -3f(x0+4h) + f(5) (ξ) [x0 , x0+4h]
Five- Forward-difference -25f(x0) + 48f(x0+h) -36f(x0+2h) +16f(x0+3h) -3f(x0+4h) f(5)(ξ) [x0 , x0+4h]
Point
Point
Formula
Formula [x0-2h ,
Midpoint f(x0-2h) - 8f(x0-h) +8f(x0+h) -f(x0+2h) + f(5) (ξ) [x 0-2h ,
x0+2h]
Midpoint f(x0-2h) - 8f(x0-h) +8f(x0+h) -f(x0+2h) f(5)(ξ)
x0+2h]
( 𝑥 − 𝑎 ) (1) ( 𝑥 − 𝑎 ) 2 ( 2) ( 𝑥 − 𝑎) 𝑛
𝑓 𝑛 ( 𝑥 )= 𝑓 ( 𝑎 )+ . 𝑓 (𝑎)+ . 𝑓 ( 𝑎 ) +…+ .𝑓 (𝑛 )
( 𝑎 )=¿
1! 2! 𝑛! x = x0 + k
a = x0
(error)
=
= B[
= C[
{
( B+2 C )∗ h =1 ❑ 𝐵=+2 /1 h
( B / 2+2 C ) ∗ h 2 =0 𝐶 =−1/2 h {
Dùng Đa thức nộ i suy Lagrange suy ra các công thức
tính gần đúng đạo hàm và tích phân
( 𝑥 − 𝑥 1)( 𝑥 − 𝑥 2) ( 𝑥 − 𝑥 0 )( 𝑥 − 𝑥 2) ( 𝑥 − 𝑥 0) ( 𝑥 − 𝑥 1)
𝑓 The
2(𝑥 Second Lagrange
)= 𝑓 ( 𝑥 0)+ 𝑓 ( 𝑥 1 )+ 𝑓 ( 𝑥 2)
( 𝑥 0 − 𝑥 1 ) ( 𝑥 0− 𝑥 2 )
Polynomial ( 𝑥 1 − 𝑥 0 ) ( 𝑥 1 − 𝑥 2) ( 𝑥 2 − 𝑥 0 ) ( 𝑥 2− 𝑥 1 )
1. Công thức tính đạo hàm theo 3 điểm đầu:
𝐷{(𝑥− 𝑥0)(𝑥−𝑥0−h)(𝑥−𝑥0−2h)}=(𝑥−𝑥0−h)(𝑥−𝑥0−2h)+(𝑥−𝑥0)(𝑥−𝑥0−2h)+(𝑥−𝑥0)(𝑥−𝑥0−h)
2. Công thức tính đạo hàm cho 3 điểm giữa:
𝐷{(𝑥 −𝑥0+h)(𝑥−𝑥0)(𝑥−𝑥0−h)}=(𝑥−𝑥0)(𝑥−𝑥0−h)+(𝑥−𝑥0+h)(𝑥−𝑥0−h)+(𝑥−𝑥0+h)(𝑥−𝑥0)
Product of two functions Product of three functions
3. Công thức tính tích phân cho 3 điểm (Quy tắc Simpson):
Dùng Đa thức nộ i suy Taylor suy ra các công thức tính
gần đúng đạo hàm và tích phân
= B[
= C[
0 0 0 1/h 2
-2/h 2
1/h2
A B C
0 0 0 1/h 2
-2/h 2
1/h2
Simpson’s
rule
Simpson’s
rule
Polynomical Interpolation [Nộ i suy đa thức]
Taylor Polynomial
is called the nth Maclaurin polynomial for f at a. A Maclaurin polynomial is a Taylor polynomial centered at a.
Give k points from a function f(x) you can write a polynomial of k-1 degrees called Largrange Polynomial
𝑓 𝑛+1(ξ ( 𝑥 ))
𝐸 𝑛 ( 𝑥) = ∗ ( 𝑥 − 𝑥 0 )( 𝑥 − 𝑥 1 ) …(𝑥 − 𝑥𝑛)
( 𝑛+1 ) !
1st-order 2nd-order
(𝑥 −𝑥0) (𝑥 − 𝑥 0 ) ( 𝑥 − 𝑥 0) ( 𝑥 − 𝑥 1) 𝑓 ( 𝑥 2) − 𝑓 ( 𝑥 1) 𝑓 (𝑥 1) − 𝑓 ( 𝑥 0)
𝑓 1 ( 𝑥 )=𝑓 ( 𝑥 0 ) +
( 𝑥 1− 𝑥 0 )
[𝑓 ( 𝑥 1 ) − 𝑓 ( 𝑥 0 ) ] 𝑓 2 ( 𝑥 )=𝑓 ( 𝑥 0 ) +
(𝑥1−𝑥0)
[𝑓 ( 𝑥 1 ) − 𝑓 ( 𝑥 0 )]+
( 𝑥 2− 𝑥 0 ) [ 𝑥2− 𝑥1
−
𝑥 1− 𝑥 0 ]
Newton’s Interpolating Polynomial
+…..
Quadratic Interpolation
Linear Interpolation
𝑓 1 (𝑥 ) − 𝑓 (𝑥 0) 𝑓 ( 𝑥 1 )− 𝑓 ( 𝑥 0 )
( 𝑥 − 𝑥 0)
=
( 𝑥 1 − 𝑥 0)