Module 2: Mathematical methods · Lesson 2.4 · about 50 min
Numerical methods: roots, integration and ODEs
Bisection, Newton-Raphson, secant and fixed-point iteration with their orders of convergence and failure modes; interpolation and finite differences; trapezoidal, Simpson and Gauss quadrature with error laws and Richardson extrapolation; Euler, Runge-Kutta and symplectic methods for ODEs and their stability; solving linear systems.
Module 2 · about 50 minutes. By the end you will be able to carry out one or two steps of each standard method by hand (which is what NET asks), state how fast each converges, predict how the error changes with the step size, and recognise when a method will fail or go unstable.
1. Finding roots
| Method | Step | Order | Needs |
|---|---|---|---|
| bisection | halve the bracket with | 1 (factor 1/2 per step) | a sign change |
| fixed point | 1 (factor ) | ||
| secant | 1.618 | two starting points | |
| Newton-Raphson | 2 |
The order means . For Newton, expanding about the root :
so the number of correct digits roughly doubles each step. Bisection needs steps to shrink a bracket of length below : about 3.3 steps per decimal digit, but it never fails.
Worked example. from , : Newton’s step is , giving , , . Errors: , , : squared each time.
When Newton fails. At a double root and convergence drops to linear (for , ). A bad start can cycle: from goes . For , : it runs away.
2. Interpolation and differences
Through points with distinct there is exactly one polynomial of degree at most . With equally spaced points, Newton’s forward-difference form is quickest by hand: .
Finite differences approximate derivatives, with errors that follow from Taylor series:
A smaller is not always better: round-off error grows like , so the best step for a central difference is about in double precision.
3. Numerical integration
With sub-intervals of width :
- Trapezoidal error
- −(b − a)h²f″/12: exact for straight lines, error ∝ h²
- Simpson error
- −(b − a)h⁴f⁽⁴⁾/180: exact up to cubics, error ∝ h⁴, needs even n
- Gauss, n points
- exact for polynomials up to degree 2n − 1 (two points ±1/√3 handle cubics)
- Richardson
- for error ∝ hp: I ≈ [2pA(h/2) − A(h)]/(2p − 1)
- Physical meaning
- The power of h tells you the payoff of more work: doubling the points cuts the trapezoidal error 4 times and Simpson's 16 times. For smooth functions, a higher-order rule is almost always the cheaper way to accuracy.
Worked example. . Simpson with : , error , exactly . With the error falls to , sixteen times smaller.
Worked example: Richardson. Trapezoid for : , . Then , exact. Repeating this idea is Romberg integration.
4. Ordinary differential equations
For with step :
| Method | Step | Local error | Global error |
|---|---|---|---|
| explicit Euler | |||
| Heun / RK2 | , , | ||
| classical RK4 | four slopes, weights 1, 2, 2, 1 over 6 |
Worked example. , , one step . Euler: . Heun: . RK4: . Exact: .
Stability. For the test equation , Euler multiplies by each step, so it blows up unless , even though the true solution decays. A stiff system (one fast mode, slow interesting modes) forces tiny steps on explicit methods. Implicit (backward) Euler, , is stable for every but needs an equation solve per step for nonlinear .
Long-time mechanics. Euler applied to the oscillator , multiplies the energy by every step: orbits spiral outwards. Symplectic methods such as leapfrog (velocity Verlet) keep phase-space area exactly, so their energy error stays bounded for millions of orbits. That is why they are used for planetary and molecular dynamics.
Velocity Verlet, half kick. v ← v + (h/2) a(x).
Drift. x ← x + h v.
Half kick again. v ← v + (h/2) a(x), with the new x.
Why it works. Each sub-step is an exact canonical map (a shear of phase space), so their product keeps area, like the true flow. Global error is O(h²), but there is no energy drift.
5. Linear systems
Gaussian elimination on a dense system costs about multiplications (doubling costs 8 times as much); partial pivoting keeps round-off under control. Iterative methods (Jacobi, Gauss-Seidel) are cheaper for large sparse systems and are guaranteed to converge when the matrix is strictly diagonally dominant, . A least-squares straight-line fit has slope .
“Euler’s method has error O(h²).” That is its error per step. Over a fixed interval you take steps, so the global error is : Euler is first order. The same bookkeeping makes RK4 fourth order globally (fifth locally). A second myth: “a smaller step always helps”. For explicit methods on stiff problems the step is limited by stability, not accuracy; for numerical derivatives it is limited by round-off.
- Orders: bisection 1, secant 1.618, Newton 2 (1 at a multiple root); fixed point converges if .
- Bisection steps: .
- Forward difference ; central differences .
- Trapezoid , exact for lines; Simpson , exact for cubics, even ; -point Gauss exact to degree .
- Richardson: .
- Euler , Heun , RK4 globally. Euler stable for only if ; backward Euler always.
- Symplectic integrators keep phase-space area and bounded energy error.
Practise: exam questions on this lesson
They start easy and climb to top-rank level. More on the practice page.
Before this: lesson 2.3, probability distributions. Next: module 3 begins with lesson 3.2, canonical transformations and Hamilton-Jacobi theory. Background on series and ODEs: Taylor series and differential equations.
Check yourself
Sources
- W. H. Press, S. A. Teukolsky, W. T. Vetterling and B. P. Flannery, Numerical Recipes, 3rd ed. (2007), chapters 3, 4, 9 and 17
- R. L. Burden and J. D. Faires, Numerical Analysis, 9th ed. (2010), chapters 2 to 5
- S. S. Sastry, Introductory Methods of Numerical Analysis, 5th ed. (2012)
- CSIR-UGC NET Physical Sciences syllabus, Mathematical Methods of Physics (elementary computational techniques)
Your ticks stay in this browser. Save them as a file on the course home.
Updated 2026-11-22. Not affiliated with CSIR, UGC or the National Testing Agency. Check the official CSIR NET website for the current pattern. All questions are original.