You are on page 1of 2

Formulae Sheet

➢ Roots of Equations

(a) Bisection

(b) Newton-Raphson

➢ Interpolation with unequally spaced data

(a) Lagrange The third order polynomial, given ( x 0 , y 0 ), ( x1 , y1 ), ( x2 , y 2 ), and ( x3 , y 3 ), is


, where

(b) Newton divided difference f 3 ( x) = f [ x0 ] + f [ x1 , x0 ]( x − x0 ) + f [ x 2 , x1 , x0 ]( x − x0 )( x − x1 )


+ f [ x3 , x 2 , x1 , x0 ]( x − x0 )( x − x1 )( x − x 2 )
➢ Interpolations with equally spaced data 𝑥𝑖+1 − 𝑥𝑖 = ℎ

(a) Forward difference


𝑥−𝑥0
, where 𝑠 = ℎ

(b) Backward difference


, where 𝑠 =
𝑥−𝑥𝑛

➢ Curve fitting
2
S r =  Ei =  ( yi − a0 − a1 xi ) ,
n 2 n
(a) Linear regression
i =1 i =1
n n n n n n n

 xi2  yi −  xi  xi yi n x i y i − x i  y i
i =1 i =1 i =1
where a0 = i =1 i =1 i =1 i =1
2 and a1 =
 
2
n n
n xi2 −  xi 
n
 n
n x −  x i 
2

 i =1 
i
i =1 i =1  i =1 
𝑏−𝑎
➢ Numerical Integration on [a, b] with ℎ = 𝑛

𝑏 ℎ
(a) Trapezoidal ∫𝑎 𝑓(𝑥)𝑑𝑥 ≈ 2 [𝑓(𝑥0 ) + 2𝑓(𝑥1 ) + 2𝑓(𝑥2 ) + ⋯ + 2𝑓(𝑥𝑛−1 ) + 𝑓(𝑥𝑛 )]
b  n −1 n−2

h
(b) Simpson 1/3  f ( x )dx =  f ( x0 ) + 4  f ( xi ) + 2  f ( xi ) + f ( x n )
3 i =1 i =2 
a  i = odd i = even 
(c) Simpson 3/8
𝑏
3ℎ
∫ 𝑓(𝑥)𝑑𝑥 ≈ [𝑓(𝑥0 ) + 3(𝑓(𝑥1 ) + 𝑓(𝑥2 ) + ⋯ + 𝑓(𝑥𝑛−1 )) + 2(𝑓(𝑥3 ) + 𝑓(𝑥6 ) + ⋯ + 𝑓(𝑥𝑛−3 )) + 𝑓(𝑥𝑛 )]
𝑎 8

➢ Ordinary differential equations


(a) Euler (c) Rung-Kutta 4th order
(b) Heun

You might also like