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

This revision lesson contains all eight questions from the supplied June/July 2021 paper. Candidates were instructed to answer any five. The worked answers below are independently prepared study notes; they are not an official KNEC marking scheme. The printed mark allocations are retained.

Question 1: Numerical methods

1(a) Newton–Raphson method (9 marks)

Question. Using the Newton–Raphson method, show that a better approximation to the root of the equation below is given by the stated iteration. Hence determine the root from the first approximation shown, correct to three decimal places.

x3 − 3x − 5 = 0
xn+1 = (2xn3 + 5) / (3xn2 − 3),   n = 0, 1, 2, …
x0 = 2

Worked answer. Let the equation be represented by the function below.

f(x) = x3 − 3x − 5,   f′(x) = 3x2 − 3

Substituting these into the Newton–Raphson formula gives the required iteration.

xn+1 = xn − f(xn)/f′(xn) = (2xn3 + 5)/(3xn2 − 3)

Starting with the printed first approximation:

x1 = [2(2)3 + 5]/[3(2)2 − 3] = 21/9 = 2.333333333
x2 = [2(2.333333333)3 + 5]/[3(2.333333333)2 − 3] = 2.280555556
x3 = [2(2.280555556)3 + 5]/[3(2.280555556)2 − 3] = 2.279020068
x4 = [2(2.279020068)3 + 5]/[3(2.279020068)2 − 3] = 2.279018786

The iterates have converged. Therefore the root, correct to three decimal places, is:

x = 2.279

1(b) Newton–Gregory interpolation (11 marks)

Question. The table represents a polynomial of degree three. Use the Newton–Gregory interpolation formula to determine the two requested values, correct to four decimal places.

x 1 1.4 1.8 2.2
f(x) 3.49 4.82 5.96 6.50
First differences 1.33 1.14 0.54
Second differences −0.19 −0.60
Third difference −0.41

The spacing is constant, and the forward formula is used from the first tabulated value.

h = 0.4
f(x) = f0 + pΔf0 + [p(p − 1)/2]Δ2f0 + [p(p − 1)(p − 2)/6]Δ3f0

For the first requested value:

p = (1.2 − 1)/0.4 = 0.5
f(1.2) = 3.49 + 0.5(1.33) + [0.5(−0.5)/2](−0.19) + [0.5(−0.5)(−1.5)/6](−0.41)
f(1.2) = 4.1531

For the second requested value:

p = (2.0 − 1)/0.4 = 2.5
f(2.0) = 3.49 + 2.5(1.33) + [2.5(1.5)/2](−0.19) + [2.5(1.5)(0.5)/6](−0.41)
f(2.0) = 6.3306

Question 2: Complex variables

2(a) Harmonic function and harmonic conjugate (12 marks)

Question. Given the function below: (i) show that it is harmonic; (ii) determine a harmonic conjugate satisfying the Cauchy–Riemann equations; and (iii) find the analytic function and its derivative in terms of z.

u(x,y) = 3x2y + 2x2 − y3 − 2y2

(i) Harmonicity. Find the second partial derivatives.

uxx = 6y + 4
uyy = −6y − 4
uxx + uyy = 0

Thus u is harmonic.

(ii) Harmonic conjugate. The Cauchy–Riemann equations give the following derivatives.

ux = 6xy + 4x,   uy = 3x2 − 3y2 − 4y
vy = ux = 6xy + 4x

Integrating with respect to y, then applying vx = −uy:

v(x,y) = 3xy2 + 4xy + g(x)
vx = 3y2 + 4y + g′(x) = −3x2 + 3y2 + 4y
g′(x) = −3x2,   g(x) = −x3 + C
v(x,y) = 3xy2 + 4xy − x3 + C

(iii) Analytic function. Taking C = 0 gives the following expression.

f(z) = −jz3 + 2z2

Differentiating with respect to z:

f′(z) = −3jz2 + 4z

2(b) Image of a circle under a complex transformation (8 marks)

Question. The circle in the z-plane is mapped onto the w-plane by the transformation shown. Determine the centre and radius of the image circle.

|z| = 2
w = 1/(z − 3j)

Worked answer. Invert the transformation, then apply the original circle equation.

z = 1/w + 3j
|1 + 3jw| = 2|w|

Write w = u + jv and square both sides.

(1 − 3v)2 + 9u2 = 4(u2 + v2)
u2 + (v − 3/5)2 = 4/25
Centre: (0, 3/5);   radius: 2/5

Question 3: Matrices and systems of differential equations

3(a) Eigenvalues and eigenvectors (10 marks)

Question. Determine the eigenvalues and corresponding eigenvectors of the matrix shown.

A = 1  1
9  1

Worked answer. Set the characteristic determinant to zero.

det(A − λI) = (1 − λ)2 − 9 = (λ − 4)(λ + 2) = 0
λ1 = 4,   λ2 = −2

For λ = 4, the eigenvector equation gives y = 3x. For λ = −2, it gives y = −3x.

λ = 4:   v1 = (1, 3)T
λ = −2:   v2 = (1, −3)T

3(b) State transition matrix (10 marks)

Question. The constant-coefficient system is given below. Determine its state transition matrix Φ(t).

dx(t)/dt = Bx(t),   B = 0  1
8  −2

Worked answer. The characteristic equation has roots 2 and −4. The corresponding spectral projectors give the matrix exponential.

λ2 + 2λ − 8 = (λ − 2)(λ + 4) = 0
(B + 4I)/6 = 4  1
8  2
/6
(2I − B)/6 = 2  −1
−8  4
/6
Φ(t) = eBt = e2t(B + 4I)/6 + e−4t(2I − B)/6
Φ(t) = (e2t/6)4  1
8  2
+ (e−4t/6)2  −1
−8  4

Question 4: Double and triple integrals

4(a) Region and evaluation of a double integral (6 marks)

Question. Sketch the region of integration and evaluate the integral shown.

∫0√2 ∫−√(4−2y2)√(4−2y2) y dx dy

Worked answer. The limits describe the upper half of the ellipse below. The horizontal bounds are symmetric about the y-axis.

x2 + 2y2 ≤ 4,   y ≥ 0

For the sketch, mark the two x-axis intercepts and the highest point.

x-axis intercepts: (−2, 0), (2, 0)
Highest point: (0, √2)

At each height y, the width of the region is twice the positive x-limit.

I = ∫0√2 2y√(4 − 2y2) dy
q = 4 − 2y2,   dq = −4y dy
I = (1/2)∫04 √q dq = (1/2)[(2/3)q3/2]04
I = 8/3

4(b) Changing the order of integration (7 marks)

Question. Change the order of integration and hence evaluate the integral shown.

∫01 ∫√x1 y2/√(y4 − x2) dy dx

Worked answer. The original region is bounded by y = √x and y = 1. In the reversed order, y runs from zero to one and x runs from zero to y².

I = ∫01 ∫0y2 y2/√(y4 − x2) dx dy

For the inner integral, use the substitution below.

x = y2 sin θ,   dx = y2 cos θ dθ,   0 ≤ θ ≤ π/2
I = ∫01 ∫0π/2 y2 dθ dy = (π/2)∫01 y2 dy
I = π/6

4(c) Triple integral over a cylinder (7 marks)

Question. Determine the triple integral of x² over the volume bounded by the surfaces below.

x2 + y2 = 9,   z = 0,   z = 2

Worked answer. The volume is a circular cylinder with radius 3 and height 2. In polar coordinates, x = r cos θ and dA = r dr dθ.

∭V x2 dV = 2∫02π cos2θ dθ ∫03 r3 dr
∫02π cos2θ dθ = π,   ∫03 r3 dr = 81/4
∭V x2 dV = 81π/2

Question 5: Green’s theorem and line integrals

5(a) Verification of Green’s theorem (11 marks)

Question. Verify Green’s theorem in the plane for the line integral below, where C bounds the region between y = x² and y = x.

∮C [(xy + y2) dx + x2 dy]

Worked answer. Take the positive, counter-clockwise orientation. Let P = xy + y² and Q = x². The partial-derivative difference is:

Qx − Py = 2x − (x + 2y) = x − 2y

The region has x from zero to one, with y between the two curves. The double-integral side is:

∬D (Qx − Py) dA = ∫01 ∫x2x (x − 2y) dy dx
= ∫01 (−x3 + x4) dx = −1/20

For the line-integral side, split C into the straight line y = x, traversed from x = 1 to x = 0, and the parabola y = x², traversed from x = 0 to x = 1.

∫y=x P dx + Q dy = ∫10 3x2 dx = −1
∫y=x² P dx + Q dy = ∫01 (3x3 + x4) dx = 19/20
∮C P dx + Q dy = −1 + 19/20 = −1/20

Both sides agree, so Green’s theorem is verified.

5(b) Path-independent line integral (9 marks)

Question. Show that the line integral below is independent of the path joining (1, 2) and (3, 4). Hence evaluate it from (1, 2) to (3, 2), and then from (3, 2) to (3, 4).

∫(1,2)(3,4) [(6xy2 − y3) dx + (6x2y − 3xy2) dy]

Worked answer. Let P and Q be the coefficients of dx and dy respectively. Their cross-partials are equal throughout the plane.

Py = 12xy − 3y2 = Qx

Therefore the field is conservative. A potential function is:

φ(x,y) = 3x2y2 − xy3
φx = 6xy2 − y3,   φy = 6x2y − 3xy2

Evaluate each requested segment by subtracting the potential at its starting point from the potential at its ending point.

φ(1,2) = 4,   φ(3,2) = 84,   φ(3,4) = 240
∫(1,2)(3,2) P dx + Q dy = 84 − 4 = 80
∫(3,2)(3,4) P dx + Q dy = 240 − 84 = 156

Question 6: Fourier series

6(a) Even extension and Fourier cosine series (11 marks)

Question. Sketch the even extension of the function on −2 < x < 2 and determine its Fourier series.

f(x) = 1 − x,   0 < x < 1;    f(x) = x − 1,   1 < x < 2;    f(x + 4) = f(x)

Worked answer. Reflect the two pieces evenly across the y-axis. The graph on −2 ≤ x ≤ 2 is the piecewise-linear curve through the following points, with straight segments between successive points.

x −2 −1 0 1 2
f(x) 1 0 1 0 1

The extension is even, so it has only cosine terms. Its half-range cosine series uses L = 2.

a0/2 = (1/2)∫02 f(x) dx = 1/2
a2m−1 = 0,   a2m = 2[1 − (−1)m]/(m2π2)

Only odd values of m contribute after this reduction.

f(x) = 1/2 + (4/π2)∑k=0∞ cos((2k + 1)πx)/(2k + 1)2,   −2 ≤ x ≤ 2

The periodic extension repeats this graph every four units.

6(b) Fourier series of a periodic square function (9 marks)

Question. The function is defined below on its base interval and extended with period 2π. Sketch it on −π < t < 3π and determine its Fourier series.

g(t) = t2,   −π < t < π;    g(t + 2π) = g(t)

Worked answer. Over the requested interval, draw y = t² from t = −π to π and repeat the same parabola shifted right by 2π. The repeated piece has its minimum at t = 2π and reaches π² at t = π and t = 3π.

The function is even on the base interval, so all sine coefficients are zero.

a0/2 = π2/3,   an = 4(−1)n/n2,   bn = 0
g(t) = π2/3 + 4∑n=1∞ (−1)n cos(nt)/n2

Question 7: Multiple integrals and vector calculus

7(a) Evaluation of a triple integral (7 marks)

Question. Evaluate the triple integral below.

∫01 ∫01−x ∫02−x xyz dz dy dx

Worked answer. Integrate first with respect to z.

∫02−x xyz dz = (xy/2)(2 − x)2

Then integrate with respect to y and x.

I = (1/4)∫01 x(2 − x)2(1 − x)2 dx
x(2 − x)2(1 − x)2 = 4x − 12x2 + 13x3 − 6x4 + x5
I = (1/4)[2 − 4 + 13/4 − 6/5 + 1/6]
I = (1/4)(13/60)
I = 13/240

7(b) Divergence theorem on a hemisphere (8 marks)

Question. Use the divergence theorem to evaluate the outward flux of the vector field below across the part of the unit sphere above the xy-plane, bounded by that plane.

F = (y2z2)i + (z2x2)j + (x2y2)k
x2 + y2 + z2 = 1,   z ≥ 0

Worked answer. Close the curved hemisphere with its circular base in the xy-plane. The divergence is zero, so the total outward flux across this closed half-ball is zero.

∇·F = ∂(y2z2)/∂x + ∂(z2x2)/∂y + ∂(x2y2)/∂z
∇·F = 0 + 0 + 0 = 0

On the base, the outward normal is −k. In polar coordinates the base flux is:

Φbase = −∬x²+y²≤1 x2y2 dA
Φbase = −∫01 r5 dr ∫02π cos2θ sin2θ dθ = −π/24

Because the closed-surface flux is zero, the curved hemisphere flux is the negative of the base flux.

Φhemisphere = π/24

7(c) Line integral around a circle (5 marks)

Question. Evaluate the line integral along the unit circle. Use the standard positive, counter-clockwise orientation.

∮C (x dy − y dx),   x2 + y2 = 1

Worked answer. Apply Green’s theorem with P = −y and Q = x.

Qx − Py = 1 − (−1) = 2
∮C (x dy − y dx) = ∬x²+y²≤1 2 dA = 2π

Question 8: Polar coordinates and Stokes’ theorem

8(a) Double integral over an annulus (6 marks)

Question. By changing to polar coordinates, evaluate the double integral over the region between the two circles, where 0 < a < b.

∬D x2/(x2 + y2)2 dA
a2 ≤ x2 + y2 ≤ b2,   0 < a < b

Worked answer. Substitute x = r cos θ and y = r sin θ. The annulus becomes a ≤ r ≤ b and 0 ≤ θ ≤ 2π.

x2/(x2 + y2)2 dA = (cos2θ/r) dr dθ
I = ∫02π cos2θ dθ ∫ab dr/r
I = π ln(b/a)

8(b) Verification of Stokes’ theorem (14 marks)

Question. Verify Stokes’ theorem for the vector field below on the surface formed by the region bounded by x = 0, y = 0, z = 0 and the plane shown, with the face in the xz-plane excluded.

F = xz i − y j + x2y k
2x + y + 2z = 8

Worked answer. Use the outward orientation on the three included faces of the tetrahedron. First calculate the curl.

∇ × F = (x2, x(1 − 2y), 0)

The faces x = 0 and z = 0 give zero curl flux: the first has x-component of the curl equal to zero there, and the second has zero z-component. On the inclined face, write z in terms of x and y.

z = 4 − x − y/2,   0 ≤ x ≤ 4,   0 ≤ y ≤ 8 − 2x
dS = (1, 1/2, 1) dx dy
∬S (∇ × F)·dS = ∫04 ∫08−2x [x2 + (x/2)(1 − 2y)] dy dx = 32/3

The boundary is the triangle in the excluded plane y = 0, with vertices (0, 0, 4), (4, 0, 0), and (0, 0, 0). With the orientation induced by the outward normals, only the sloping edge contributes, traversed from (0, 0, 4) to (4, 0, 0). On this edge, z = 4 − x and x runs from zero to four.

∮C F·dr = ∫04 x(4 − x) dx = 32/3

The surface integral of the curl equals the positively oriented boundary line integral, verifying Stokes’ theorem.

Study note: these independently prepared solutions are for revision and are not an official KNEC marking scheme.