ENG 303 · Engineering Mathematics V (Numerical Methods and Computer Application)
Our notes
2 min readBoundary-value problems
Conditions are given at two ends: deflection of a beam fixed at both ends, temperature in a fin, flow between plates.
- Shooting method: guess the missing initial slope, solve as an initial-value problem (RK4), see how far you miss the far boundary, and correct the slope (by secant iteration) until you hit it.
- Finite differences: replace derivatives at grid points with difference formulas and solve the resulting linear system.
Finite-difference BVP example
y″ = 6x, y(0) = 0, y(1) = 1 (exact solution y = x³). Take h = 0.5, one interior point x₁ = 0.5:
(y₀ − 2y₁ + y₂)/h² = 6x₁ → (0 − 2y₁ + 1)/0.25 = 3 → −2y₁ + 1 = 0.75 → y₁ = 0.125, exactly 0.5³ (the central formula is exact for cubics, since y⁗ = 0). With more points the equations form a tridiagonal system, solved quickly by the Thomas algorithm.
The heat equation
uₜ = α uₓₓ (temperature along a rod). Grid spacing Δx in space and Δt in time; write uᵢⁿ for the value at node i and time level n, and r = αΔt/Δx².
Explicit (FTCS) scheme: uᵢⁿ⁺¹ = uᵢⁿ + r(uᵢ₋₁ⁿ − 2uᵢⁿ + uᵢ₊₁ⁿ). Simple, but stable only if r ≤ 1/2.
Worked example. α = 1, rod 0 ≤ x ≤ 1 with ends held at 0, u(x, 0) = sin(πx), Δx = 0.25, r = 0.25 (Δt = 0.015625). Initial nodes: 0, 0.7071, 1, 0.7071, 0.
- Middle node: 1 + 0.25(0.7071 − 2 + 0.7071) = 0.8536.
- Node x = 0.25: 0.7071 + 0.25(0 − 1.4142 + 1) = 0.6036.
Exact middle value e^(−π²t) = e^(−0.154213) = 0.8571: close for such a coarse grid. With r = 0.6 the solution would soon oscillate and grow.
Implicit schemes
Backward Euler and Crank-Nicolson (average of explicit and implicit) are stable for any r; each step needs a tridiagonal solve. Crank-Nicolson is second order in time and space.
Other PDEs
- Laplace's equation uₓₓ + u_yy = 0 (steady temperature, seepage under a dam): on a square grid each interior value equals the average of its four neighbours; solve by Gauss-Seidel or SOR.
- Wave equation uₜₜ = c²uₓₓ: explicit scheme stable if cΔt/Δx ≤ 1 (the CFL condition).
Exams usually ask: set up and solve a small finite-difference BVP; describe the shooting method; carry out explicit heat-equation steps; state and explain the stability condition r ≤ 1/2; write the five-point Laplace formula.
Common mistake: choosing Δt and Δx independently in the explicit heat scheme. Check r = αΔt/Δx² first: halving Δx means quartering Δt.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
Best pick Kaw, Numerical Methods with Applications: Finite difference method for ODEs
Textbook chapter (PDF, about 0.9 MB) with worked examples and a short quiz at the end.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications: Finite difference method for ODEs, CC BY-NC-ND 4.0 · licence
-
Kaw, Numerical Methods with Applications: Shooting method
Textbook chapter (PDF, about 0.3 MB) with worked examples and a short quiz at the end.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications: Shooting method, CC BY-NC-ND 4.0 · licence
-
Kaw, Numerical Methods with Applications: Parabolic partial differential equations
Textbook chapter (PDF, about 1.5 MB) with worked examples and a short quiz at the end.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications: Parabolic partial differential equations, CC BY-NC-ND 4.0 · licence
-
Kaw, Numerical Methods with Applications: Elliptic partial differential equations
Textbook chapter (PDF, about 1.1 MB) with worked examples and a short quiz at the end.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications: Elliptic partial differential equations, CC BY-NC-ND 4.0 · licence
-
Finite difference method
(opens en.wikipedia.org in a new tab)
Wikipedia, Finite difference method, CC BY-SA 4.0 · licence
-
NOUN MTH 307: Numerical Analysis II
NOUN course book (PDF, about 0.6 MB). Initial and boundary value problems, finite differences, Laplace's equation on a rectangle.
(opens nou.edu.ng in a new tab)
-
Kaw, Numerical Methods with Applications (the whole free textbook)
Every chapter as a separate PDF (0.2 to 1.5 MB each), with videos and quizzes for each method.
(opens nm.mathforcollege.com in a new tab)
Kaw, Numerical Methods with Applications, Kaw, Numerical Methods with Applications (the whole free textbook), CC BY-NC-ND 4.0 · licence
Watch
-
Chapter 08.07: Lesson: Finite Difference Method for Solving ODEs: Background: Part 1 of 2
4 min · ≈ 18 MB · about ₦10
(opens youtube.com in a new tab)
-
Chapter 08.07: Lesson: Finite Difference Method for Solving ODEs: Example: Part 1 of 2
10 min · ≈ 45 MB · about ₦25
(opens youtube.com in a new tab)
-
Chapter 10.02: Lesson: Introduction to Numerically Solving Parabolic PDEs
9 min · ≈ 41 MB · about ₦23
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.