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

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

Question 1: Complex variables

1(a) Express f(z) in the form u + jv and verify the Cauchy–Riemann equations

Question. Given f(z) = z2 + 5z + 1, express f(z) in the form u + jv and show that u and v satisfy the Cauchy–Riemann equations.

Worked answer.

Put z = x + jy.
Then z2 = x2 − y2 + 2jxy, so

f(z) = (x2 − y2 + 5x + 1) + j(2xy + 5y).

Therefore u = x2 − y2 + 5x + 1 and v = 2xy + 5y.

We have ux = 2x + 5, vy = 2x + 5, uy = −2y and vx = 2y.
Thus ux = vy and uy = −vx, as required.

1(b) Find a harmonic conjugate

Question. If u = sinh x sin y, show that u is harmonic and determine a harmonic conjugate v such that f(z) = u + jv is analytic.

Worked answer.

uxx = sinh x sin y and uyy = −sinh x sin y, so ∇2u = uxx + uyy = 0.
The function is harmonic.

From the Cauchy–Riemann equations, vy = ux = cosh x sin y.

Integrating with respect to y gives v = −cosh x cos y + g(x).
The other equation vx = −uy gives g′(x) = 0.
Hence v = −cosh x cos y + C.

1(c) Image of a circle under a bilinear transformation

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

Worked answer.

Rearranging gives z = j(w + 2)/(w − 1).
On |z| = 3, this implies |w + 2| = 3|w − 1|.
Write w = u + jv and square both sides:

(u + 2)2 + v2 = 9[(u − 1)2 + v2].

Completing the square gives (u − 11/8)2 + v2 = 81/64.

The image is a circle with centre (11/8, 0) and radius 9/8.

Question 2: Matrices and state-transition systems

2(a) Eigenvalues and eigenvectors

Question. Determine the eigenvalues and corresponding eigenvectors of A = [[0, 1], [−2, −3]].

Worked answer.

det(A − λI) = λ2 + 3λ + 2 = (λ + 1)(λ + 2), so λ = −1 or λ = −2.

  • For λ = −1, (A + I)v = 0 gives an eigenvector v = (1, −1)T.
  • For λ = −2, (A + 2I)v = 0 gives an eigenvector v = (1, −2)T.

2(b) State-transition matrix

Question. For dx/dt = Bx with B = [[−1, 0], [0, −2]], determine Φ(t), show that dΦ/dt at t = 0 equals B, and prove Φ(t)Φ(−t) = I.

Worked answer.

Since B is diagonal, the state-transition matrix is Φ(t) = eBt = [[e−t, 0], [0, e−2t]].
Differentiating gives Φ′(t) = [[−e−t, 0], [0, −2e−2t]], so Φ′(0) = [[−1, 0], [0, −2]] = B.
Also Φ(−t) = [[et, 0], [0, e2t]], hence Φ(t)Φ(−t) = I.

Question 3: Numerical methods

3(a) Newton–Raphson method

Question. For 2x3 − 3x − 10 = 0, show the Newton–Raphson iteration xn+1 = (4xn3 + 10)/(6xn2 − 3). Starting with x0 = 1.5, find the root correct to four decimal places.

Worked answer.

Let f(x) = 2x3 − 3x − 10, so f′(x) = 6x2 − 3.
Newton’s rule xn+1 = xn − f(xn)/f′(xn) simplifies to the stated iteration.

n xn
0 1.500000
1 2.238095
2 2.027140
3 2.000412
4 2.000000

The equation factors as (x − 2)(2x2 + 4x + 5) = 0, so its real root is x = 2.

The answer to four decimal places is 2.0000.

3(b) Newton–Gregory interpolation

Question. The tabulated values of a polynomial are:

x 2 3 4 5 6 7
f(x) 7 28 67 130 223 352

Use Newton–Gregory interpolation to estimate f(2.5) and f(6.5).

Worked answer.

The forward differences begin Δf = 21, 39, 63, 93, 129;

Δ2f = 18, 24, 30, 36;
and Δ3f = 6 throughout.
At x0 = 2, h = 1 and p = 0.5:

f(2.5) = 7 + 0.5(21) + [0.5(−0.5)/2](18) + [0.5(−0.5)(−1.5)/6](6) = 15.625.

For x = 6.5, use the backward formula based at x = 7 with p = −0.5, ∇f = 129, ∇2f = 36 and ∇3f = 6:

f(6.5) = 352 − 0.5(129) − 0.125(36) − 0.0625(6) = 282.625.

Question 4: Fourier series

4(a) Fourier series of a periodic triangular function

Question. Obtain the Fourier series of g(t) = −t for −4 ≤ t ≤ 0, g(t) = t for 0 ≤ t ≤ 4, extended periodically by g(t + 8) = g(t).

Worked answer.

On [−4, 4], g(t) = |t|.

It is even and has period 8, so all sine coefficients vanish.

For L = 4, the constant term is a0/2 = 2, and an = 8[(-1)n − 1]/(n2π2).
Therefore only odd cosine terms remain:

g(t) = 2 − (16/π2)[cos(πt/4) + cos(3πt/4)/32 + cos(5πt/4)/52 + ···].

4(b) Fourier series of the periodic V-shaped wave

Question. For the periodic wave shown, determine h(x), obtain its Fourier series and use a suitable value of x to show that π2/8 = Σn=1∞1/(2n − 1)2.

Worked answer.

On −π ≤ x ≤ π, the graph is h(x) = |x| − π, repeated with period 2π.
This is even, so bn = 0.
The constant term is −π/2 and an = 2[(-1)n − 1]/(πn2).
Thus

h(x) = −π/2 − (4/π)[cos x + cos(3x)/32 + cos(5x)/52 + ···].

At x = 0, h(0) = −π and every cosine equals 1.

Hence −π = −π/2 − (4/π)Σn=1∞1/(2n − 1)2, which rearranges to the required identity.

Question 5: Multiple integrals

5(a) Double integral in polar coordinates

Question. Evaluate ∬D xy2 dxdy where D is x2 + y2 ≤ 4, x ≥ 0.

Worked answer.

Put x = r cos θ and y = r sin θ.
The half-disk is 0 ≤ r ≤ 2 and −π/2 ≤ θ ≤ π/2;

xy2 dxdy becomes r4cos θ sin2θ drdθ.

Therefore

∬D xy2 dxdy = ∫−π/2π/2 cos θ sin2θ dθ ∫02r4dr = (2/3)(32/5) = 64/15.

5(b) Triple integral in cylindrical coordinates

Question. Evaluate ∫03∫02∫0√(4 − y2) dx dy dz using cylindrical coordinates.

Worked answer.

The integral has integrand 1.

Its region is a quarter-cylinder: 0 ≤ r ≤ 2, 0 ≤ θ ≤ π/2, 0 ≤ z ≤ 3.
The Jacobian is r, so the value is ∫03∫0π/2∫02r dr dθ dz = 3π.

5(c) Area between curves

Question. Determine the area bounded by y = 1/x, y = √x and x = 2.

Worked answer.

The curves intersect when 1/x = √x, giving x = 1 and y = 1.
For 1 ≤ x ≤ 2, √x is above 1/x.
Hence the area is ∫12(√x − 1/x)dx = 4√2/3 − 2/3 − ln 2, approximately 0.853.

Question 6: Vector calculus

6(a) Flux through a plane

Question. Evaluate ∬S F·n dS for F = xi + yj + zk, where S is the part of x + y + z = 2 in the first octant.

Worked answer.

Take the normal pointing out of the first-octant tetrahedron, in the direction (1,1,1).

For z = 2 − x − y, the oriented vector surface element is n dS = (1,1,1)dxdy.
Since F·(1,1,1) = x + y + z = 2, the flux is ∬x≥0,y≥0,x+y≤22 dxdy = 2 × (area of the triangle) = 2 × 2 = 4.

6(b) Verify Green’s theorem

Question. Verify Green’s theorem for ∮C[x2y dx + (x − y)dy], where C is the boundary of the triangle A(0,0), B(1,0), C(1,1).

Worked answer.

For positive (counter-clockwise) orientation, Green’s theorem gives ∬R(Qx − Py)dA = ∬R(1 − x2)dA, with 0 ≤ y ≤ x ≤ 1.
This is ∫01x(1 − x2)dx = 1/4.

Directly, the integral on AB is 0;

on BC it is ∫01(1 − y)dy = 1/2;
on CA, where y = x and x goes from 1 to 0, it is ∫10x3dx = −1/4.

The boundary integral is 1/4, agreeing with the double integral.

Question 7: Eigenvalue problems

7(a) Construct a matrix from its eigenpairs

Question. The eigenvalues of M are λ1 = −1 and λ2 = −4, with corresponding eigenvectors v1 = (2,1)T and v2 = (1,−1)T. Determine M.

Worked answer.

Let P = [[2, 1], [1, −1]] and D = diag(−1, −4).
Then M = PDP−1, where P−1 = (1/3)[[1, 1], [1, −2]].
Multiplication gives M = [[−2, 2], [1, −3]].

7(b) Determine a diagonal matrix from the eigenvalues

Question. Given D = P−1AP, where D is the diagonal matrix of A and P is the matrix of eigenvectors of A, determine D for A = [[−1, −6], [1, 4]].

Worked answer.

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

The eigenvalues are 1 and 2, so D has diagonal entries 1 and 2 in the same order as the corresponding eigenvectors are placed in P.

If the λ = 1 eigenvector is first, D = diag(1, 2);

reversing the columns of P reverses the diagonal entries.

Question 8: Triple integrals and conservative fields

8(a) Evaluate a triple integral

Question. Evaluate ∫01∫01∫√(x2 + y2)2 xyz dz dy dx.

Worked answer.

Integrating first with respect to z gives (xy/2)(4 − x2 − y2).

Therefore the value is (1/2)∫01∫01xy(4 − x2 − y2)dy dx = 3/8.

8(b) Prove the field is conservative and evaluate the line integral

Question. Prove that F = (2xz3 + 6y)i + (6x − 2yz)j + (3x2z2 − y2)k is conservative. Hence evaluate ∫CF·dr for a path from (1,−1,1) to (2,1,−1).

Worked answer.

A potential function is φ(x,y,z) = x2z3 + 6xy − y2z, because ∇φ = F.
Thus F is conservative and the line integral depends only on its endpoints.

φ(2,1,−1) = −4 + 12 + 1 = 9, while φ(1,−1,1) = 1 − 6 − 1 = −6.

Hence ∫CF·dr = 9 − (−6) = 15.

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.