How unit 2 is examined
Differentiation and integration from tabulated data, then solving linear systems by direct (Gauss, Crout) and iterative (Gauss-Seidel) methods; Simpson's 3/8 rule and Gauss-Seidel carry the marks, all asked as 7-mark numericals.
Numerical Differentiation
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Numerical differentiation finds $f'(x)$, $f''(x)$ at a tabulated point by differentiating an interpolation polynomial fitted through the table.
Key points.
- For equally spaced $x$ near the start of the table use Newton's forward formula, with $u=\dfrac{x-x_0}{h}$.
- Build the forward difference table first, since the formulas use $\Delta y_0,\Delta^2 y_0,\dots$ from the top row.
- Differentiating with respect to $x$ uses $\dfrac{du}{dx}=\dfrac1h$, which is why $h$ and $h^2$ appear in the denominators.
- The point need not be a table entry; $u$ is then a fraction, such as $0.5$.
Formula. $$f'(x)=\frac1h\left[\Delta y_0+\frac{2u-1}{2}\Delta^2y_0+\frac{3u^2-6u+2}{6}\Delta^3y_0+\cdots\right]$$ $$f''(x)=\frac1{h^2}\left[\Delta^2y_0+(u-1)\Delta^3y_0+\frac{6u^2-18u+11}{12}\Delta^4y_0+\cdots\right]$$
Example. $h=0.2$, $u=\frac{1.1-1}{0.2}=0.5$. Differences: $\Delta y_0=0.128$, $\Delta^2y_0=0.288$, $\Delta^3y_0=0.048$, higher differences $0$.
| $x$ | $F$ | $\Delta$ | $\Delta^2$ | $\Delta^3$ | $\Delta^4$ |
|---|---|---|---|---|---|
| 1.0 | 0 | 0.128 | 0.288 | 0.048 | 0 |
| 1.2 | 0.128 | 0.416 | 0.336 | 0.048 | |
| 1.4 | 0.544 | 0.752 | 0.384 | ||
| 1.6 | 1.296 | 1.136 | |||
| 1.8 | 2.432 | 1.568 | |||
| 2.0 | 4.000 |
Here $2u-1=0$ and $3u^2-6u+2=-0.25$, so $f'(1.1)=\frac1{0.2}\left[0.128+\frac{-0.25}{6}(0.048)\right]=5(0.128-0.002)=0.63$.
$f''(1.1)=\frac1{0.04}\left[0.288+(0.5-1)(0.048)\right]=25(0.264)=6.6$.
Answer: $f'(1.1)=0.63$, $f''(1.1)=6.6$.
==Differentiate Newton's forward formula term by term, remembering $du/dx=1/h$.==
Asked: [7 marks] (Jun 2023) Find the first and second derivatives at $x=1.1$ from the table $x=1,1.2,1.4,1.6,1.8,2.0$; $F(x)=0,.1280,.5440,1.2960,2.4320,4.00$.
Numerical integration
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Numerical integration approximates $\int_a^b y\,dx$ by replacing $y$ with an interpolating polynomial over $n$ equal strips of width $h=\dfrac{b-a}{n}$.
Key points.
- It is used when the integral has no closed form or the function is known only as a table.
- The ordinates are $y_0,y_1,\dots,y_n$ at $x_i=a+ih$, so $n+1$ values are needed for $n$ strips.
- Fitting a degree-1 polynomial gives the trapezoidal rule, degree 2 gives Simpson's 1/3, degree 3 gives Simpson's 3/8.
- More strips give better accuracy; Simpson's rules are more accurate than the trapezoidal rule for the same $h$.
Example. $\int_0^\pi\sin x\,dx$, $n=10$, $h=\pi/10$ (exact value $2$).
| $i$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| $y_i$ | 0 | .3090 | .5878 | .8090 | .9511 | 1 | .9511 | .8090 | .5878 | .3090 | 0 |
Trapezoidal: $\frac h2[0+2(6.3138)]=0.15708\times12.6276=1.9835$. Simpson 1/3: odd sum $=3.2360$, even sum $=3.0778$; $\frac h3[0+4(3.2360)+2(3.0778)]=0.10472\times19.0996=2.0001$.
Answer: Trapezoidal $\approx1.9835$; Simpson's 1/3 $\approx2.0001$.
==Find $h=(b-a)/n$, tabulate $y_i$, then substitute into the rule: ends once, odd ordinates by 4, even by 2 (Simpson).==
Asked: [7 marks] (Nov 2022) Evaluate $\int_0^\pi\sin x\,dx$ by dividing the range into 10 equal parts using (i) Trapezoidal rule (ii) Simpson's 1/3 rule.
Trapezoidal rule
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. The trapezoidal rule treats each strip as a trapezium, replacing the curve by straight chords.
Formula. $$\int_a^b y\,dx\approx\frac h2\left[(y_0+y_n)+2(y_1+y_2+\cdots+y_{n-1})\right]$$
Key points.
- It works for any number of strips $n$, odd or even.
- Ends are taken once and every interior ordinate twice, because each is shared by two trapezia.
- The error is of order $h^2$, so it is the least accurate of the three rules.
- Area of one strip is $\frac h2(y_i+y_{i+1})$, and the rule is the sum of these.
Simpson's 1/3rd rule
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Simpson's 1/3 rule replaces the curve over each pair of strips by a parabola through three consecutive points.
Formula. $$\int_a^b y\,dx\approx\frac h3\left[(y_0+y_n)+4(y_1+y_3+\cdots)+2(y_2+y_4+\cdots)\right]$$
Key points.
- The number of strips $n$ must be even, so the number of ordinates is odd.
- Odd-position ordinates carry weight 4 and even-position interior ordinates weight 2.
- Its error is of order $h^4$, far better than the trapezoidal rule.
- It is exact for polynomials up to degree 3.
- Use the quoted decimal places only at the end; keep 5 places in $y$.
Example. $\int_2^{10}\frac{dx}{1+x}$, $n=8$, $h=1$.
| $x$ | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|
| $y$ | .33333 | .25 | .2 | .16667 | .14286 | .125 | .11111 | .1 | .09091 |
Ends $=0.42424$; odd $(y_1,y_3,y_5,y_7)=0.64167$; even $(y_2,y_4,y_6)=0.45397$. $I=\frac13[0.42424+4(0.64167)+2(0.45397)]=\frac13(3.89885)=1.29962$.
Answer: $I\approx1.300$ (exact $\ln\frac{11}{3}=1.2993$).
<mark>Simpson's 1/3: $\frac h3[\text{first}+\text{last}+4(\text{odd})+2(\text{even})]$, with $n$ even.</mark>
Asked: [7 marks] (Dec 2025) Calculate by Simpson's 1/3 rule (up to 3 places of decimal) $\int_2^{10}\frac{dx}{1+x}$ by dividing the range into eight equal parts.
Simpson's 3/8th rule
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. Simpson's 3/8 rule fits a cubic through every four consecutive ordinates, i.e. three strips, and integrates it.
Formula. $$\int_a^b y\,dx\approx\frac{3h}{8}\left[(y_0+y_n)+3(y_1+y_2+y_4+y_5+\cdots)+2(y_3+y_6+\cdots)\right]$$
Key points.
- The number of strips $n$ must be a multiple of 3.
- Ordinates at positions 3, 6, 9,... are shared between two cubics, so they get weight 2.
- All other interior ordinates get weight 3, and the two end ordinates weight 1.
- For a single block of three strips the formula reduces to $\frac{3h}{8}(y_0+3y_1+3y_2+y_3)$.
- It is exact for cubics and has the same order of error as the 1/3 rule but a slightly larger constant.
- Choose it when $n$ is a multiple of 3 but not of 2.
Example. $\int_0^6\frac{dx}{1+x^2}$, $n=6$, $h=1$.
| $x$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| $y$ | 1 | .5 | .2 | .1 | .05882 | .03846 | .02703 |
Ends $=1.02703$; $3(y_1+y_2+y_4+y_5)=3(0.79728)=2.39184$; $2y_3=0.2$. $I=\frac38(1.02703+2.39184+0.2)=\frac38(3.61887)=1.3571$.
Answer: $I\approx1.3571$.
Other papers' data. Table $h=0.1$, $x=0$ to $0.3$: $\frac{3(0.1)}8(1+3(0.9975)+3(0.99)+0.9776)=0.0375\times7.9401=0.2978$. For $\int_0^6\frac{e^x}{1+x}dx$, $h=1$: $y=1,1.3591,2.4630,5.0214,10.9196,24.7355,57.6327$; ends $58.6327$, $3(1.3591+2.4630+10.9196+24.7355)=118.4304$, $2y_3=10.0428$; $I=\frac38(187.1059)=70.165$.
Answer frame. Open with "Simpson's 3/8 rule: $\int y\,dx=\frac{3h}{8}[\dots]$, valid when $n$ is a multiple of 3"; write $h=(b-a)/n$, then the $x$-$y$ table; state the formula with the weights 1, 3, 3, 2, 3, 3, 1; substitute grouped sums; close with the boxed value.
Pitfall: Giving weight 2 to the wrong ordinates; only $y_3,y_6,\dots$ take 2, all other interior ordinates take 3.
<mark>Simpson's 3/8 rule: $\frac{3h}{8}[(y_0+y_n)+3(\text{rest})+2(y_3+y_6+\cdots)]$, $n$ a multiple of 3.</mark>
Asked: [7 marks] (Nov 2022, Jun 2023, Jun 2025) Using Simpson's 3/8 rule, evaluate $\int_0^6\frac{dx}{1+x^2}$ by dividing the range into 6 equal parts. Asked: [7 marks] (Nov 2022, Jun 2023, Jun 2025) Find the solution using Simpson's 3/8 rule for the table $x=0,0.1,0.2,0.3,0.4$; $y=1,0.9975,0.99,0.9776,0.8604$. Asked: [7 marks] (Nov 2022, Jun 2023, Jun 2025) Find $\int_0^6\frac{e^x}{1+x}dx$ approximately using Simpson's 3/8th rule.
Solution of Simultaneous Linear Algebraic Equations by Gauss's Elimination
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Gauss elimination reduces the augmented matrix $[A|B]$ to upper triangular form $[U|C]$ by row operations, then finds the unknowns by back substitution.
Key points.
- Write the augmented matrix $[A|B]$ first.
- Use the first row's pivot to make all entries below it zero, then the second row's pivot for the next column.
- Only row operations are allowed: swapping rows, scaling a row, adding a multiple of one row to another.
- If a pivot is zero, interchange with a lower row that has a non-zero entry.
- Back substitution starts with the last equation, giving $z$, then $y$, then $x$.
Example. $2x-y-3z=9,\ x-y-2z=6,\ x-y-z=2$.
$$\left[\begin{array}{ccc|c}2&-1&-3&9\\1&-1&-2&6\\1&-1&-1&2\end{array}\right]\xrightarrow{R_2\to 2R_2-R_1,\ R_3\to 2R_3-R_1}\left[\begin{array}{ccc|c}2&-1&-3&9\\0&-1&-1&3\\0&-1&1&-5\end{array}\right]\xrightarrow{R_3\to R_3-R_2}\left[\begin{array}{ccc|c}2&-1&-3&9\\0&-1&-1&3\\0&0&2&-8\end{array}\right]$$
Back substitution: $2z=-8\Rightarrow z=-4$; $-y-z=3\Rightarrow y=1$; $2x=9+y+3z=9+1-12=-2\Rightarrow x=-1$. Check in eq. 3: $-1-1+4=2$. Consistent.
Answer: $x=-1,\ y=1,\ z=-4$.
Answer frame. Open with "Gauss elimination converts $[A|B]$ to upper triangular form and back-substitutes"; write the augmented matrix; show each row operation labelled; back substitute from the last row; verify in one original equation and state the solution.
<mark>Reduce $[A|B]$ to triangular form by row operations, then back-substitute from the last equation.</mark>
Asked: [7 marks] (Jun 2025) Apply Gauss Elimination method to solve $2x-y-3z=9,\ x-y-2z=6,\ x-y-z=2$.
Gauss's Jordan method
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Gauss-Jordan reduces $[A|B]$ all the way to $[I|X]$, so the solution is read off directly with no back substitution.
Key points.
- It uses the same row operations as Gauss elimination but clears entries above each pivot as well as below.
- Each pivot row is divided by its pivot to make the diagonal entry 1.
- It needs more operations than Gauss elimination, so it is used when the inverse is wanted.
- Applying it to $[A|I]$ gives $[I|A^{-1}]$, the matrix inverse.
Crout's method
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. Crout's method factorises $A=LU$ with $L$ lower triangular and $U$ upper triangular having unit diagonal, then solves $AX=B$ in two triangular steps.
Key points.
- Write $A=LU$ with $L=\begin{bmatrix}l_{11}&0&0\\l_{21}&l_{22}&0\\l_{31}&l_{32}&l_{33}\end{bmatrix}$, $U=\begin{bmatrix}1&u_{12}&u_{13}\\0&1&u_{23}\\0&0&1\end{bmatrix}$.
- Equate $LU$ to $A$: the first column of $L$ equals the first column of $A$, then $u_{1j}=a_{1j}/l_{11}$, and so on column by column.
- Solve $LY=B$ by forward substitution, then $UX=Y$ by back substitution.
- The factors can be reused for other right-hand sides.
Example. $2x+3y-z=5,\ 3x+2y+z=10,\ x-5y+3z=0$.
$l_{11}=2,\ l_{21}=3,\ l_{31}=1$; $u_{12}=1.5,\ u_{13}=-0.5$; $l_{22}=2-3(1.5)=-2.5$, $l_{32}=-5-1(1.5)=-6.5$; $u_{23}=\frac{1-3(-0.5)}{-2.5}=-1$; $l_{33}=3-1(-0.5)-(-6.5)(-1)=-3$.
$LY=B$: $y_1=2.5$; $3(2.5)-2.5y_2=10\Rightarrow y_2=-1$; $1(2.5)-6.5(-1)-3y_3=0\Rightarrow y_3=3$. $UX=Y$: $z=3$; $y-z=-1\Rightarrow y=2$; $x+1.5y-0.5z=2.5\Rightarrow x=1$.
Answer: $x=1,\ y=2,\ z=3$.
Answer frame. Open with "Crout's method writes $A=LU$, $U$ with unit diagonal"; write $AX=B$; give the $L$, $U$ entries in order; solve $LY=B$, then $UX=Y$; close with the solution.
==Crout: $A=LU$ with $U$ unit-diagonal; solve $LY=B$ forward, then $UX=Y$ backward.==
Asked: [7 marks] (Jun 2023) Solve $2x+3y-z=5,\ 3x+2y+z=10,\ x-5y+3z=0$ by Crout's method.
Jacobi's method
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Jacobi's method is an iterative solver that computes every new value from the previous iteration's values only.
Key points.
- The system must be diagonally dominant for convergence, and each equation is solved for its diagonal unknown.
- Iteration: $x^{(k+1)}=\frac1{a_{11}}(b_1-a_{12}y^{(k)}-a_{13}z^{(k)})$, and likewise for $y,z$.
- All three new values are computed together from the old ones.
- It converges more slowly than Gauss-Seidel.
Gauss-Seidal method
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>
Definition. Gauss-Seidel is an iterative method that uses each newly computed value immediately in the remaining equations of the same iteration.
Formula. For $a_1x+b_1y+c_1z=d_1$ etc., diagonally dominant: $$x^{(k+1)}=\tfrac1{a_1}(d_1-b_1y^{(k)}-c_1z^{(k)}),\ \ y^{(k+1)}=\tfrac1{b_2}(d_2-a_2x^{(k+1)}-c_2z^{(k)}),\ \ z^{(k+1)}=\tfrac1{c_3}(d_3-a_3x^{(k+1)}-b_3y^{(k+1)})$$
Key points.
- First check diagonal dominance: each diagonal coefficient must exceed the sum of the others in its row, which guarantees convergence.
- Rearrange each equation to give its diagonal unknown in terms of the others.
- Start from $x^{(0)}=y^{(0)}=z^{(0)}=0$ unless told otherwise.
- Always use the latest available value, so $x^{(k+1)}$ is used at once for $y$ and $z$.
- Stop when two successive iterations agree to the required decimal places.
- It converges about twice as fast as Jacobi.
Example. $10x+y+z=12,\ 2x+10y+z=13,\ 2x+2y+10z=14$. Diagonal dominance: $10>2$, $10>3$, $10>4$.
| Iteration | $x$ | $y$ | $z$ |
|---|---|---|---|
| 1 | 1.2 | 1.06 | 0.948 |
| 2 | 0.9992 | 1.0054 | 0.9991 |
| 3 | 0.9996 | 1.0002 | 1.0001 |
| 4 | 1.0000 | 1.0000 | 1.0000 |
Answer: $x=y=z=1$.
Other papers' systems, same steps from $(0,0,0)$: $20x+y-2z=17,\ 3x+20y-z=-18,\ 2x-3y+20z=25$ gives iteration 1 $(0.85,-1.0275,1.0109)$, iteration 2 $(1.0025,-0.9998,0.9998)$, iteration 3 $(1,-1,1)$, so $x=1,\ y=-1,\ z=1$. $27x+6y-z=85,\ 6x+15y+2z=72,\ x+y+54z=110$ gives $(3.1481,3.5407,1.9132)$, $(2.4322,3.5720,1.9258)$, $(2.4257,3.5729,1.9260)$, $(2.4255,3.5730,1.9260)$, so $x=2.4255,\ y=3.5730,\ z=1.9260$.
Answer frame. Open with "Gauss-Seidel is an iterative method using the latest values"; test diagonal dominance; write the three iteration equations; start at $(0,0,0)$; tabulate iterations; close when values repeat to the required decimals.
Pitfall: Using old $x$ in the $y$ equation; that is Jacobi, not Gauss-Seidel.
<mark>In Gauss-Seidel every newly found value is used immediately in the next equation of the same iteration.</mark>
Asked: [7 marks] (Nov 2022, Jun 2023, Dec 2025) Using Gauss-Seidel iteration, solve $10x+y+z=12,\ 2x+10y+z=13,\ 2x+2y+10z=14$. Asked: [7 marks] (Nov 2022, Jun 2023, Dec 2025) Solve $20x+y-2z=17,\ 3x+20y-z=-18,\ 2x-3y+20z=25$ by Gauss-Seidel method. Asked: [7 marks] (Nov 2022, Jun 2023, Dec 2025) Solve $27x+6y-z=85,\ 6x+15y+2z=72,\ x+y+54z=110$ by Gauss-Seidel iteration method.
Relaxation method
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. Relaxation is an iterative method that repeatedly reduces the largest residual of the system to zero.
Key points.
- For $Ax=b$ the residual is $R=b-Ax$, computed for the starting guess.
- Pick the residual of largest magnitude and change the corresponding unknown by $\delta x_i=R_i/a_{ii}$, which makes that residual zero.
- Update all residuals, since changing $x_i$ alters each $R_j$ by $-a_{ji}\delta x_i$.
- Stop when all residuals are negligible; over-relaxation uses a factor larger than 1 to speed convergence.
Last-minute revision
- $h=\dfrac{b-a}{n}$; ordinates are $n+1$.
- Trapezoidal: $\frac h2[\text{ends}+2(\text{rest})]$, any $n$.
- Simpson 1/3: $\frac h3[\text{ends}+4(\text{odd})+2(\text{even})]$, $n$ even.
- Simpson 3/8: $\frac{3h}8[\text{ends}+3(\text{rest})+2(y_3,y_6,\dots)]$, $n$ multiple of 3.
- $\int_0^\pi\sin x\,dx$, $n=10$: trapezoidal $1.9835$, Simpson $2.0001$.
- $\int_0^6\frac{dx}{1+x^2}$ by 3/8 rule $=1.3571$; $\int_2^{10}\frac{dx}{1+x}$ by 1/3 rule $=1.300$.
- $f'(1.1)=0.63$, $f''(1.1)=6.6$ with $u=0.5$, $h=0.2$.
- Gauss elimination example: $(-1,1,-4)$; Crout example: $(1,2,3)$.
- Gauss-Seidel: $(1,1,1)$; $(1,-1,1)$; $(2.4255,3.5730,1.9260)$.
- Crout uses $U$ with unit diagonal; Gauss-Jordan ends at $[I|X]$.
- Iterative methods need diagonal dominance.
Memory hooks
- Simpson weights: 1/3 goes "1-4-2-4-1", 3/8 goes "1-3-3-2-3-3-1".
- 3/8 needs $n$ in the three-times table; 1/3 needs $n$ even.
- Gauss-Seidel is "Jacobi with instant updates".
- Gauss stops at a triangle, Jordan goes on to the identity.
- Crout: $L$ carries the pivots, $U$ carries the 1s.
Coverage checklist
- Numerical Differentiation: Jun 2023 derivatives at $x=1.1$.
- Numerical integration: Nov 2022 $\sin x$ by trapezoidal and Simpson's 1/3.
- Trapezoidal rule: formula and key points (not asked recently).
- Simpson's 1/3rd rule: Dec 2025 $\int_2^{10}\frac{dx}{1+x}$.
- Simpson's 3/8th rule: Nov 2022, Jun 2023, Jun 2025, the three integrals.
- Solution of Simultaneous Linear Algebraic Equations by Gauss's Elimination: Jun 2025.
- Gauss's Jordan method: definition and key points (not asked recently).
- Crout's method: Jun 2023.
- Jacobi's method: definition and key points (not asked recently).
- Gauss-Seidal method: Nov 2022, Jun 2023, Dec 2025, the three systems.
- Relaxation method: definition and key points (not asked recently).