EMNS0323 Formula Index

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Numerical Solutions to CE Problems, EMNS0323

Formula Index

Write the following on upper part of the index card (both sides):

1. Name
2. Course and Bloc ex. EMNS0323 BSCE-CEM3A

FRONT PART
Cubic Spline Interpolation
1
𝑓(𝑥) = {[(𝑥𝑖+1 − 𝑥)3 𝑓 ′′ (𝑥𝑖 ) + (𝑥 − 𝑥𝑖 )3 𝑓 ′′ (𝑥𝑖 )] + [6𝑓(𝑥𝑖 ) − (𝑥𝑖+1 − 𝑥𝑖 )2 𝑓′′(𝑥𝑖 )](𝑥𝑖+1 − 𝑥) + [6𝑓(𝑥𝑖+1 ) − (𝑥𝑖+1 − 𝑥𝑖 )2 𝑓′′(𝑥𝑖+1 )](𝑥 − 𝑥𝑖 )}
6(𝑥𝑖+1 −𝑥𝑖)

for 𝑥𝑖 ≤ 𝑥 ≤ 𝑥𝑖+1

𝑓(𝑥𝑖+1 )−𝑓(𝑥𝑖 ) 𝑓(𝑥𝑖 )−𝑓(𝑥𝑖−1 )


(𝑥𝑖 − 𝑥𝑖−1 )𝑓 ′′ (𝑥𝑖−1 ) + 2(𝑥𝑖+1 − 𝑥𝑖−1 )𝑓 ′′ (𝑥𝑖 ) + (𝑥𝑖+1 − 𝑥𝑖 )𝑓 ′′ (𝑥𝑖+1 ) = 6 [ − ]
𝑥𝑖+1 −𝑥𝑖 𝑥𝑖 −𝑥𝑖−1

Numerical Differentiation

High Accuracy

Backward Difference
3𝑓(𝑥𝑖 ) − 4𝑓(𝑥𝑖−1 ) + 𝑓(𝑥𝑖−2 )
𝑓′(𝑥𝑖 ) =
2ℎ
Central Difference
−𝑓(𝑥𝑖+2 ) + 8𝑓(𝑥𝑖+1 ) − 8𝑓(𝑥𝑖−1 ) + 𝑓(𝑥𝑖−2 )
𝑓′(𝑥𝑖 ) =
12ℎ
Forward Difference
−𝑓(𝑥𝑖+2 ) + 4𝑓(𝑥𝑖+1 ) − 3𝑓(𝑥𝑖 )
𝑓′(𝑥𝑖 ) =
2ℎ

Differential Equations

Initial Value Problem

Euler Method

𝑦𝑛+1 = 𝑦𝑛 + ℎ𝑓(𝑥𝑛 , 𝑦𝑛 )
Modified Euler’s Predictor-Corrector Method

𝑦𝑛+1 = 𝑦𝑛 + [𝑓(𝑥𝑛 , 𝑦𝑛 ) + 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + ℎ𝑓(𝑥𝑛 , 𝑦𝑛 ))]
2

BACK PART
Fourth Order Runge- Kutta Method
1
𝑘𝑛 = (𝑘1𝑛 + 2𝑘2𝑛 + 2𝑘3𝑛 + 𝑘4𝑛 )
6
𝑘1𝑛 = ℎ ∙ 𝑓(𝑥𝑛 , 𝑦𝑛 )
ℎ 𝑘1𝑛
𝑘2𝑛 = ℎ ∙ 𝑓 (𝑥𝑛 + , 𝑦𝑛 + )
2 2
ℎ 𝑘2𝑛
𝑘3𝑛 = ℎ ∙ 𝑓 (𝑥𝑛 + , 𝑦𝑛 + )
2 2
𝑘4𝑛 = ℎ ∙ 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + 𝑘3𝑛 )
Boundary Value Problem

Shooting Method

𝑘1𝑛 = ℎ𝑓(𝑥𝑛 , 𝑦𝑛 , 𝑧𝑛 ) 𝐾1𝑛 = ℎ𝑔(𝑥𝑛 , 𝑦𝑛 , 𝑧𝑛 )


ℎ 𝑘1𝑛 𝐾1𝑛 ℎ 𝑘1𝑛 𝐾1𝑛
𝑘2𝑛 = ℎ𝑓 (𝑥𝑛 + , 𝑦𝑛 + ,𝑧 + ) 𝐾2𝑛 = ℎ𝑔 (𝑥𝑛 + , 𝑦𝑛 + ,𝑧 + )
2 2 𝑛 2 2 2 𝑛 2
ℎ 𝑘2𝑛 𝐾2𝑛 ℎ 𝑘2𝑛 𝐾2𝑛
𝑘3𝑛 = ℎ𝑓 (𝑥𝑛 + , 𝑦𝑛 + ,𝑧 + ) 𝐾3𝑛 = ℎ𝑔 (𝑥𝑛 + , 𝑦𝑛 + ,𝑧 + )
2 2 𝑛 2 2 2 𝑛 2
𝑘4𝑛 = ℎ𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + 𝑘3𝑛 , 𝑧𝑛 + 𝐾3𝑛 ) 𝐾4𝑛 = ℎ𝑔(𝑥𝑛 + ℎ, 𝑦𝑛 + 𝑘3𝑛 , 𝑧𝑛 + 𝐾3𝑛 )

1 1
𝑘𝑛 = (𝑘 + 2𝑘2𝑛 + 2𝑘3𝑛 + 𝑘4𝑛 ) 𝐾𝑛 = (𝐾1𝑛 + 2𝐾2𝑛 + 2𝐾3𝑛 + 𝐾4𝑛 )
6 1𝑛 6

𝑧𝛼2 − 𝑧𝛼1
𝑧0 = 𝑧𝛼1 + (𝑦 − 𝑦𝑛1 )
𝑦𝑛2 − 𝑦𝑛1 𝑛
Finite Difference Method
𝑦𝑛+1 − 2𝑦𝑛 + 𝑦𝑛−1
𝑦′′ =
ℎ2

You might also like