Professional Documents
Culture Documents
Sustainable
Sustainable
Iteration
Newton Raphson method for refining an approximate root x0 of f (x) = 0
f (xn )
xn+1 = xn −
f 0 (xn )
√
1 N
Particular case to find N use xn+1 = 2 xn + xn .
Secant Method
f (xn ) − f (xn−1 )
xn+1 = xn − f (xn )/
xn − xn−1
Interpolation
p(p − 1) 2 p
fp = f0 + p∆f0 + ∆ f0 + ... + ∆r f0
2! r
x − x0
where p =
h
Lagrange’s Formula for n points
n
X
y= yi `i (x)
i=1
where
Πnj=1,j6=i (x − xj )
`i (x) =
Πnj=1,j6=i (xi − xj )
1
Numerical differentiation
Derivatives at a tabular point
1 1
hf00 µ δf0 − µ δ 3 f0 + µ δ 5 f0 − ...
=
6 30
2 00 2 1 4 1 6
h f0 = δ f0 − δ f0 + δ f0 − ...
12 90
1 2 1 3 1 1
hf0 = ∆f0 − ∆ f0 + ∆ f0 − ∆4 f0 + ∆5 f0 − ...
0
2 3 4 5
2 00 2 3 11 4 5 5
h f0 = ∆ f0 − ∆ f0 + ∆ f0 − ∆ f0 + ...
12 6
Numerical Integration
Z x0 +h
h
Trapezium Rule f (x)dx ' (f0 + f1 ) + E
x0 2
h3 00
where fi = f (x0 + ih), E = − f (a), x0 < a < x0 + h
12
Composite Trapezium Rule
Z x0 +nh
h h2 h4 000
f (x)dx ' {f0 + 2f1 + 2f2 + ...2fn−1 + fn } − (fn0 − f00 ) + (f − f0000 )...
x0 2 12 720 n
Z x0 +2h
h
Simpson’s Rule f (x)dx ' (f0 + 4f1 + f2 ) + E
x0 3
h5 (4)
where E=− f (a) x0 < a < x0 + 2h.
90
nh5 (4)
where E=− f (a). x0 < a < x0 + nh
180
2
Gauss order 1. (Midpoint)
Z 1
f (x)dx = 2f (0) + E
−1
2 00
where E= f (a). −1<a<1
3
Gauss order 2.
Z 1
1 1
f (x)dx = f − √ +f √ +E
−1 3 3
1 0v
where E= f (a). −1<a<1
135
Differential Equations
To solve y 0 = f (x, y) given initial condition y0 at x0 , xn = x0 + nh.
Euler’s forward method
h
yn+1 = yn + (f (xn , yn ) + f (xn + h, yn + hf (xn , yn ))).
2
Runge Kutta order 4.
h
yn+1 = yn + (K1 + 2K2 + 2K3 + K4 )
6
where
K1 = f (xn , yn )
h hK1
K2 = f xn + , yn +
2 2
h hK2
K3 = f xn + , yn +
2 2
K4 = f (xn + h, yn + hK3 )
3
Chebyshev Polynomials
Tn (x) = cos n(cos−1 x)
To (x) = 1 T1 (x) = x
Tn0 (x) sin n(cos−1 x)
Un−1 (x) = = √
n 1 − x2
1
f (x) = a0 T0 (x) + a1 T1 (x)...aj Tj (x) + ...
2
Z π
2
where aj = f (cos θ) cos jθdθ j≥0
π 0
R
and f (x)dx = constant +A1 T1 (x) + A2 T2 (x) + ...Aj Tj (x) + ...
where Aj = (aj−1 − aj+1 )/2j j≥1