0% found this document useful (0 votes)
9 views

Formula Sheet

Uploaded by

sophie.brisbne
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)
9 views

Formula Sheet

Uploaded by

sophie.brisbne
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/ 2

Root Mean Square Error Fourier Series

r Pn For a 2L periodic function f (x) centered about the origin.


i=1 [yi − f (xi )]2 ∞ ∞
RM SE = a0 X  nπx  X  nπx 
n f (x) = + an cos + bn sin
2 n=1
L n=1
L
Euler Numerical Method Z L
1
x i+1 = x i + hf (x i , ti ) a0 = f (x) dx
L −L
1 L
Z  nπx 
RK2 Numerical Method an = f (x) cos dx
L −L L
k 1 = f (x i , ti )
1 L
Z  nπx 
k 2 = f (x i + hk 1 /2, ti + h/2) bn = f (x) sin dx
L −L L
x i+1 = x i + hk 2
Fourier Sine Series
RK4 Numerical Method The odd continuation of f (x) defined for 0 ≤ x ≤ L

k 1 = f (x i , ti ) X  nπx 
f (x) = bn sin
k 2 = f (x i + hk 1 /2, ti + h/2) n=1
L
k 3 = f (x i + hk 2 /2, ti + h/2) 2
Z L  nπx 
k 4 = f (x i + hk 3 , ti + h) bn = f (x) sin dx
L 0 L
x i+1 = x i + h(k 1 + 2k 2 + 2k 3 + k 4 )/6
Fourier Cosine Series
Converting Higher Order DEs The even continuation of f (x) defined for 0 ≤ x ≤ L
By letting x = x1 convert a nth order DE into a system ∞
of n first order DEs shown below. a0 X  nπx 
f (x) = + an cos
2 n=1
L
dxi /dt = xi+1 i = 1...n − 1 Z L
2
dxn /dt = f (x1 . . . xn ) a0 = f (x) dx
L 0
2 L
Z
Finite Difference Equations  nπx 
an = f (x) cos dx
Forward difference of the first derivative is L 0 L
yi+1 − yi
yi′ = (1st Order) Classifying PDEs
h
Backward difference of the first derivative is Auxx + 2Buxt + Cutt + f (u, ux , ut ) = 0
yi − yi−1 AC − B 2 = 0 (Parabolic)
yi′ = (1st Order) 2
h AC − B < 0 (Hyperbolic)
2
Centred difference of the first derivative is AC − B > 0 (Elliptic)
2
yi+1 − yi−1 AC − B = f (x, t) (Mixed)
yi′ = (2nd Order)
2h
Zero Dirichlet Heat PDE
Centred difference of the second derivative is
ut = c2 uxx u(x, 0) = f (x)
yi+1 − 2yi + yi−1
yi′′ = (2nd Order) u(0, t) = 0 u(L, t) = 0
h2
∞  2 2 2 
Shooting Method X c n π t  nπx 
To solve a BVP, first determine numerical solutions to u(x, t) = b n exp − sin
n=1
L2 L
IVP1 = S(x) and IVP2 = U (x) by any numerical method.
The shooting method below solves the BVP. bn are the coefficients of the Fourier sine series of f (x).

y(x) = αS(x) + βU (x) Zero Neumann Heat PDE


y ′ (x) = αS ′ (x) + βU ′ (x)
ut = c2 uxx u(x, 0) = f (x)
Symmetric Integrals ux (0, t) = 0 ux (L, t) = 0
Z L Z L ∞  2 2 2 
 a0 X c n π t  nπx 
f (x) dx = 2 f (x) dx Even f (x) u(x, t) = + an exp − cos
−L 0 2 n=1
L2 L
Z L
a0 and an are the coefficients of the Fourier cosine series

f (x) dx = 0 Odd f (x)
−L of f (x).

1
Explicit Forward Finite Difference Method Zero Dirichlet d’Alembert’s Solution

ui,j+1 − ui,j ui−1,j − 2ui,j + ui+1,j utt = c2 uxx u(x, 0) = f (x) ut (x, 0) = g(x)
ut = uxx =
k h2 u(0, t) = 0 u(L, t) = 0
Z x+ct
Stable if c2 k/h2 ≤ 0.5 F (x + ct) + F (x − ct) 1
u(x, t) = + G(s) ds
2 2c x−ct
Implicit Backward Finite Difference Method F and G are Fourier sine series of f and g respectively.
ui,j+1 − ui,j
ut = Zero Neumann d’Alembert’s Solution
k
ui−1,j+1 − 2ui,j+1 + ui+1,j+1 utt = c2 uxx u(x, 0) = f (x) ut (x, 0) = g(x)
uxx =
h2
ux (0, t) = 0 ux (L, t) = 0
Always stable. F (x + ct) + F (x − ct) 1
Z x+ct
u(x, t) = + G(s) ds
2 2c x−ct
Crank-Nicholson Method
F and G are Fourier cosine series of f and g respectively.
ui,j+1 − ui,j
ut =
k CTCS Explicit Wave Method
ui−1,j − 2ui,j + ui+1,j
uxx = ui,j−1 − 2ui,j + ui,j+1
2h2 utt =
ui−1,j+1 − 2ui,j+1 + ui+1,j+1 k2
+ ui−1,j − 2ui,j + ui+1,j
2h2 uxx =
h2
Always stable. Initially (j = 0) use the second order centred difference
for the derivative condition to eliminate the ui,−1 term.
Method of Characteristics Stable if |ck/h| ≤ 1
aux + but = c
Implicit Wave Method
Taking 2 of the 3 differential combinations solves the PDE. ui,j−1 − 2ui,j + ui,j+1
utt =
dx dt du k2
= = u i−1,j−1 − 2ui,j−1 + ui+1,j−1
a b c uxx =
2h2
Solution is unique on all characteristic curves passing ui−1,j+1 − 2ui,j+1 + ui+1,j+1
through the initial condition. +
2h2
Initially the finite difference equation is the same as the
FTFS Method
CTCS method. Always stable.
ui,j+1 − ui,j ui+1,j − ui,j
ut = ux =
k h Elliptic PDEs
Laplace PDE is uxx + uyy = 0
Stable if a/b ≤ 0 and |ak/(bh)| ≤ 1
Poisson PDE is uxx + uyy = f (x, y)
Both PDEs are solved analytically by using separation of
FTBS Method
variables u = F (x)G(y) or u = F (x) + G(y)
ui,j+1 − ui,j ui,j − ui−1,j
ut = ux = Implicit Method
k h
Stable if a/b ≥ 0 and |ak/(bh)| ≤ 1 ui−1,j − 2ui,j + ui+1,j
uxx =
h2
Lax-Wendroff Method ui,j−1 − 2ui,j + ui,j+1
uyy =
Convert the PDE using second order centred differences. k2
Then create another scheme by differentiating the PDE Always stable.
with respect to each variable to create another 2 PDEs.
Eliminate the mixed derivative, then convert the PDE Gauss-Newton Method
using second order centred differences. Eliminate the The (model - actual) differences f vector, the Jacobian J
ui,j−1 term. Stable if |ak/(bh)| ≤ 1 matrix, and the b vectors are
   
f0 ∂f0 /∂A ∂f0 /∂B
d’Alembert’s Solution  
A
f =  ...  J = .. .. b =
   
The 1D wave PDE defined on the interval 0 ≤ x ≤ L . .  B
fn ∂fn /∂A ∂fn /∂B
utt = c2 uxx u(x, 0) = f (x) ut (x, 0) = g(x)
Better estimates for the parameters are found by using
Z x+ct
f (x + ct) + f (x − ct) 1
u(x, t) = + g(s) ds b N EW = b OLD − (J T J )−1 (J T f )
2 2c x−ct

You might also like