0% found this document useful (0 votes)
7 views21 pages

Numerical Methods Formula Guide

The document provides a comprehensive guide on numerical methods, including Euler's Method, Modified Euler's Method, Runge-Kutta 4th Order, and Newton's Interpolation Derivatives. It outlines the formulas, step-by-step processes, and solved examples for each method, making it easy to understand and apply. The content is structured into units that cover various numerical integration techniques and their applications.

Uploaded by

ayaan.23bai10476
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)
7 views21 pages

Numerical Methods Formula Guide

The document provides a comprehensive guide on numerical methods, including Euler's Method, Modified Euler's Method, Runge-Kutta 4th Order, and Newton's Interpolation Derivatives. It outlines the formulas, step-by-step processes, and solved examples for each method, making it easy to understand and apply. The content is structured into units that cover various numerical integration techniques and their applications.

Uploaded by

ayaan.23bai10476
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

NUMERICAL METHODS

Complete Formula Guide & Solved Examples

Euler • Modified Euler • Runge-Kutta 4th Order

Newton Interpolation Derivatives • Newton-Cotes Rules

Trapezoidal • Simpson's 1/3 & 3/8 • Gauss-Legendre Quadrature

Easy to understand — desi style! ■■

■ Contents

# Topic Description

1 Euler's Method Solving ODEs step-by-step

2 Modified Euler's Method Predictor-Corrector approach

3 Runge-Kutta 4th Order (RK4) The most popular ODE solver

Newton's Forward Interpolation


4 Derivative Derivative at start of table

Newton's Backward Interpolation


5 Derivative Derivative at end of table

6 Newton-Cotes Quadrature General numerical integration

7 Trapezoidal Rule Simplest integration rule

8 Simpson's 1/3 Rule Parabolic approximation

9 Simpson's 3/8 Rule Cubic approximation


10 Gauss-Legendre 2-Point Rule Optimal 2-point quadrature

11 Gauss-Legendre 3-Point Rule Optimal 3-point quadrature


UNIT 1

Euler's Method
Simplest ODE Solver — Like walking step by step!

What is it?
We have a differential equation: dy/dx = f(x, y) with initial condition y(x0) = y0.

Euler's method says: "From current point, move a tiny step h in the x-direction, and estimate y using the
current slope."

Think of it like this — you're walking on a hilly road. At each step, you look at the current slope and take a
small step. You don't look ahead, just the current direction!

■ Euler's Formula
yn+1 = yn + h · f(xn, yn)

xn+1 = xn + h

Step-by-Step Process
Step 1: Start with given x0, y0 and step size h.

Step 2: Calculate slope k = f(xn, yn)

Step 3: Apply: yn+1 = yn + h·k

Step 4: Update xn+1 = xn + h

Step 5: Repeat until you reach the required x value.

■ Quick Tip: Remember h (step size) — smaller h = more accurate result but more calculations!

✏■ Solved Example
Q: Solve dy/dx = x + y, y(0) = 1. Find y(0.2) using Euler's method with h = 0.1

Given: f(x,y) = x + y, x■ = 0, y■ = 1, h = 0.1

Step 1: Find y(0.1)


k■ = f(0, 1) = 0 + 1 = 1
y■ = y■ + h·k■ = 1 + 0.1 × 1 = 1.1
x■ = 0 + 0.1 = 0.1

Step 2: Find y(0.2)


k■ = f(0.1, 1.1) = 0.1 + 1.1 = 1.2
y■ = y■ + h·k■ = 1.1 + 0.1 × 1.2 = 1.1 + 0.12 = 1.22
x■ = 0.1 + 0.1 = 0.2

■ y(0.2) ≈ 1.22 (Exact value = 1.2428, error = 0.0228)


UNIT 2

Modified Euler's Method


Predictor-Corrector — First guess, then correct!

What's the idea?


Euler's method only uses the slope at the START of the interval. Modified Euler's method is smarter — it
predicts a value first, then corrects it using the average of slopes at both ends.

Like this: You take one step forward (predict), look around, average the old and new slopes, then correct
your position. Much more accurate!

■ Modified Euler's Formula (Heun's Method)


Predictor: y*n+1 = yn + h · f(xn, yn)

Corrector: yn+1 = yn + (h/2) · [ f(xn, yn) + f(xn+1, y*n+1) ]

Step-by-Step Process
Step 1: Predict y* using simple Euler formula.

Step 2: Calculate slope at predicted point: f(xn+1, y*)

Step 3: Average the two slopes: (slope at start + slope at predicted end) / 2

Step 4: Correct y using this average slope.

Step 5: Repeat for next step.

■ Quick Tip: The correction step can be iterated multiple times for better accuracy. Usually 1-2 corrections
are enough.
✏■ Solved Example
Q: Solve dy/dx = x + y, y(0) = 1. Find y(0.1) using Modified Euler's method with h = 0.1

Given: f(x,y) = x + y, x■ = 0, y■ = 1, h = 0.1

PREDICTOR step:
y* = y■ + h · f(x■, y■)
y* = 1 + 0.1 × f(0, 1)
y* = 1 + 0.1 × (0 + 1) = 1 + 0.1 = 1.1

CORRECTOR step:
Slope at start = f(0, 1) = 0 + 1 = 1.0
Slope at end = f(0.1, 1.1) = 0.1 + 1.1 = 1.2
Average slope = (1.0 + 1.2) / 2 = 1.1

y■ = y■ + h × (average slope)
y■ = 1 + 0.1 × 1.1 = 1 + 0.11 = 1.11

■ y(0.1) ≈ 1.11 (Exact ≈ 1.1103 — super close! ■)


UNIT 3

Runge-Kutta 4th Order (RK4)


The Gold Standard ODE Solver — 4 slopes, 1 genius formula!

What's the idea?


RK4 calculates 4 different slopes at different points within the interval and combines them as a weighted
average. It's like checking the slope at the start, twice in the middle, and once at the end — giving excellent
accuracy!

RK4 is the most widely used method in practice. When someone says 'numerical ODE solver', 9 out of 10
times they mean RK4!

■ RK4 Formulas
k1 = h · f(xn, yn)

k2 = h · f(xn + h/2, yn + k1/2)

k3 = h · f(xn + h/2, yn + k2/2)

k4 = h · f(xn + h, yn + k3)

yn+1 = yn + (1/6)(k1 + 2k2 + 2k3 + k4)

Weights breakdown: k■ gets weight 1, k■ gets weight 2, k■ gets weight 2, k■ gets weight 1. Total = 6. So
we divide by 6.

Think of it as: Start slope + 2×(Mid slope 1) + 2×(Mid slope 2) + End slope, all divided by 6

■ Quick Tip: Always calculate k1 → k2 → k3 → k4 in ORDER. Each depends on the previous one!
✏■ Solved Example
Q: Solve dy/dx = xy, y(0) = 1. Find y(0.1) using RK4 with h = 0.1

Given: f(x,y) = xy, x■ = 0, y■ = 1, h = 0.1

Calculate k■:
k■ = h · f(x■, y■) = 0.1 × f(0, 1) = 0.1 × (0 × 1) = 0.1 × 0 = 0

Calculate k■:
k■ = h · f(x■ + h/2, y■ + k■/2)
= 0.1 × f(0 + 0.05, 1 + 0)
= 0.1 × f(0.05, 1) = 0.1 × (0.05 × 1) = 0.1 × 0.05 = 0.005

Calculate k■:
k■ = h · f(x■ + h/2, y■ + k■/2)
= 0.1 × f(0.05, 1 + 0.0025)
= 0.1 × f(0.05, 1.0025) = 0.1 × (0.05 × 1.0025) = 0.1 × 0.050125 = 0.0050125

Calculate k■:
k■ = h · f(x■ + h, y■ + k■)
= 0.1 × f(0.1, 1 + 0.0050125)
= 0.1 × f(0.1, 1.0050125) = 0.1 × (0.1 × 1.0050125) = 0.1 × 0.10050125 = 0.010050

Final calculation:
y■ = y■ + (1/6)(k■ + 2k■ + 2k■ + k■)
= 1 + (1/6)(0 + 2(0.005) + 2(0.0050125) + 0.010050)
= 1 + (1/6)(0 + 0.01 + 0.010025 + 0.010050)
= 1 + (1/6)(0.030075)
= 1 + 0.0050125
■ y(0.1) ≈ 1.00501 (Exact = e^0.005 ≈ 1.00501 — virtually perfect! ■)
UNIT 4

Newton's Forward Interpolation — Derivatives


Use at the BEGINNING of the table

Difference Table — Build this first!


Given tabulated values, we first build a Forward Difference Table:

∆y■ = y■ - y■ (1st difference)

∆²y■ = ∆y■ - ∆y■ (2nd difference)

∆³y■ = ∆²y■ - ∆²y■ ... and so on.

Use p = (x - x■) / h where x■ is the first value and h is the equal step size.

■ Newton's Forward Derivative Formulas


dy/dx = (1/h)[ ∆y■ + ((2p-1)/2)∆²y■ + ((3p²-6p+2)/6)∆³y■ + ... ]

d²y/dx² = (1/h²)[ ∆²y■ + (p-1)∆³y■ + ((6p²-18p+11)/12)∆■y■ + ... ]

At x = x■ (i.e., p = 0):

(dy/dx) at x■ = (1/h)[ ∆y■ - (1/2)∆²y■ + (1/3)∆³y■ - (1/4)∆■y■ + ... ]

■ Quick Tip: Use FORWARD formula when x is near the BEGINNING of the table. p will be small (near 0).
✏■ Solved Example
Q: Given: x = 1.0, 1.2, 1.4, 1.6 and y = 2.7183, 3.3201, 4.0552, 4.9530. Find dy/dx at x = 1.0

Step 1: Build Forward Difference Table (h = 0.2)


x y ∆y ∆²y ∆³y
1.0 2.7183
0.6018
1.2 3.3201 0.1333
0.7351 0.0294
1.4 4.0552 0.1627
0.8978
1.6 4.9530

Step 2: At x = x■ = 1.0, use p = 0 formula:


dy/dx = (1/h)[∆y■ - (1/2)∆²y■ + (1/3)∆³y■]
dy/dx = (1/0.2)[0.6018 - (1/2)(0.1333) + (1/3)(0.0294)]
dy/dx = 5 × [0.6018 - 0.0667 + 0.0098]
dy/dx = 5 × 0.5449
■ dy/dx at x = 1.0 ≈ 2.7245 (Note: e^1.0 = 2.7183 — very close! ■)
UNIT 5

Newton's Backward Interpolation — Derivatives


Use at the END of the table

Key Difference from Forward


Same idea — but now we use Backward Differences (∇) and measure p from the LAST point x■.

∇y■ = y■ - y■■■ (1st backward difference)

∇²y■ = ∇y■ - ∇y■■■ (2nd backward difference)

Use p = (x - x■) / h where x■ is the LAST x-value.

■ Newton's Backward Derivative Formulas


dy/dx = (1/h)[ ∇y■ + ((2p+1)/2)∇²y■ + ((3p²+6p+2)/6)∇³y■ + ... ]

At x = x■ (i.e., p = 0):

(dy/dx) at x■ = (1/h)[ ∇y■ + (1/2)∇²y■ + (1/3)∇³y■ + (1/4)∇■y■ + ... ]

■ Quick Tip: Use BACKWARD formula when x is near the END of the table. p will be 0 or small negative.
✏■ Solved Example
Q: Using the same table: x = 1.0, 1.2, 1.4, 1.6 and y = 2.7183, 3.3201, 4.0552, 4.9530. Find dy/dx at x =
1.6

Step 1: Build Backward Difference Table (h = 0.2)


x y ∇y ∇²y ∇³y
1.0 2.7183
0.6018
1.2 3.3201 0.1333
0.7351 0.0294
1.4 4.0552 0.1627
0.8978
1.6 4.9530

At x■ = 1.6, p = 0:
∇y■ = 0.8978, ∇²y■ = 0.1627, ∇³y■ = 0.0294

dy/dx = (1/h)[∇y■ + (1/2)∇²y■ + (1/3)∇³y■]


dy/dx = (1/0.2)[0.8978 + (1/2)(0.1627) + (1/3)(0.0294)]
dy/dx = 5 × [0.8978 + 0.0814 + 0.0098]
dy/dx = 5 × 0.9890
■ dy/dx at x = 1.6 ≈ 4.9450 (e^1.6 = 4.9530 — excellent! ■)
UNIT 6

Newton-Cotes Quadrature Rule


The Family of Integration Rules — Parent of Trapezoidal & Simpson's!

What is it?
Newton-Cotes formulas are a group of numerical integration rules based on polynomial interpolation. They
all assume equally spaced points.

The general idea: Instead of integrating f(x) directly (which may be complicated), we approximate f(x) with a
simple polynomial and integrate that.

The general Newton-Cotes formula of order n is:

■ General Newton-Cotes Formula


∫[a to b] f(x) dx ≈ h · Σ w■ · f(x■)

where h = (b-a)/n, and w■ are the Newton-Cotes weights

n=1: Trapezoidal Rule | n=2: Simpson's 1/3 | n=3: Simpson's 3/8

Closed formulas include endpoints. Open formulas exclude endpoints.

All Trapezoidal, Simpson's rules are CLOSED Newton-Cotes formulas.

■ Quick Tip: Higher order Newton-Cotes isn't always better! For n ≥ 8, they can actually become unstable
(Runge's phenomenon). Use composite rules instead.

✏■ Solved Example
Q: Evaluate ∫[0 to 1] x² dx using Newton-Cotes (n=1 subintervals) — Trapezoidal, to see the concept

The Newton-Cotes n=1 formula (Trapezoidal):


∫ f(x) dx ≈ h/2 × [f(x■) + f(x■)]

With a=0, b=1, n=1: h = (1-0)/1 = 1


f(0) = 0² = 0
f(1) = 1² = 1

∫[0 to 1] x² dx ≈ (1/2) × [0 + 1] = 0.5

Exact answer = [x³/3] from 0 to 1 = 1/3 = 0.333...


■ Approx = 0.5 (Error = 0.167 — Newton-Cotes n=2 will be much better!)
UNIT 7

Trapezoidal Rule
Approximate the curve using trapezoids — Simple and effective!

The Idea
Divide [a, b] into n equal strips of width h = (b-a)/n. In each strip, approximate the curve as a straight line →
trapezoid shape.

Area of each trapezoid = h/2 × (sum of two heights). Add them all up!

■ Composite Trapezoidal Rule


∫[a to b] f(x) dx ≈ (h/2) [ y■ + 2y■ + 2y■ + ... + 2y■■■ + y■ ]

where h = (b-a)/n and y■ = f(x■)

Pattern: First + Last + 2×(All Middle terms)

Error = -(b-a)h²/12 × f''(ξ) for some ξ in [a,b]

■ Quick Tip: Memory trick: '1-2-2-2-...-2-1' pattern multiplied by h/2. First and last have coefficient 1, all
middle have coefficient 2!

✏■ Solved Example
Q: Evaluate ∫[0 to 1] 1/(1+x) dx using Trapezoidal rule with n=4 strips

Setup: a=0, b=1, n=4, h=(1-0)/4 = 0.25

Build the table:


x■ = 0.00, y■ = 1/(1+0) = 1.0000
x■ = 0.25, y■ = 1/(1+0.25) = 0.8000
x■ = 0.50, y■ = 1/(1+0.50) = 0.6667
x■ = 0.75, y■ = 1/(1+0.75) = 0.5714
x■ = 1.00, y■ = 1/(1+1) = 0.5000

Apply formula:
∫ ≈ (h/2)[y■ + 2y■ + 2y■ + 2y■ + y■]
= (0.25/2)[1.0000 + 2(0.8000) + 2(0.6667) + 2(0.5714) + 0.5000]
= 0.125 × [1.0000 + 1.6000 + 1.3334 + 1.1428 + 0.5000]
= 0.125 × 5.5762
= 0.6970
■ ≈ 0.6970 (Exact = ln(2) = 0.6931 — error is only 0.004! ■)
UNIT 8

Simpson's 1/3 Rule


Fit parabolas instead of lines — More accurate than Trapezoidal!

The Idea
Instead of approximating with straight lines (trapezoids), we use parabolas through every 3 consecutive
points. More accurate!

IMPORTANT: n must be EVEN (2, 4, 6, 8, ...) for Simpson's 1/3 rule.

■ Composite Simpson's 1/3 Rule


∫[a to b] f(x) dx ≈ (h/3) [ y■ + 4y■ + 2y■ + 4y■ + 2y■ + ... + 4y■■■ + y■ ]

Pattern: 1 - 4 - 2 - 4 - 2 - ... - 4 - 1 (multiply by h/3)

Error = -(b-a)h■/180 × f''''(ξ) → Much smaller error than Trapezoidal!

■ Quick Tip: Memory trick: '1-4-2-4-2-...-4-1'. First=1, Last=1, Odd positions=4, Even positions=2. Multiply
by h/3.

✏■ Solved Example
Q: Evaluate ∫[0 to 1] 1/(1+x) dx using Simpson's 1/3 rule with n=4

Setup: a=0, b=1, n=4 (even ■), h=0.25

Same table as before:


y■ = 1.0000 (coeff = 1)
y■ = 0.8000 (coeff = 4, odd index)
y■ = 0.6667 (coeff = 2, even middle)
y■ = 0.5714 (coeff = 4, odd index)
y■ = 0.5000 (coeff = 1)

Apply formula:
∫ ≈ (h/3)[y■ + 4y■ + 2y■ + 4y■ + y■]
= (0.25/3)[1.0000 + 4(0.8000) + 2(0.6667) + 4(0.5714) + 0.5000]
= (0.0833)[1.0000 + 3.2000 + 1.3334 + 2.2856 + 0.5000]
= 0.0833 × 8.3190
= 0.6932
■ ≈ 0.6932 (Exact = 0.6931 — ALMOST PERFECT! ■ Simpson's wins!)
UNIT 9

Simpson's 3/8 Rule


Fit cubics through 4 points — Use when n is a multiple of 3!

When to use 3/8 rule?


Use Simpson's 3/8 rule when n is a multiple of 3 (3, 6, 9, ...). It uses a cubic (degree 3) polynomial through
every 4 consecutive points.

It's slightly more accurate than 1/3 rule per interval but requires 3 sub-intervals at a time.

■ Composite Simpson's 3/8 Rule


∫[a to b] f(x) dx ≈ (3h/8) [ y■ + 3y■ + 3y■ + 2y■ + 3y■ + 3y■ + 2y■ + ... + y■ ]

Pattern: 1 - 3 - 3 - 2 - 3 - 3 - 2 - ... - 3 - 3 - 1 (multiply by 3h/8)

n must be a multiple of 3!

■ Quick Tip: Pattern for 3/8: '1-3-3-2-3-3-2-...-3-3-1'. First=1, Last=1, Every 3rd interior=2, All others=3.

✏■ Solved Example
Q: Evaluate ∫[0 to 3] x² dx using Simpson's 3/8 rule with n=3

Setup: a=0, b=3, n=3 (multiple of 3 ■), h=(3-0)/3 = 1

Build the table:


x■ = 0, y■ = 0² = 0 (coeff = 1)
x■ = 1, y■ = 1² = 1 (coeff = 3)
x■ = 2, y■ = 2² = 4 (coeff = 3)
x■ = 3, y■ = 3² = 9 (coeff = 1)

Apply formula:
∫ ≈ (3h/8)[y■ + 3y■ + 3y■ + y■]
= (3×1/8)[0 + 3(1) + 3(4) + 9]
= (3/8)[0 + 3 + 12 + 9]
= (3/8) × 24
= 72/8 = 9
■ = 9 (Exact = [x³/3] from 0 to 3 = 27/3 = 9 — EXACT! ■)
UNIT 10

Gauss-Legendre 2-Point Quadrature


Optimal 2-point formula — No equal spacing needed!

What's different about Gaussian Quadrature?


Newton-Cotes methods use equally spaced points. Gaussian quadrature is smarter — it chooses the
best points (not equally spaced) to maximize accuracy.

For n points, Gaussian quadrature gives exact results for polynomials up to degree 2n-1. Two points →
exact for degree 3 polynomials. Amazing!

Key step: First change the limits from [a, b] to [-1, 1] using substitution: x = ((b+a)/2) + ((b-a)/2)·t

■ 2-Point Gauss-Legendre Formula


∫[-1 to 1] f(t) dt ≈ f(t■) + f(t■)

where t■ = -1/√3 ≈ -0.5774 and t■ = +1/√3 ≈ +0.5774

Both weights w■ = w■ = 1

For [a,b]: x = ((b-a)/2)·t + ((a+b)/2), multiply result by (b-a)/2

■ Quick Tip: The points t■ and t■ are the roots of the Legendre polynomial P■(t) = (3t²-1)/2. Weights are
both 1.
✏■ Solved Example
Q: Evaluate ∫[0 to 1] e^x dx using 2-point Gauss-Legendre quadrature

Step 1: Transform limits from [0,1] to [-1,1]


a = 0, b = 1
x = ((b-a)/2)·t + (a+b)/2 = (0.5)·t + 0.5
dx = 0.5 dt
So: ∫[0 to 1] e^x dx = 0.5 × ∫[-1 to 1] e^(0.5t+0.5) dt

Step 2: Apply 2-point formula


t■ = -0.5774, x■ = 0.5(-0.5774) + 0.5 = 0.2113
t■ = +0.5774, x■ = 0.5(+0.5774) + 0.5 = 0.7887

f(t■) = e^(x■) = e^0.2113 = 1.2353


f(t■) = e^(x■) = e^0.7887 = 2.2008

Step 3: Sum with weights (both = 1) and multiply by (b-a)/2 = 0.5


∫ ≈ 0.5 × [w■·f(t■) + w■·f(t■)]
= 0.5 × [1×1.2353 + 1×2.2008]
= 0.5 × 3.4361
= 1.7181
■ ≈ 1.7181 (Exact = e¹ - e■ = 1.7183 — only 2 points and nearly exact! ■)
UNIT 11

Gauss-Legendre 3-Point Quadrature


3 optimal points → exact for polynomials up to degree 5!

3-Point Formula
With 3 cleverly chosen points and weights, we get an exact result for any polynomial up to degree 2×3-1 =
5. That's incredible — 3 points doing the work of 6!

The 3 points are the roots of the Legendre polynomial P■(t) = (5t³ - 3t)/2.

■ 3-Point Gauss-Legendre Formula


∫[-1 to 1] f(t) dt ≈ w■·f(t■) + w■·f(t■) + w■·f(t■)

Points: t■ = -√(3/5) ≈ -0.7746, t■ = 0, t■ = +√(3/5) ≈ +0.7746

Weights: w■ = 5/9 ≈ 0.5556, w■ = 8/9 ≈ 0.8889, w■ = 5/9 ≈ 0.5556

For [a,b]: multiply result by (b-a)/2 and substitute x = ((b-a)/2)·t + ((a+b)/2)

■ Quick Tip: Remember weights: outer two = 5/9, middle one = 8/9. Total = 5/9 + 8/9 + 5/9 = 18/9 = 2
(always adds to 2 for [-1,1] interval).

Quick Comparison: Gauss-Legendre Points & Weights

n Points t■ Weights w■ Exact for degree

1 t=0 w=2 ≤1

2 ±0.5774 1, 1 ≤3

3 0, ±0.7746 8/9, 5/9, 5/9 ≤5

4 ±0.3399, ±0.8611 0.6521, 0.3479, ... ≤7


✏■ Solved Example
Q: Evaluate ∫[0 to 1] x³ dx using 3-point Gauss-Legendre quadrature

Step 1: Transform [0,1] → [-1,1]


x = 0.5t + 0.5, dx = 0.5 dt
∫[0 to 1] x³ dx = 0.5 × ∫[-1 to 1] (0.5t+0.5)³ dt

Step 2: Calculate at 3 Gauss points


t■ = -0.7746 → x■ = 0.5(-0.7746) + 0.5 = 0.1127 → x■³ = 0.001433
t■ = 0 → x■ = 0.5(0) + 0.5 = 0.5 → x■³ = 0.125000
t■ = +0.7746 → x■ = 0.5(0.7746) + 0.5 = 0.8873 → x■³ = 0.698050

Step 3: Apply weights and multiply by (b-a)/2 = 0.5


∫ ≈ 0.5 × [w■·f■ + w■·f■ + w■·f■]
= 0.5 × [(5/9)(0.001433) + (8/9)(0.125000) + (5/9)(0.698050)]
= 0.5 × [0.000796 + 0.111111 + 0.387806]
= 0.5 × 0.499713
= 0.24986
■ ≈ 0.25000 (Exact = [x■/4] from 0 to 1 = 0.25 — EXACT to 4 decimals! ■)
UNIT ★

Quick Reference Cheat Sheet


All formulas at a glance — Print this page!

Method Formula Key Condition

Euler's y_{n+1} = y_n + h·f(x_n, y_n) Simple, least accurate

y* = Euler predict; y_{n+1} = y_n + h/2·[f_n +


Mod. Euler Predictor-Corrector
f(x_{n+1},y*)]

Most accurate ODE


RK4 y_{n+1} = y_n + (k1+2k2+2k3+k4)/6
solver

Fwd Deriv
dy/dx = (1/h)[∆y■ - ∆²y■/2 + ∆³y■/3 - ...] Use at start of table
(p=0)

Bwd Deriv
dy/dx = (1/h)[∇y_n + ∇²y_n/2 + ∇³y_n/3 + ...] Use at end of table
(p=0)

Trapezoidal (h/2)[y■ + 2(y■+...+y_{n-1}) + y_n] Any n; least accurate

Simpson 1/3 (h/3)[y■ + 4y■ + 2y■ + 4y■ + ... + y_n] n must be EVEN

Simpson 3/8 (3h/8)[y■ + 3y■ + 3y■ + 2y■ + ... + y_n] n multiple of 3

GL 2-point (b-a)/2 × [f(t■)+f(t■)], t=±0.5774, w=1 Exact up to degree 3

GL 3-point (b-a)/2 × [5/9·f(t■) + 8/9·f(t■) + 5/9·f(t■)] Exact up to degree 5

■ Quick Tip: For EXAM: ODE problems → check if Euler/[Link]/RK4. Derivative problems → build
difference table first. Integration → check if n is even (Simpson 1/3) or multiple of 3 (3/8). No equal spacing
needed? → Use Gauss-Legendre!

Made with ❤■ for students of Numerical Methods | All the best for your exams! ■

You might also like