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

This revision lesson presents the questions from the supplied four-page paper and independently prepared worked solutions to all eight questions. The examination asks candidates to answer any five. These explanations are study notes, not an official KNEC marking scheme. Check the source scan where a printed expression is unclear.

Question 1: Fourier series

1(a) Periodic function and odd-reciprocal-square identity

Question. Let g(t)=0 for −π<t<0 and g(t)=t for 0<t<π, extended periodically with period 2π. Sketch it on −π≤t≤2π, find its Fourier series, and use the series at t=0 to show that ∑k=1∞1/(2k−1)²=π²/8.

Worked answer.

On each period the graph is zero on the negative half and rises linearly from 0 to π on the positive half. Repeat this pattern every 2π.

On [−π,π], use g(t)=a₀/2+∑(aₙ cos nt+bₙ sin nt).
a₀=(1/π)∫₀πt dt=π/2, so a₀/2=π/4.
aₙ=(1/π)∫₀πt cos(nt)dt= ((−1)ⁿ−1)/(πn²), and bₙ=(1/π)∫₀πt sin(nt)dt=(−1)ⁿ⁺¹/n.
Therefore g(t)=π/4+∑n=1∞[((−1)ⁿ−1)/(πn²) cos(nt)+((−1)ⁿ⁺¹/n)sin(nt)].
At t=0, g(0)=0 and all sine terms vanish.
The cosine coefficient is zero for even n and −2/(πn²) for odd n, giving 0=π/4−(2/π)∑k=1∞1/(2k−1)².

Hence the required sum is π²/8.

1(b) Half-range cosine series

Question. For h(t)=t on 0<t<2 and h(t)=4−t on 2<t<4, sketch its even extension and determine its half-range cosine series.

Worked answer.

Reflect the triangular graph evenly across t=0 and repeat it with period 8.

On 0≤t≤4 the cosine series is h(t)=a₀/2+∑aₙ cos(nπt/4).
The average term is a₀/2=(1/4)∫₀⁴h(t)dt=1 because the area under h is 4.
Using the symmetry h(4−t)=h(t), all odd n coefficients are zero.
For n=2m, a2m=4((−1)ᵐ−1)/(m²π²), so the nonzero terms occur when m is odd.
Re-indexing with m=2k−1 gives:
h(t)=1−(8/π²)∑k=1∞ cos((2k−1)πt/2)/(2k−1)², 0≤t≤4.

Question 2: Newton–Raphson and interpolation

2(a) Newton–Raphson iteration

Question. For x³−αx−5=0, show that xn+1=(2xn³+5)/(3xn²−α). Given x₀=3 and x₁=3.1053, find α and the root to three decimal places.

Worked answer.

Set f(x)=x³−αx−5, so f′(x)=3x²−α.
Newton–Raphson gives xn+1=xn−f(xn)/f′(xn)=(2xn³+5)/(3xn²−α).
Using x₀=3 and x₁=3.1053: 3.1053=59/(27−α), so α=27−59/3.1053≈8.00023.
The value x₁ is rounded to four decimal places, so the intended constant is α=8 (which gives x₁=59/19≈3.105263).

Substituting x₁ into the iteration gives x₂≈3.100466 and the next iterate is unchanged to the shown precision.

The root is x≈3.100 to three decimal places.

2(b) Newton–Gregory interpolation

Question. The values are x: 1, 2, 3, 4, 5 and f(x): 10, 27, 68, 145, 270. Use Newton–Gregory interpolation to find f(1.2) and f(4.8), correct to three decimal places.

x 1 2 3 4 5
f(x) 10 27 68 145 270
First differences 17 41 77 125
Second differences 24 36 48
Third differences 12 12

For x=1.2, use the forward formula at x₀=1 with u=0.2: f(1.2)=10+17u+24u(u−1)/2+12u(u−1)(u−2)/6=12.056.

For x=4.8, use the backward formula at xₙ=5 with u=−0.2: f(4.8)=270+125u+48u(u+1)/2+12u(u+1)(u+2)/6=240.584.

Question 3: Multiple integrals and area

3(a)(i) Double integral

Question. Evaluate ∫12∫0x y/(x²+y²) dy dx.

Worked answer.

The inner integral is [½ ln(x²+y²)]0x=½ln2.
Thus the full integral is ∫₁²½ln2 dx=½ln2.

3(a)(ii) Triple integral

Question. Evaluate ∫₀¹∫₀¹∫₀x+yxyz dz dy dx.

Worked answer.

Integrating first with respect to z gives ½xy(x+y)².

Therefore the value is ½∫₀¹∫₀¹(x³y+2x²y²+xy³)dy dx=½(1/8+2/9+1/8)=17/72.

3(b) Area between a parabola and a line

Question. Find the area enclosed by y=x² and y=5x−6 using double integration.

Worked answer.

Intersections satisfy x²=5x−6, so x=2 and x=3.

Between these points the line is above the parabola.

The area is ∫₂³[(5x−6)−x²]dx=[(5/2)x²−6x−x³/3]₂³=1/6 square unit.

Question 4: Surface integrals and Green’s theorem

4(a) Flux across a parabolic cylinder

Question. Evaluate ∬SF·dS for F=2y i−3j+x²k, where S is the first-octant part of y²=8x bounded by y=4 and z=6.

Worked answer.

Parametrize S by r(y,z)=(y²/8,y,z), with 0≤y≤4 and 0≤z≤6.
The outward oriented vector area element is ry×rz dy dz=(1,−y/4,0)dy dz.
On S, F=(2y,−3,y⁴/64), so F·(ry×rz)=2y+3y/4=11y/4.
The flux is ∫₀⁶∫₀⁴(11y/4)dy dz=132.

This uses the outward orientation for the bounded first-octant region.

4(b) Verify Green’s theorem

Question. Verify Green’s theorem for ∮C[(2x²−y²)dx+(x²+y²)dy], where C bounds the region between the x-axis and the upper semicircle x²+y²=a².

Worked answer.

Let P=2x²−y² and Q=x²+y².
Then Qx−Py=2x+2y.
Over the upper semicircle, the double integral is ∫₀π∫₀a2r(cosθ+sinθ)r dr dθ=4a³/3.
For the positively oriented boundary, the x-axis segment contributes ∫−aa2x²dx=4a³/3;
parameterizing the semicircle by x=a cosθ, y=a sinθ, 0≤θ≤π, gives zero for the arc contribution.

Both sides equal 4a³/3, as required.

Question 5: Complex variables

5(a) Harmonic function and conjugate

Question. Given u(x,y)=½ln(x²+y²), show it is harmonic, find its harmonic conjugate v(x,y), and find f′(z) for f(z)=u+iv.

Worked answer.

Away from (0,0), ux=x/(x²+y²) and uy=y/(x²+y²).
The second derivatives are uxx=(y²−x²)/(x²+y²)² and uyy=(x²−y²)/(x²+y²)²;
hence ∇²u=0.
The Cauchy–Riemann equations give vy=ux and vx=−uy, so v=arg(z)+C (locally v=tan⁻¹(y/x), with the quadrant chosen consistently).
Thus f(z)=log z on a chosen branch and f′(z)=1/z.

The origin is excluded and a single-valued conjugate requires a branch cut.

5(b) Möbius image of a circle

Question. Find the image of |z|=2 under w=(2z+3)/(z−4).

Worked answer.

Rearranging gives z=(4w+3)/(w−2).
The condition |z|=2 becomes |4w+3|=2|w−2|.
Writing w=u+iv and squaring gives 12(u²+v²)+40u−7=0, or (u+5/3)²+v²=(11/6)².

The image is a circle with centre (−5/3,0) and radius 11/6.

Question 6: Matrices

6(a) Eigenvalues and eigenvectors

Question. For A=[[k,7],[−1,−3k]], find the larger value of k if 1 is an eigenvalue, then find the corresponding eigenvectors.

Worked answer.

Setting det(A−I)=0 gives −3k²+2k+8=0, so k=2 or k=−4/3.
The larger value is k=2 and A=[[2,7],[−1,−6]].

Its eigenvalues are 1 and −5.

For λ=1, x+7y=0, so one eigenvector is (−7,1)ᵀ.
For λ=−5, x+y=0, so one eigenvector is (1,−1)ᵀ.

Any nonzero scalar multiples are also valid.

6(b) Matrix identity

Question. For D=[[4,−5],[6,−9]], show D²+5D−6I=0.

Worked answer.

D²=[[-14,25],[−30,51]], 5D=[[20,−25],[30,−45]], and −6I=[[-6,0],[0,−6]].

Adding corresponding entries gives the zero matrix, verifying the identity.

Question 7: Vector fields and line integrals

7(a) Work along a parametric path

Question. For F=x²i−2xyj+x cos(z)k and path x=t², y=t, z=πt, 0≤t≤3, find the work done.

Worked answer.

r(t)=(t²,t,πt), so r′(t)=(2t,1,π).
Substitution gives F(r(t))=(t⁴,−2t³,t²cos(πt));
hence F·r′=2t⁵−2t³+πt²cos(πt).
Integrating from 0 to 3 gives 243−81/2−6/π=405/2−6/π≈200.590.

7(b) Conservativeness check and source discrepancy

Question as it appears in the scan. The field is printed as F=(xy+xy²)i+(y²+x²y)j and is described as conservative; find a potential and evaluate the line integral from (0,1) to (1,2).

Source check. As printed, Py=x+2xy while Qx=2xy. They are unequal, so this field is not conservative and no potential exists for that exact expression. The problem statement appears to contain a typo.

Likely intended correction. If the first component is Fx=xy² (without the extra xy term), then Py=Qx=2xy. A potential is φ(x,y)=½x²y²+y³/3. Therefore the integral from (0,1) to (1,2) is φ(1,2)−φ(0,1)=14/3−1/3=13/3. Check this item against the original examination copy before treating the corrected version as definitive.

Question 8: Differential equations and diagonalization

8(a) State transition matrix

Question. For dx/dt=Ax with A=[[0,1],[8,−2]], determine the state transition matrix φ(t) and φ⁻¹(0).

Worked answer.

The characteristic equation is λ²+2λ−8=0, with eigenvalues 2 and −4.
Corresponding eigenvectors are (1,2)ᵀ and (1,−4)ᵀ, so P=[[1,1],[2,−4]].
Using φ(t)=PeDtP⁻¹, where D=diag(2,−4), gives:
φ(t)=[[ (2e2t+e−4t)/3, (e2t−e−4t)/6 ], [4(e2t−e−4t)/3, (e2t+2e−4t)/3]].
Since φ(0)=I, the inverse at zero as printed is φ⁻¹(0)=I.
If the paper intended φ⁻¹(t), use e−At=φ(−t).

8(b) Diagonalize a matrix

Question. For M=[[1,2],[3,2]], find its eigenvalues, corresponding eigenvectors and the matrix D=P⁻¹MP, where P is the modal matrix.

Worked answer.

det(M−λI)=λ²−3λ−4=(λ−4)(λ+1), so the eigenvalues are 4 and −1.
Eigenvectors are (2,3)ᵀ for λ=4 and (1,−1)ᵀ for λ=−1.
Taking these as the columns of P=[[2,1],[3,−1]] gives D=diag(4,−1).

Revision note

Use the question numbering to compare each worked solution with the March/April 2023 KNEC Engineering Mathematics III paper. Question 7(b) is flagged because the supplied scan’s printed field fails the stated conservative test. No official KNEC marking scheme is claimed.