Professional Documents
Culture Documents
List of Formulas
List of Formulas
Bisection Method
x + xu
xr = l
2
False-Position Method
f ( xu )( xl − xu )
x r = xu −
f ( xl ) − f ( xu )
xi +1 = g ( x )
Newton-Raphson Method
f ( xi )
xi +1 = xi −
f ' ( xi )
Secant Method
f ( xi )( xi −1 − xi )
xi +1 = xi −
f ( xi −1 ) − f ( xi )
Gauss Elimination
Gauss-Jordan
LU Decomposition
Doolittle
Cholesky
b1 − a12 x2 − a13 x3
x1 =
a11
b − a21 x1 − a23 x3
x2 = 2
a22
b −a x −a x
x3 = 3 31 1 32 2
a33
Linear Regression
y = a 0 + a1 x
where,
n∑ xi yi − ∑ xi ∑ yi
a1 =
n∑ xi2 − (∑ xi )
2
a0 = y − a1 x
Polynomial Regression
y = a0 + a1 x + a2 x 2
where,
(∑ x )a + (∑ x )a + (∑ x )a = ∑ x y
i 0
2
i 1
3
i 2 i i
(∑ x )a + (∑ x )a + (∑ x )a = ∑ x
2
i 0
3
i 1
4
i 2
2
i yi
f n ( x ) = b0 + b1 ( x − x0 ) + ... + bn ( x − x0 )( x − x1 )...( x − xn −1 )
where,
b0 = f ( x0 )
b1 = f [x1 , x0 ]
b2 = f [x2 , x1 , x0 ]
.
.
where,
n x − xj
Li ( x ) = ∏
j =0 xi − x j
j ≠i
Numerical Differentiation
First Derivative
f ( xi +1 ) − f ( xi )
f ' ( xi ) =
h
Second Derivative
First Derivative
f ( xi ) − f ( xi −1 )
f ' ( xi ) =
h
Second Derivative
f ( xi ) − 2 f ( xi −1 ) + f ( xi − 2 )
f '' ( x i ) =
h2
First Derivative
f ( xi +1 ) − f ( xi −1 )
f ' ( xi ) =
2h
Second Derivative
f ( xi +1 ) − 2 f ( xi ) + f ( xi −1 )
f '' ( x i ) =
h2
High-Accuracy Differentiation
First Derivative
Second Derivative
Third Derivative
Fourth Derivative
First Derivative
Third Derivative
Fourth Derivative
3 f ( xi ) − 14 f ( xi −1 ) + 26 f ( xi −2 ) − 24 f ( xi −3 ) + 11 f ( xi −4 ) − 2 f (xi −5 )
f '''' ( xi ) =
h4
First Derivative
Second Derivative
Third Derivative
Fourth Derivative
Numerical Integration
Trapezoidal
f ( a ) + f (b)
I
= (b − a )
2
Multiple-Application of Trapezoidal Rule
n −1
f ( x 0 ) + 2 ∑ f ( xi ) + f ( x n )
I = (b − a ) i =1
2n
I ≅ (b − a )
i =1, 3, 5 j =2, 4, 6
3n
Runge-Kutta Methods
yi +1 = yi + f ( xi , yi )h
dy
where f (x, y ) =
dx
Predictor: yi0+1 = yi + f ( xi , yi )h
Corrector: yi +1 = yi +
f ( xi , yi ) + f xi +1 , yi0+1 (
h
)
2
dy
where f (x, y ) =
dx
or simply
1 1
yi +1 = yi + k1 + k 2 h
2 2
where
k1 = f ( xi , yi )
k 2 = f ( xi + h, yi + k1h )
Midpoint Method
yi +1 = yi + k 2 h
where
k1 = f ( xi , yi )
1 1
k 2 = f xi + h, yi + k1h
2 2
Ralston’s Method
1 2
yi +1 = yi + k1 + k 2 h
3 3
where
k1 = f ( xi , yi )
3 3
k 2 = f xi + h, yi + k1h
4 4
1
yi +1 = yi + (k1 + 4k 2 + k3 )h
6
where
k1 = f (xi , yi )
1 1
k 2 = f xi + h, yi + k1h
2 2
k3 = f (xi + h, yi − k1h + 2k 2 h )
Fourth-Order Runge-Kutta Methods
1
yi +1 = yi + (k1 + 2k 2 + 2k3 + k 4 )h
6
where
k1 = f (xi , yi )
1 1
k 2 = f xi + h, yi + k1h
2 2
1 1
k 3 = f x i + h, y i + k 2 h
2 2
k 4 = f ( x i + h, y i + k 3 h )
1
yi +1 = yi + (7k1 + 32k3 + 12k 4 + 32k5 + 7k6 )h
90
where
k1 = f (xi , yi )
1 1
k 2 = f xi + h , y i + k1h
4 4
1 1 1
k 3 = f xi + h , y i + k1h + k 2 h
4 8 8
1 1
k 4 = f xi + h, yi − k 2 h + k3 h
2 2
3 3 9
k5 = f xi + h, yi + k1h + k 4 h
4 16 16
3 2 12 12 8
k 6 = f xi + h, yi − k1h + k 2 h + k3 h − k 4 h + k5 h
7 7 7 7 7
Laplace Equations
Ti +1, j + Ti −1, j + Ti , j +1 + Ti , j −1
Ti , j =
4
Overrelaxation
Ti ,new
j = λTi ,Current
j + (1 − λ )Ti ,oldj
Heat-Conduction Equation
Explicit method,
(
Ti l +1 = Ti l + λ Ti +l 1 − 2Ti l + Ti −l 1 )
∆t
where λ = k
(∆x )2
Implicit method
∆t
where λ = k
(∆x )2