Professional Documents
Culture Documents
Numerical derivatives
Forward finite difference
𝑓(𝑥 + ∆𝑥) − 𝑓(𝑥)
𝛿 (𝑥) =
∆𝑥
Backward finite difference
𝑓(𝑥) − 𝑓(𝑥 − ∆𝑥)
𝛿 (𝑥) =
∆𝑥
Centered finite difference
𝑓(𝑥 + ∆𝑥) − 𝑓(𝑥 − ∆𝑥)
𝛿(𝑥) =
2∆𝑥
Numerical Integration
Left endpoint approximation
Midpoint approximation
𝑥 +𝑥
𝑓(𝑥)𝑑𝑥 ≈ 𝑓 ∆𝑥
2
The Trapezoidal Rule
∆𝑥
𝑓(𝑥)𝑑𝑥 = (𝑓(𝑥 ) + 2 𝑓(𝑥 ) + 𝑓(𝑥 ))
2
Change of variable: 𝑥= − 𝑡
Differential Equations
Euler Method
𝑦 = 𝑦 + 𝑓(𝑥 , 𝑦 )ℎ
Heun’ Method
𝑦 = 𝑦 + 𝑓(𝑥 , 𝑦 )ℎ
ℎ
𝑦 = 𝑦 + (𝑓(𝑥 , 𝑦 ) + 𝑓(𝑥 ,𝑦 ))
2
Midpoint method
𝑦 = 𝑦 + 𝑓(𝑥 , 𝑦 )ℎ
ℎ 𝑥 +𝑥
𝑦 = 𝑦 + 𝑓( ,𝑦 )
2 2
𝑎 =1−𝑎
1
𝑝 =𝑞 =
2𝑎
Euler method
Heun’s method
Midpoint method
Second order Runge Kutta method
Boundary-Value Problems
General formulation of second order BVPs: = 𝑓 𝑡, 𝑦, , 𝑡 ∈ [𝑎, 𝑏]
𝑦(𝑎) = 𝑦
Boundary conditions:
𝑦(𝑏) = 𝑦
𝑑𝑦 𝑦 −𝑦
=
𝑑𝑡 2∆𝑡
𝑑 𝑦 𝑦 − 2𝑦 + 𝑦
=
𝑑𝑡 ∆𝑡