Paper: Kenya National Examinations Council (KNEC), Diploma in Electrical and Electronic Engineering, Module III — Engineering Mathematics III, March/April 2024. Paper codes: 2521/303, 2601/303, 2602/303 and 2603/303.

This revision lesson follows the supplied four-page paper and includes all eight questions with independently prepared worked solutions. Candidates are instructed to answer any five questions; all questions carry equal marks. These explanations are study notes, not an official KNEC marking scheme.

Question 1: Numerical methods

1(a) Newton–Raphson method

Question. For x3 + 2x2 − 5x − 10 = 0, show that Newton–Raphson gives xn+1 = (2xn3 + 2xn2 + 10)/(3xn2 + 4xn − 5). Starting with x0 = 1.8, determine the root to four decimal places.

Worked answer.

Let f(x) = x3 + 2x2 − 5x − 10.
Then f′(x) = 3x2 + 4x − 5, and xn+1 = xn − f(xn)/f′(xn) simplifies to the given formula.

n xn
0 1.800000
1 2.361074
2 2.242681
3 2.236088
4 2.236068

Since x3 + 2x2 − 5x − 10 = (x + 2)(x2 − 5), the positive root is √5 = 2.2360679….

To four decimal places, x = 2.2361.

1(b) Newton–Gregory interpolation

Question. The values of a polynomial are:

x 0 1 2 3 4 5
f(x) 1 7 19 43 85 151

Use Newton–Gregory interpolation to determine f(0.5) and f(4.5).

Worked answer.

The forward differences are Δf = 6, 12, 24, 42, 66;

Δ2f = 6, 12, 18, 24;
and Δ3f = 6.
At x0 = 0 with p = 0.5:

f(0.5) = 1 + 0.5(6) + [0.5(−0.5)/2](6) + [0.5(−0.5)(−1.5)/6](6) = 3.625.

Using the backward formula based at x = 5, p = −0.5, ∇f = 66, ∇2f = 24 and ∇3f = 6:

f(4.5) = 151 − 0.5(66) − 0.125(24) − 0.0625(6) = 114.625.

Question 2: Multiple integrals

2(a)(i) Double integral in polar coordinates

Question. Evaluate ∫01∫0√(1 − y2) y/√(x2 + y2) dx dy using polar coordinates.

Worked answer.

The region is the first-quadrant quarter of the unit disk.

With x = r cos θ, y = r sin θ, we have y/√(x2 + y2) = sin θ and dA = r dr dθ.
Thus the integral is ∫0π/2∫01r sin θ dr dθ = (1/2)(1) = 1/2.

2(a)(ii) Triple integral in spherical coordinates

Question. Evaluate the given integral of z over the first-octant part of x2 + y2 + z2 ≤ 4 using spherical coordinates.

Worked answer.

The bounds describe a sphere of radius 2 in the first octant.

Use z = ρ cos φ and dV = ρ2sin φ dρdφdθ, with 0 ≤ ρ ≤ 2, 0 ≤ φ ≤ π/2 and 0 ≤ θ ≤ π/2.
The integral is ∫0π/2∫0π/2∫02ρ3sin φ cos φ dρdφdθ = 4 × 1/2 × π/2 = π.

2(b) Double integral over a region bounded by a line and a hyperbola

Question. Evaluate ∬D(x + y) dxdy over the bounded region D enclosed by xy = 6 and x + y = 7.

Worked answer.

The curves meet at (2,5) and (5,2).

In the first-quadrant lens, 2 ≤ x ≤ 5 and 6/x ≤ y ≤ 7 − x.
Therefore

∬D(x + y)dxdy = ∫25∫6/x7−x(x + y)dy dx = ∫25(37/2 − x2/2 − 18/x2)dx = 153/5 = 30.6.

Question 3: Matrices and linear systems

3(a) Eigenvalues and eigenvectors

Question. Determine the eigenvalues and corresponding eigenvectors of A = [[−5, 2], [−7, 4]].

Worked answer.

The characteristic equation is det(A − λI) = λ2 + λ − 6 = (λ + 3)(λ − 2) = 0.
Thus λ = −3 or 2.

  • For λ = −3, an eigenvector is (1, 1)T.
  • For λ = 2, an eigenvector is (2, 7)T.

3(b) State-transition matrix

Question. For dx/dt = Bx, where B = [[−5, 2], [−9, 6]], determine the state-transition matrix Φ(t).

Worked answer.

The eigenvalues of B are 4 and −3, with eigenvectors (2,9)T and (1,1)T, respectively.

Set P = [[2,1],[9,1]] and D = diag(4,−3).
Then Φ(t) = PeDtP−1, where P−1 = (1/7)[[−1,1],[9,−2]].
Therefore

Φ(t) = (1/7)[[−2e4t + 9e−3t, 2e4t − 2e−3t], [−9e4t + 9e−3t, 9e4t − 2e−3t]].

At t = 0 this matrix is I, as required for a state-transition matrix.

Question 4: Line integrals and Green’s theorem

4(a) Line integral on a circular arc

Question. Evaluate ∫Cxy dx + y2dy where C is the arc of x2 + y2 = 1 from (1,0) to (−1,0).

Worked answer.

Parameterise either semicircular arc by x = cos t, y = sin t, with t running between 0 and π (or 0 and −π for the lower arc).
Then dx = −sin t dt and dy = cos t dt, so xy dx + y2dy = −cos t sin2t dt + sin2t cos t dt = 0.

The line integral is 0.

4(b) Work done by a force field

Question. Find the work done by F(x,y) = (2x − 3y)i + (3y2 − 3x)j in moving an object from (0,0) to (1,0).

Worked answer.

A potential function is φ(x,y) = x2 − 3xy + y3, since φx = 2x − 3y and φy = 3y2 − 3x.
The work is path-independent and equals φ(1,0) − φ(0,0) = 1.

4(c) Green’s theorem on a circle

Question. Use Green’s theorem to evaluate ∮C[y2dx + (3x + 2xy)dy], where C is the counter-clockwise circle of radius 2 centred at (0,0).

Worked answer.

With P = y2 and Q = 3x + 2xy, Qx − Py = (3 + 2y) − 2y = 3.
The enclosed area is 4π, so Green’s theorem gives the integral as ∬R3dA = 3(4π) = 12π.

Question 5: Fourier series

5(a) Half-range cosine series

Question. Sketch the even extension of f(t) = 1 − t2, 0 < t < 1, over −2 < t < 2 and determine its half-range Fourier cosine series.

Worked answer.

The even extension on −1 ≤ t ≤ 1 is 1 − t2;

repeating it with period 2 shows two periods over −2 < t < 2. It has zeros at odd integers and value 1 at even integers. For the half-range cosine series, L = 1.

The constant term is a0/2 = ∫01(1 − t2)dt = 2/3, and an = 2∫01(1 − t2)cos(nπt)dt = 4(−1)n+1/(n2π2).
Hence

f(t) = 2/3 + (4/π2)Σn=1∞(−1)n+1cos(nπt)/n2, for 0 ≤ t ≤ 1.

5(b) Fourier series of the piecewise-defined function

Question. Given h(x) = x2 for −π ≤ x ≤ π and h(x) = 0 elsewhere, sketch h(x) on −3π ≤ x ≤ 3π and determine its Fourier series representation.

Worked answer.

On the requested interval, the graph is x2 from −π to π and zero on (−3π,−π) and (π,3π). Taking [−3π,3π] as one Fourier interval gives the periodic extension with period 6π;

h is even, so bn = 0.
With L = 3π, a0/2 = π2/9, and

an = (1/(3π))∫−ππx2cos(nx/3)dx = 2π sin(nπ/3)/n + 12 cos(nπ/3)/n2 − 36 sin(nπ/3)/(πn3).

Thus h(x) = π2/9 + Σn=1∞ancos(nx/3), using the coefficients above.

At the jumps x = ±π, the series converges to the midpoint value π2/2.

Question 6: Complex variables

6(a) Harmonic function and conjugate

Question. Given u(x,y) = e2xsin(2y), show that u is harmonic and determine its conjugate harmonic function v(x,y) so that f(z) = u + jv is analytic.

Worked answer.

uxx = 4e2xsin(2y) and uyy = −4e2xsin(2y), so ∇2u = 0.
From vy = ux = 2e2xsin(2y), integrate to get v = −e2xcos(2y) + g(x).

The other Cauchy–Riemann equation gives g′(x) = 0.

Therefore v = −e2xcos(2y) + C.

6(b) Image circle under a bilinear transformation

Question. The circle |z| = 2 is mapped to the w-plane by w = 1/(z − j). Determine the centre and radius of the image circle.

Worked answer.

Rearranging gives z = j + 1/w.
On |z| = 2, |jw + 1| = 2|w|.
Write w = u + jv, square and simplify to obtain 3u2 + 3v2 + 2v − 1 = 0.
Completing the square gives u2 + (v + 1/3)2 = 4/9.

The image has centre (0, −1/3) and radius 2/3.

Question 7: Stokes’ theorem and volume

7(a) Closed line integral using Stokes’ theorem

Question. Use Stokes’ theorem to evaluate ∮CF·dr where F = yi + xj + zk and C is the boundary of x + y + z = 1 in the first octant.

Worked answer.

∇×F = (0,0,0), because ∂z/∂y − ∂x/∂z = 0, ∂y/∂z − ∂z/∂x = 0 and ∂x/∂x − ∂y/∂y = 0.
By Stokes’ theorem, ∮CF·dr = ∬S(∇×F)·n dS = 0.

7(b) Volume behind a plane

Question. Determine the volume behind x + y + z = 8 and in front of the region in the yz-plane bounded by z = (3/2)√y and z = (3/4)y.

Worked answer.

The two curves intersect at y = 0 and y = 4.
For 0 ≤ y ≤ 4, the lower boundary is z = 3y/4 and the upper boundary is z = 3√y/2.

Above the yz-plane, x ranges from 0 to 8 − y − z.

Therefore

V = ∫04∫3y/43√y/2(8 − y − z)dzdy = 49/5 cubic units.

Question 8: Diagonalisation and eigenvalues

8(a) Diagonal matrix

Question. Given C = [[2, 6], [0, −1]], determine the diagonal matrix D = P−1CP, where P is a matrix of eigenvectors.

Worked answer.

Since C is upper triangular, its eigenvalues are the diagonal entries 2 and −1.

Thus D = diag(2, −1) when P’s columns are ordered for eigenvalues 2 and −1;

swapping the eigenvector columns gives diag(−1, 2).

8(b) Find unknown eigenvalues and the matrix constant

Question. For M = [[K, 0, 2], [4, 3, 2], [−2, −1, 0]], show that λ1 = 1 is an eigenvalue for all K. Given that (2,−2,1)T is an eigenvector with second eigenvalue λ2, determine λ2, K and λ3.

Worked answer.

det(M − I) = 0 for every K, so 1 is always an eigenvalue.

Multiplying M by (2,−2,1)T gives (2K + 2, 4, −2)T.

Comparing with λ2(2,−2,1)T, the third component gives λ2 = −2, and the first gives 2K + 2 = −4, so K = −3.
The sum of the eigenvalues equals tr(M) = K + 3 = 0;
hence λ3 = 1.

Revision note: these independently prepared explanations are for study and are not the official KNEC marking scheme. Check the supplied scan for the original notation and instructions.