In this notes, we'll cover - Part 1. Interpolation
Lagrange Interpolating Formula
Divided Differences and Their Properties
Newton's Divided Difference Formula
Finite Differences (Forward, Backward)
Relation Between Forward and Backward Differences
Newton's Forward Difference Formula
Part 2. Solution of Equations
Bisection Method
Regula-Falsi Method
Newton-Raphson Method
Part 3. Systems of Linear Equations
Gauss Elimination
Cholesky's Method
Gauss-Seidel Method
Method of Relaxation
Part 4. Ordinary Differential Equations
Euler's Method
Single-Step Methods
Runge-Kutta Method
Milne-Simpson Method
Part 1. Interpolation
The Interpolation Problem
Definition 1. Interpolation:
Let y=f(x) be a function, and suppose the values of f are known at distinct points x0,x1,…,xn
as y0=f(x0),y1=f(x1),…,yn=f(xn).
Interpolation means finding an approximate value of f(x) at some intermediate point x lying between x0 and xn, by constructing a polynomial (or other simple function) that passes through the given data points.
The polynomial P(x) of degree at most n satisfying P(xi)=yi(i=0,1,…,n)
is called an interpolating polynomial.
Let yi=f(xi) be given at (n+1) distinct points x0,x1,…,xn. Then there exists a unique polynomial Pn(x) of degree at most n such that Pn(xi)=yi for each i, and
Let the data (xi,yi), i=0,1,…,n, be given, with all xi distinct.
Define Pn(x)=∑i=0nyiℓi(x).
Step 1. Degree of Pn.
Each ℓi(x) is a product of n linear factors, so deg(ℓi)=n.
Hence Pn is a polynomial of degree at most n.
Step 2. Interpolation conditions.
For a fixed index k, Pn(xk)=∑i=0nyiℓi(xk)=ykℓk(xk)=yk⋅1=yk,
since ℓi(xk)=0 for i=k.
Thus Pn(xi)=yi for all i.
Step 3. Uniqueness.
Suppose Qn(x) is another polynomial of degree at most n with Qn(xi)=yi.
Then R(x)=Pn(x)−Qn(x) has degree at most n and has (n+1) roots x0,…,xn.
A nonzero polynomial of degree ≤n cannot have more than n roots.
Hence R≡0, so Pn=Qn.
Therefore the Lagrange formula gives the unique interpolating polynomial of degree ≤n.
Error term (statement): If f is (n+1) times continuously differentiable, then for some ξ between the smallest and largest of x,x0,…,xn,
(i) Divided differences are symmetric in their arguments: the value of f[x0,x1,…,xk] does not depend on the order of x0,…,xk. (ii) If f is a polynomial of degree m, then the (m+1)-th and higher divided differences vanish. (iii) (Mean value form) If f(k) exists, then f[x0,x1,…,xk]=k!f(k)(ξ) for some ξ in the interval containing x0,…,xk.
Proof of (i) (sketch):
One shows by induction that
f[x0,…,xk]=i=0∑k∏j=i(xi−xj)yi,
which is visibly symmetric in the x's (and y's attached to them).
Proof of (ii):
If deg(f)=m, then f(m+1)≡0. By (iii), the (m+1)-th divided difference is zero.
Newton's Divided Difference Formula
Theorem 3 (Newton's Fundamental / Divided Difference Formula)
The unique interpolating polynomial of degree at most n may be written as
Continuing inductively, one finds ak=f[x0,x1,…,xk].
Hence Newton's divided difference formula holds.
(It agrees with Lagrange at the nodes, so by uniqueness it is the interpolating polynomial.)
Finite Differences
Assumption: Nodes are equally spaced: xi=x0+ih, i=0,1,2,…, with step h>0. Write yi=f(xi).
Definition 4. Forward Difference Operator Δ: Δyi=yi+1−yi.
Higher differences: Δ2yi=Δ(Δyi)=Δyi+1−Δyi=yi+2−2yi+1+yi,
and in general Δkyi=Δk−1yi+1−Δk−1yi.
Definition 5. Backward Difference Operator ∇: ∇yi=yi−yi−1.
Higher: ∇2yi=∇yi−∇yi−1, and so on.
Start from Newton's divided difference formula with equal spacing xi=x0+ih.
One shows that f[x0,x1,…,xk]=k!hkΔky0.
Also (x−x0)(x−x1)⋯(x−xk−1)=hku(u−1)⋯(u−k+1).
Substituting these into the divided difference formula yields Newton's forward formula.
When to use: Prefer this formula when x lies near the beginning of the table (small u).
Newton's backward formula (for reference): With u=hx−xn and backward differences at yn,
P(x)=yn+u∇yn+2!u(u+1)∇2yn+⋯.
Prefer when x is near the end of the table.
Part 2. Solution of Equations
We seek a root of f(x)=0, where f is continuous (and, for Newton-Raphson, differentiable).
Bisection Method
Idea: If f(a) and f(b) have opposite signs, then by the Intermediate Value Theorem there is at least one root in (a,b). Repeatedly bisect the interval and keep the half where the sign change persists.
Theorem 7 (Bisection Method — Algorithm and Convergence)
Let f be continuous on [a,b] with f(a)f(b)<0. Define
x0=a,x1=b,xn+1=2xn(L)+xn(R),
where [xn(L),xn(R)] is the current bracket containing a sign change. Then the sequence of midpoints converges to a root ξ∈(a,b), and after n steps ∣xn−ξ∣≤2nb−a.
Proof / Derivation:
Let f be continuous on [a,b] with f(a)f(b)<0.
By IVT, there exists ξ∈(a,b) with f(ξ)=0.
Algorithm (one step):
Set c=2a+b.
If f(c)=0, stop; c is a root.
If f(a)f(c)<0, replace b by c.
If f(c)f(b)<0, replace a by c.
The new interval still contains a root and has length half of the previous one.
After n bisections, the interval length is 2nb−a.
Any point xn of the current interval (in particular the midpoint) satisfies ∣xn−ξ∣≤2nb−a.
Hence xn→ξ as n→∞.
Rate: Linear convergence (error roughly halves each time). Guaranteed, but slow.
Fig 2.1Bisection method
Loading figure…
y = f(x)Current bracket [a,b]Midpoint c
E.g., Solve x3−x−1=0 on [1,2]. f(1)=−1<0, f(2)=5>0. c1=1.5, f(1.5)=0.875>0→ new interval [1,1.5].
Continue until the required accuracy.
Regula-Falsi Method (Method of False Position)
Idea: Instead of the midpoint, take the point where the chord joining (a,f(a)) and (b,f(b)) meets the x-axis.
Theorem 8 (Regula-Falsi Formula)
Derivation:
Let f be continuous on [a,b] with f(a)f(b)<0.
The equation of the chord through (a,f(a)) and (b,f(b)) is
Geometric meaning: Each step follows the tangent down (or up) to the axis.
Caution: Fails or diverges if f′(xn)≈0, or if x0 is poorly chosen. For multiple roots, convergence drops to linear unless a modified formula is used.
Fig 2.3Newton-Raphson method
Loading figure…
y = f(x)Tangent at xₙNext iterate xₙ₊₁
E.g., Find 2 by solving f(x)=x2−2=0. xn+1=xn−2xnxn2−2=21(xn+xn2).
With x0=1.5: x1=1.4167, x2=1.4142, … (rapid convergence).
Part 3. Systems of Linear Equations
We solve Ax=b, where A is an n×n nonsingular matrix.
Gauss Elimination Method
Definition 7. Gauss Elimination:
A direct method that reduces A to upper triangular form by elementary row operations, then solves by back substitution.
Algorithm:
Step 1 (Forward elimination). For k=1,2,…,n−1:
Assume akk=0 (pivot). For each row i=k+1,…,n, set ℓik=akkaik,
and replace row i by rowi←rowi−ℓik⋅rowk
(including the right-hand side bi).
Step 2 (Back substitution). The system is now Ux=c with U upper triangular.
Partial pivoting: If ∣akk∣ is small, swap row k with the row below it that has the largest ∣aik∣ in column k. This improves numerical stability.
E.g., Solve
2x+y−z=8,−3x−y+2z=−11,−2x+y+2z=−3.
Eliminate x from rows 2,3 using multipliers ℓ21=−3/2, ℓ31=−1; continue to triangular form; back-substitute.
Cholesky's Method
Definition 8. Cholesky Decomposition:
If A is symmetric positive definite, then there exists a unique lower triangular matrix L with positive diagonal entries such that A=LLT.
(Sometimes written A=LDLT with D diagonal.)
Then solve Ly=b (forward substitution) and LTx=y (back substitution).
Advantage: Roughly half the work of Gauss elimination when A is SPD; numerically stable.
Gauss-Seidel Method
Definition 9. Iterative Methods:
Write A=L∗+D+U∗ (strictly lower + diagonal + strictly upper). Gauss-Seidel updates unknowns in place, using the newest values as soon as they are available:
If A is strictly diagonally dominant, or symmetric positive definite, then the Gauss-Seidel iteration converges for any initial vector x(0).
Remark: Gauss-Seidel usually converges faster than Jacobi (which uses only old values in a full sweep).
Method of Relaxation
Definition 10. Successive Over-Relaxation (SOR):
Accelerate Gauss-Seidel by extrapolating with a relaxation factor ω:
xi(k+1)=(1−ω)xi(k)+ωx^i(k+1),
where x^i(k+1) is the Gauss-Seidel update for component i.
ω=1: ordinary Gauss-Seidel.
0<ω<1: under-relaxation (may stabilize divergent processes).
1<ω<2: over-relaxation (often faster when it converges).
Choosing ω: For many structured SPD systems there is an optimal ω∈(1,2); in exams one often takes a given ω (e.g. 1.2) and iterates until consecutive approximations agree to the required tolerance.
Part 4. Ordinary Differential Equations
We consider the IVP
dxdy=f(x,y),y(x0)=y0.
A numerical method produces values yn≈y(xn) at xn=x0+nh.
Euler's Method
Theorem 11 (Euler's Method)
The Euler step is
yn+1=yn+hf(xn,yn).
Geometrically: advance along the tangent to the solution curve at (xn,yn). Local truncation error is O(h2); global error is O(h) (first-order method).
E.g., y′=x+y, y(0)=1, h=0.1. y1=1+0.1(0+1)=1.1, y2=1.1+0.1(0.1+1.1)=1.22, and so on.
Single-Step Methods
Definition 11. Single-Step Method:
A method that computes yn+1 using only the data at the current point (xn,yn) (and evaluations of f between xn and xn+1).
Euler and classical Runge-Kutta are single-step. Multistep methods (e.g. Milne-Simpson) use several previous points yn,yn−1,….
Local truncation error is O(h5); the method is of order 4.
Idea: Weighted average of four slope estimates in [xn,xn+h] — one at the left, two at the midpoint, one at the right — chosen so that the Taylor expansions match through order h4.
Why popular in exams: One formula, no need for higher derivatives of f, good accuracy for moderate h.
Fig 4.2Runge-Kutta — four slope samples in one step