Paper: Kenya National Examinations Council (KNEC), Diploma in Electrical and Electronic Engineering, Module III — Engineering Mathematics III, June/July 2025. Paper codes: 2521/301, 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: Fourier series

1(a) Half-range Fourier sine series (5 marks)

Question. Determine the half-range Fourier sine series of f(x) = x, 0 < x < π.

Worked answer.

For a half-range sine series on (0, π),

bn = (2/π)∫0πx sin(nx) dx = 2(−1)n+1/n.

Therefore, x = 2[sin x − (sin 2x)/2 + (sin 3x)/3 − (sin 4x)/4 + ···], for 0 < x < π.

1(b) Periodic Fourier series and odd-square sum (15 marks)

Question. A periodic function is defined by f(t) = 1 + t/4 for −4 ≤ t ≤ 0, f(t) = 1 − t/4 for 0 ≤ t ≤ 4, and f(t + 8) = f(t). (i) Sketch f(t) for two periods; (ii) determine its Fourier series; (iii) by using a suitable value of t, show that Σn=1∞1/(2n − 1)2 = π2/8.

Worked answer.

The period is 8.

Over −4 ≤ t ≤ 4 the graph is an even triangular wave with vertices (−4, 0), (0, 1), (4, 0).

For two periods, repeat these points by shifting them by 8;

on −8 ≤ t ≤ 8 the successive vertices are (−8, 1), (−4, 0), (0, 1), (4, 0), (8, 1).

Since f is even, all sine coefficients vanish.

With L = 4, a0/2 = 1/2, and an = 2[1 − (−1)n]/(n2π2).
Thus only odd cosine terms remain:

f(t) = 1/2 + (4/π2)[cos(πt/4) + cos(3πt/4)/32 + cos(5πt/4)/52 + ···].

Set t = 0.

Since f(0) = 1, 1 = 1/2 + (4/π2)Σn=1∞1/(2n − 1)2.
Rearranging gives the required result, Σn=1∞1/(2n − 1)2 = π2/8.

Question 2: Numerical methods

2(a) Newton–Raphson method (7 marks)

Question. Given that xn is an approximation to the root of 3x3 + 4x − 32 = 0, use Newton–Raphson to show that a better approximation is xn+1 = (6xn3 + 32)/(9xn2 + 4). Taking x0 = 1.5, determine the root correct to four decimal places.

Worked answer.

Let f(x) = 3x3 + 4x − 32, so f′(x) = 9x2 + 4.
Newton’s formula gives xn+1 = xn − (3xn3 + 4xn − 32)/(9xn2 + 4) = (6xn3 + 32)/(9xn2 + 4).

n xn
0 1.500000
1 2.154639
2 2.009887
3 2.000044
4 2.000000

The root to four decimal places is 2.0000.

2(b) Newton–Gregory interpolation (13 marks)

Question. Table 1 represents a polynomial f(x): x = 1, 2, 3, 4, 5, 6 and f(x) = 1, 10, 31, 70, 133, 226. Use the Newton–Gregory interpolation formula to estimate (i) f(1.5); (ii) f(5.5).

Worked answer.

The forward differences are Δy: 9, 21, 39, 63, 93; Δ2y: 12, 18, 24, 30; and Δ3y: 6, 6, 6.

The constant third differences show that the data lie on a cubic.

For x = 1.5, use the forward formula from x0 = 1 with h = 1 and p = 0.5:

f(1.5) = 1 + p(9) + [p(p − 1)/2](12) + [p(p − 1)(p − 2)/6](6) = 4.375.

For x = 5.5, use the backward formula from x6 = 6 with p = −0.5:

f(5.5) = 226 + p(93) + [p(p + 1)/2](30) + [p(p + 1)(p + 2)/6](6) = 175.375.

Question 3: Multiple integrals

3(a) Volume under a paraboloid (10 marks)

Question. Find the value of ∭V dV, where V is the region bounded by z = 1 − x2 − y2, z ≥ 0.

Worked answer.

In cylindrical coordinates, the base is 0 ≤ r ≤ 1 and 0 ≤ θ ≤ 2π, with 0 ≤ z ≤ 1 − r2.
Hence ∭VdV = ∫02π∫01∫01−r²r dz dr dθ = 2π∫01(1 − r2)r dr = π/2.

3(b) Area of a circle by double integration (10 marks)

Question. Use double integration to show that the area of a circle of radius R is πR2.

Worked answer.

In polar coordinates, dA = r dr dθ and the circular region is 0 ≤ r ≤ R, 0 ≤ θ ≤ 2π.
Therefore, A = ∬DdA = ∫02π∫0Rr dr dθ = 2π[R2/2] = πR2.

Question 4: Vector calculus

4(a) Flux across a plane (11 marks)

Question. Evaluate the surface integral ∬SF · n dS, given that F = y i + x k, where S is the surface of the plane x + y + z = 1.

Worked answer.

Taking S as the triangular portion in the first octant and n outward/upward, write z = 1 − x − y.
Then n dS = (1, 1, 1) dx dy and the projection is x ≥ 0, y ≥ 0, x + y ≤ 1.
Since F = (y, 0, x), F · n dS = (x + y) dx dy.
Thus the flux is ∫01∫01−x(x + y) dy dx = 1/3.

Reversing the normal would reverse the sign.

Source note: the scan does not specify the finite portion of the plane or its orientation. The usual first-octant triangular section with outward/upward normal is used above.

4(b) Green’s theorem on the unit circle (9 marks)

Question. Apply Green’s theorem to evaluate ∮C[xy dx + x2dy], where C is the circle of radius 1 centred at the origin and oriented anticlockwise.

Worked answer.

Let P = xy and Q = x2.
Green’s theorem gives ∮C(P dx + Q dy) = ∬D(∂Q/∂x − ∂P/∂y)dA = ∬Dx dA.

The unit disk is symmetric about the y-axis, so the integral of x over D is 0.

Question 5: Complex variables and harmonic functions

5(a) Cauchy–Riemann equations (5 marks)

Question. Given that f(z) = ez+j: (i) express f(z) in the form u + jv; (ii) show that u and v satisfy the Cauchy–Riemann equations.

Worked answer.

Put z = x + jy.
Then f(z) = ex+j(y+1) = ex[cos(y + 1) + j sin(y + 1)].
Therefore u = excos(y + 1), v = exsin(y + 1).
We have ux = excos(y + 1) = vy and uy = −exsin(y + 1) = −vx, so both Cauchy–Riemann equations hold.

5(b) Harmonic function and conjugate (6 marks)

Question. If u = excos y + eycos x + xy, (i) show that u is a harmonic function; (ii) determine a harmonic conjugate V such that f(z) = u + jV is analytic.

Worked answer.

uxx = excos y − eycos x and uyy = −excos y + eycos x.
Thus ∇2u = uxx + uyy = 0, so u is harmonic.

From the Cauchy–Riemann equations, Vy = ux = excos y − eysin x + y.

Integrating with respect to y and then using Vx = −uy gives V = exsin y − eysin x + (y2 − x2)/2 + C.

5(c) Image of a circle under a bilinear transformation (9 marks)

Question. Find the image of the circle |z| = 1 in the w-plane under the transformation w = (z − j)/(z + 2j).

Worked answer.

Solving for z gives z = j(1 + 2w)/(1 − w).
On |z| = 1, |1 + 2w| = |1 − w|.
Write w = u + jv and square both sides: (1 + 2u)2 + 4v2 = (1 − u)2 + v2.
Simplifying gives u2 + v2 + 2u = 0, or (u + 1)2 + v2 = 1.

The image is a circle with centre (−1, 0) and radius 1.

Question 6: Matrices and state transition matrices

6(a) Eigenvalues and eigenvectors (10 marks)

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

Worked answer.

det(A − λI) = (−5 − λ)(4 − λ) + 14 = λ2 + λ − 6 = (λ − 2)(λ + 3).

Thus the eigenvalues are 2 and −3.

For λ = 2, −7x + 2y = 0, so one eigenvector is (2, 7)T.
For λ = −3, −2x + 2y = 0, so one eigenvector is (1, 1)T.

6(b) State transition matrix (10 marks)

Question. A system is characterized by dx/dt = Bx, where B = [[−2, 0], [0, −5]] and x is the state vector. (i) Determine the state transition matrix Φ(t); (ii) show that Φ(0) = I, where I is an identity matrix.

Worked answer.

Since B is diagonal, Φ(t) = eBt = [[e−2t, 0], [0, e−5t]].
At t = 0, Φ(0) = [[1, 0], [0, 1]] = I.

Question 7: Numerical methods and divergence theorem

7(a) Newton–Raphson approximation of a cube root (10 marks)

Question. Given that xn is an approximation of the cube root of N, use Newton–Raphson to show that a better approximation is xn+1 = (2/3)(xn + N/(2xn2)). Taking x0 = 2.5, estimate ∛10 correct to four decimal places.

Worked answer.

Apply Newton’s method to g(x) = x3 − N.
Then xn+1 = xn − (xn3 − N)/(3xn2) = (2/3)(xn + N/(2xn2)).
With N = 10:

n xn
0 2.500000
1 2.200000
2 2.155372
3 2.154435
4 2.154435

Therefore, ∛10 = 2.1544 correct to four decimal places.

7(b) Divergence theorem on a cuboid (10 marks)

Question. Use the divergence theorem to evaluate ∬SA · n dS, where A = xi + yj + zk and S is the closed surface bounding −1 ≤ x ≤ 2, −2 ≤ y ≤ 2, 1 ≤ z ≤ 3.

Worked answer.

∇·A = 1 + 1 + 1 = 3.
The volume is (2 − (−1))(2 − (−2))(3 − 1) = 3 × 4 × 2 = 24.
Hence the total outward flux is ∭V3 dV = 3 × 24 = 72.

Question 8: Eigenvalues and eigenvectors

8(a) Constructing a matrix from eigenpairs (11 marks)

Question. A 2 × 2 matrix M has eigenvalues λ1 = −2 and λ2 = 7, with corresponding eigenvectors v1 = [1, −1]T and v2 = [4, 5]T. Determine (i) M; (ii) the matrix P such that P−1MP is a diagonal matrix.

Worked answer.

Place the eigenvectors in the columns of P: P = [[1, 4], [−1, 5]], with D = diag(−2, 7).
Then M = PDP−1, where P−1 = (1/9)[[5, −4], [1, 1]].
Multiplication gives M = [[2, 4], [5, 3]],   P−1MP = [[−2, 0], [0, 7]].

8(b) Finding a missing matrix entry and eigenpair (9 marks)

Question. Given A = [[2, 7], [4, K]], where K is a constant, and v1 = [1, 1]T is an eigenvector of A, determine (i) the corresponding eigenvalue; (ii) K; (iii) the other eigenvector and its eigenvalue.

Worked answer.

Av1 = [9, 4 + K]T must equal λ[1, 1]T.
Therefore λ = 9 and 4 + K = 9, so K = 5.

The resulting matrix has trace 7 and determinant −18; its second eigenvalue is −2.

Solving (A + 2I)v = 0 gives 4x + 7y = 0, so an eigenvector is [7, −4]T.

The second eigenpair is (−2, [7, −4]T).

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.