No title

 

📘 Comprehensive Numerical Methods Cheat Sheet


✅ 1. Euler’s Method (1st Order ODE)

Purpose: Solve initial value problems (IVPs) of the form:

dydx=f(x,y),y(x0)=y0

Formula:

yn+1=yn+hf(xn,yn)

Key Elements:

  • Step Size (h): Determines accuracy (smaller h = better precision).

  • Local Truncation ErrorO(h2).

  • Global ErrorO(h) (first-order method).

Limitation: Poor accuracy for nonlinear or stiff equations.


✅ 2. Modified Euler’s Method (Predictor-Corrector)

Purpose: Improved accuracy over Euler’s method.

Steps:

  1. Predictor (Euler’s Step):

    yn+1=yn+hf(xn,yn)
  2. Corrector (Trapezoidal Rule):

    yn+1=yn+h2[f(xn,yn)+f(xn+1,yn+1)]

Key Elements:

  • ErrorO(h3) local, O(h2) global.

  • Advantage: Balances simplicity and accuracy.


✅ 3. Runge-Kutta 2nd Order (RK-2)

Variants: Midpoint Method or Heun’s Method.
General Form:

yn+1=yn+hΦ(xn,yn,h)

Midpoint Method:

Φ=f(xn+h2,yn+h2k1),k1=f(xn,yn)

Heun’s Method:

Φ=12(k1+k2),k2=f(xn+h,yn+hk1)

Key Elements:

  • ErrorO(h3) local, O(h2) global.

  • Use Case: Moderate accuracy requirements.


✅ 4. Runge-Kutta 4th Order (RK-4)

Purpose: High-precision solution for IVPs.

Slopes:

k1=hf(xn,yn),k2=hf(xn+h2,yn+k12),k3=hf(xn+h2,yn+k22),k4=hf(xn+h,yn+k3).

Update:

yn+1=yn+16(k1+2k2+2k3+k4)

Key Elements:

  • ErrorO(h5) local, O(h4) global.

  • Applications: Aerospace, physics simulations.


✅ 5. Newton’s Forward Interpolation

Purpose: Estimate values near the start of equally spaced data.
Formula:

Pn(x)=y0+pΔy0+p(p1)2!Δ2y0+

where p=xx0h, and Δ is the forward difference operator.

Key Elements:

  • Forward Differences:
    Δy0=y1y0Δ2y0=Δy1Δy0, etc.

  • Use Case: Extrapolation near x0.


✅ 6. Newton’s Backward Interpolation

Purpose: Estimate values near the end of equally spaced data.
Formula:

Pn(x)=yn+pyn+p(p+1)2!2yn+

where p=xxnh, and  is the backward difference operator.

Key Elements:

  • Backward Differences:
    yn=ynyn12yn=ynyn1, etc.

  • Use Case: Extrapolation near xn.


✅ 7. Classification of 2nd Order PDEs

General Form:

Auxx+Buxy+Cuyy+lower-order terms=0

Discriminant (D):

D=B24AC

Classification:

  • Elliptic (D<0): Boundary value problems (e.g., Laplace’s equation uxx+uyy=0).

  • Parabolic (D=0): Initial value problems (e.g., Heat equation ut=αuxx).

  • Hyperbolic (D>0): Wave propagation (e.g., Wave equation utt=c2uxx).


✅ 8. Bender-Schmidt Method (Parabolic PDEs)

Purpose: Solve the 1D heat equation:

ut=α2ux2

Explicit Formula:

uij+1=rui1j+(12r)uij+rui+1j

where r=αΔt(Δx)2.

Key Elements:

  • Stability Conditionr12.

  • Grid SpacingΔx (space step), Δt (time step).

  • Limitation: Conditionally stable.


📌 Summary of Errors & Orders

MethodLocal ErrorGlobal Error
Euler’sO(h2)O(h)
Modified EulerO(h3)O(h2)
RK-2O(h3)O(h2)
RK-4O(h5)O(h4)

🎯 When to Use Which?

  • Quick Estimate: Euler’s Method.

  • Balanced Accuracy-Speed: RK-2 or Modified Euler.

  • High Precision: RK-4.

  • Interpolation: Newton’s Forward/Backward.

  • PDEs: Bender-Schmidt for parabolic, classification guides solver choice.

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post