0% found this document useful (0 votes)
37 views5 pages

Formula Sheet - Numerical Methods - Dr. Saeed

This document is a formula sheet for Numerical Methods for Engineers (MATH 472), covering error analysis, roots of equations, numerical differentiation and integration, curve fitting, linear algebraic equations, and ordinary differential equations. It provides various methods and formulations for each topic, along with error definitions and convergence criteria. Key methods include the Bisection method, Newton-Raphson, Simpson's Rule, and various Runge-Kutta methods.

Uploaded by

Fadya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views5 pages

Formula Sheet - Numerical Methods - Dr. Saeed

This document is a formula sheet for Numerical Methods for Engineers (MATH 472), covering error analysis, roots of equations, numerical differentiation and integration, curve fitting, linear algebraic equations, and ordinary differential equations. It provides various methods and formulations for each topic, along with error definitions and convergence criteria. Key methods include the Bisection method, Newton-Raphson, Simpson's Rule, and various Runge-Kutta methods.

Uploaded by

Fadya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

FORMULA SHEET FOR NUMERICAL METHODS FOR ENGINEERS

MATH 472

Part 1: Error Analysis

Error Definitions:

True error: Et = true value − approximation

True percent relative error:


true value − approximation
εt = × 100%
true value

Approximate percent relative error:


present approximation − previous approximation
εa = × 100%
present approximation

Stopping criterion:
Terminate computation when εa < εs where εs s is the desired percent relative error.

Taylor Series:

Taylor series expansion:

f ′′ (xi ) 2 f ′′′ (xi ) 3 f (n) (xi ) n


f (x(i+1) ) = f (xi ) + f ′ (xi )h + h + h + ··· + h + Rn .
2! 3! n!

f (n+1) (xi ) n+1


where Rn = h
(n + 1)!

1
Part 2: Roots of Equations

Method Formulation
xu + xl
Bisection xr = if f (xl ) × f (xr ) < 0, set xu = xr
2
if f (xl ) × f (xr ) > 0, set xl = xr
f (xu )(xl − xu )
False position xr = xu − if f (xl ) × f (xr ) < 0, set xu = xr
f (xl ) − f (xu )
if f (xl ) × f (xr ) > 0, set xl = xr
f (xi )
Newton Raphson xi+1 = xi −
f (xi )
f (xi )(xi−1 − xi )
Secant xi+1 = xi −
f (xi−1 ) − f (xi )

Part 3: Numerical Differentiation and Integration

A. Numerical Differentiation

Method Formulation Errors


Forward Finite First derivative
f ′′ (xi )
divided difference f ′ (xi ) = f (xi+1h)−f (xi ) Et = 2! h, O(h)
Backward Finite First derivative
′ f ′′ (xi )
divided difference f (xi ) = f (xi )−fh (xi−1 ) Et = 2! h, O(h)
Centered Finite First derivative
f ′′′ (xi ) 2
divided difference f ′ (xi ) = f (xi+1 )−f
2h
(xi−1 )
Et = 3! h , O(h2 )
Centered Finite Second derivative
f (4) (xi ) 2
divided difference f ′′ (xi ) = f (xi+1 )−2fh(x2 i )+f (xi−1 ) Et = 12 h , O(h2 )
Three point First derivative
f (3) (ξ) 2
End point f ′ (x0 ) = 1
2h [−3f (x0 ) + 4f (x0 + h) − f (x0 + 2h)] Et = 3 h
Three point First derivative
(3)
Midpoint f ′ (x0 ) = [f (x0 + h) − f (x0 − h)]
1
2h Et = − f 6
(ξ) 2
h
Five point First derivative
1 f (5) (ξ) 4
Midpoint f ′ (x0 ) = [f (x0 − 2h) − 8f (x0 − h) Et = 30 h
12h
+ 8f (x0 + h) − f (x0 + 2h)]
Five point First derivative
′ 1 f (5) (ξ) 4
Endpoint f (x0 ) = [−25f (x0 ) + 48f (x0 + h) Et = 5 h
12h
− 36f (x0 + 2h) + 16f (x0 + 3h) − 3f (x0 + 4h)]

2
B. Numerical Integration

b−a
First: Closed Newton-Cots Formulas: h =
n

Trapezoidal Rule n = 1, h = b − a
∫b 2
f ′′ (ξ)
n=1 a
f (x) dx = h2 [(x0 ) + f (x1 )] Et = − h 12
Simpson’s Rule n = 2, h = b−a
∫b 2
5
f (4) (ξ)
n=2 a
f (x) dx = h3 [f (x0 ) + 4f (x1 ) + f (x2 )] Et = − h 90
Simpson’s n = 3, h = b−a
∫b 3
5
f (4) (ξ)
Three-eighths a
f (x) dx = 3h
8 [f (x0 ) + 3f (x1 ) + 3f (x2 ) + f (x3 )] Et = − 3h 80

b−a
Second: Open Newton-Cots Formulas: h =
n+2

Midpoint Rule n = 0, h = b−a


∫b 2 3
f ′′ (ξ)
n=0 a
f (x) dx = 2hf (x0 ) Et = − h 3
n = 1, h = b−a
∫b 3
3h3 f ′′ (ξ)
n=1 a
f (x) dx = 3h2 [f (x0 ) + f (x1 )] Et = 4
n = 2, h = b−a
∫b 4
5
f (4) (ξ)
n=2 a 3 [2f (x0 ) − f (x1 ) + 2f (x2 )]
f (x) dx = 4h Et = − 14h 45
n = 3, h = b−a
∫b 5h
5
95h5 f (4) (ξ)
n=3 a
f (x) dx = 45 [11f (x0 ) + f (x1 ) + f (x2 ) + 11f (x3 )] Et = 144

b−a
Third: Composite Numerical Integration: h = , n is even
n
b−a
Composite h= n
∫ b ∑2
n
h (b−a)h4 f (4) (ξ)
Simpson’s rule f (x) dx = [f (x0 ) + 4 (f (x2j−1 )) Et = 180
a 3 j=1
2 −1
n

+2 (f (x2j )) + f (xn )]
j=1

3
Part 4: Curve Fitting

Method Formulation Errors



3
Newton’s divided difference Third order R3 ∼
= f [x4 , x3 , x2 , x1 , x0 ] (x − xi )
i=0
interpolating polynomial f3 (x) = b0 + b1 (x − x0 )
+ b2 (x − x0 )(x − x1 )
+ b3 (x − x0 )(x − x1 )(x − x2 )
where b0 = f (x0 )
b1 = f [x1 , x0 ]
b2 = f [x2 , x1 , x0 ]
b3 = f [x3 , x2 , x1 , x0 ]

n
Lagrange interpolating Rn ∼
= f [xn+1 , xn , xn−1 , . . . x0 ] (x − xi )
i=0


i=n
polynomial fn (x) = Li (x)f (xi )
i=0
where

n
(x − xj )
Li (x) =
(xi − xj )
j=0,j̸=i

Sr
Linear Regression y = a0 + a1 x S xy =
n−2
where St − Sr
2
r =

i=n
St
Sr = (yi − a0 − a1 xi )2 where

i=0
∑ ∑ ∑
n x y − xi yi St = (yi − y)2
a1 = ∑i i2 ∑
n xi − ( xi )2
a0 = y − a1 x
Polynomial Regression √
2 Sr
2nd order poly. fit y = a0 + a1 x + a2 x S xy =
n − (m + 1)
where
 ∑ ∑ 2    ∑  St − Sr
r2 =
∑n ∑ x2i ∑ xi3 a0 ∑ yi St
 xi  a1  =  xi yi 
∑ 2 ∑ xi3 x
∑ 4 i ∑ 2 where
xi xi xi a2 xi yi ∑
St = (yi − y)2

4
Part 5: Linear Algebraic Equations

Method Formulation Criteria of Convergence


xji − xj−1
Gauss-Seidel |εa,i | = i
× 100% < εs
xji
b1 − a12 x2 − a13 x3
for 3 × 3 equations x1 =
a11
b2 − a21 x1 − a23 x3
x2 =
a22
b3 − a31 x1 − a32 x2
x3 =
a33

Part 6: Ordinary Differential Equations

Method Formulation
Euler’s First-Order RK yi+1 = yi + k1 h
k1 = f (xi , yi )
1 1
Heun’s Second Order RK yi+1 = yi + ( k1 + k2 )h
2 2
k1 = f (xi , yi )
k2 = f (xi + h, yi + k1 h)
Midpoint Second Order RK yi+1 = yi + k2 h
k1 = f (xi , yi )
1 1
k2 = f (xi + h, yi + k1 h)
2 2
1 2
Ralston’s Second Order RK yi+1 = yi + ( k1 + k2 )h
3 3
k1 = f (xi , yi )
3 3
k2 = f (xi + h, yi + k1 h)
4 4
1
Classical Fourth Order RK yi+1 = yi + (k1 + 2k2 + 2k3 + k4 )h
6
k1 = f (xi , yi )
1 1
k2 = f (xi + h, yi + k1 h)
2 2
1 1
k3 = f (xi + h, yi + k2 h)
2 2
k2 = f (xi + h, yi + k3 h)

You might also like