Engineering Mathematics III — October/November 2023

KNEC Diploma in Mechanical Engineering — Module III. Paper code: 2501/303; 2502/303; 2503/303; 2508/303; 2509/303. Time: 3 hours.

Questions are transcribed from the supplied examination paper. The independent revision answers are not official KNEC marking schemes. All 8 questions, including optional questions, are answered.

This paper consists of EIGHT questions. Answer FIVE of the following EIGHT questions. All questions carry equal marks. Maximum marks for each part of a question are as shown.

All eight printed questions are answered. Calculation steps are set out in tables. The original Table 1 is retained before its correction. The triple integral in Question 5(a)(ii) is evaluated with its printed limits, including the reversed z bounds over part of the region. The Fourier force waveform is continued with the period shown by its repeating ramp.

Question 1(a)

Given the matrix A, determine: (i) the matrix B = AᵀA (ii) A⁻¹.

A =

1 -1 -1
1 1 1
1 -1 1

(10 marks)

Answer

(i) Form AᵀA
Aᵀ =

1 1 1
-1 1 -1
-1 1 1
Step Working
Rule Bᵢⱼ is the dot product of column i of A with column j of A.
Diagonal entries B₁₁ = B₂₂ = B₃₃ = 1² + 1² + 1² = 3.
Off-diagonal entries B₁₂ = −1 + 1 − 1 = −1; B₁₃ = −1 + 1 + 1 = 1; B₂₃ = 1 + 1 − 1 = 1.
Symmetry B₂₁ = B₁₂, B₃₁ = B₁₃ and B₃₂ = B₂₃.
B =

3 -1 1
-1 3 1
1 1 3
(ii) Find the inverse
Step Working
Determinant |A| = 1(1 + 1) − (−1)(1 − 1) + (−1)(−1 − 1) = 4.
Method A⁻¹ = adj(A)/|A|. The adjugate is the transpose of the cofactor matrix.
Cofactor matrix =

2 0 -2
2 2 0
0 -2 2
adj(A) =

2 2 0
0 2 -2
-2 0 2
A⁻¹ =

1/2 1/2 0
0 1/2 −1/2
−1/2 0 1/2

Check: multiplying A by this inverse gives the 3 × 3 identity matrix.


Question 1(b)

A mechanical system is subjected to the forces F₁, F₂ and F₃ in Newtons, satisfying the simultaneous equations: F₁ − F₂ + F₃ = 20; F₁ − F₂ − F₃ = −40; F₁ + F₂ + F₃ = 60. Use Cramer’s rule to solve the equations.

(10 marks)

Answer

Write M F = b with the equations in their printed order.

M =

1 -1 1
1 -1 -1
1 1 1
b =

20
-40
60
Step Working
Main determinant Δ = 1(−1 + 1) − (−1)(1 + 1) + 1(1 + 1) = 4.
Replace column 1 Δ₁ = 20(0) + [−40 + 60] + [−40 + 60] = 40.
Replace column 2 Δ₂ = (20) − 20(2) + (100) = 80.
Replace column 3 Δ₃ = (−60 + 40) + (60 + 40) + 20(2) = 120.
Cramer’s rule F₁ = Δ₁/Δ = 40/4 = 10 N; F₂ = 80/4 = 20 N; F₃ = 120/4 = 30 N.
Substitute to check 10 − 20 + 30 = 20; 10 − 20 − 30 = −40; 10 + 20 + 30 = 60.
F₁ = 10 N,   F₂ = 20 N,   F₃ = 30 N

Question 2(a)

Find the: (i) Laplace transform of f(t) = t sin 3t. (ii) Inverse Laplace transform of F(s) = (2s + 1)/[(s − 1)(s² + 3)].

(9 marks)

Answer

(i) Transform of t sin 3t
Step Working
Known transform L{sin 3t} = 3/(s² + 9).
Multiplication by t L{t f(t)} = −dF(s)/ds.
Differentiate L{t sin 3t} = −d[3/(s² + 9)]/ds = 6s/(s² + 9)².
L{t sin 3t} = 6s/(s² + 9)²
(ii) Inverse transform
Step Working
Partial fractions F(s) = A/(s − 1) + (Bs + C)/(s² + 3).
Clear denominators 2s + 1 = A(s² + 3) + (Bs + C)(s − 1).
Compare coefficients A + B = 0; C − B = 2; 3A − C = 1.
Solve A = 3/4, B = −3/4, C = 5/4.
Standard pairs L⁻¹{1/(s − 1)} = eᵗ; L⁻¹{s/(s² + 3)} = cos(√3 t); L⁻¹{1/(s² + 3)} = sin(√3 t)/√3.
f(t) = (3/4)et − (3/4)cos(√3 t) + [5/(4√3)]sin(√3 t)

Question 2(b)

Use Laplace transforms to solve the differential equation 2d²x/dt² + 3dx/dt + x = 3e^(−t/2) given that when t = 0, x = 0 and dx/dt = 1.

(11 marks)

Answer

Step Working
Define the transform Let X(s) = L{x(t)}. With the initial conditions, L{x′} = sX and L{x″} = s²X − 1.
Transform the equation 2(s²X − 1) + 3sX + X = 3/(s + 1/2).
Factor the operator (2s + 1)(s + 1)X = 2 + 3/(s + 1/2).
Combine into one fraction X(s) = (s + 2)/[(s + 1/2)²(s + 1)].
Partial fractions X(s) = −4/(s + 1/2) + 3/(s + 1/2)² + 4/(s + 1).
Invert term by term L⁻¹{1/(s + a)} = e^(−at); L⁻¹{1/(s + a)²} = te^(−at).
x(t) = 4e−t − 4e−t/2 + 3te−t/2
Step Working
Initial displacement x(0) = 4 − 4 = 0.
Initial velocity x′(t) = −4e^(−t) + (5 − 3t/2)e^(−t/2), so x′(0) = 1.
Equation check Substitution of x, x′ and x″ gives 2x″ + 3x′ + x = 3e^(−t/2).

Question 3(a)

(i) Show that one root of the equation x² − cos x − 1 = 0 lies between x = 1 and x = 2. (ii) Use the Newton-Raphson method to determine the root in (i), correct to three decimal places.

(10 marks)

Answer

Use radians for the trigonometric functions and their derivatives.

Step Working
Sign at the left endpoint f(1) = 1 − cos 1 − 1 = −0.540302 < 0.
Sign at the right endpoint f(2) = 4 − cos 2 − 1 = 3.416147 > 0.
Existence f is continuous on [1, 2], so the sign change guarantees a root between 1 and 2.
Derivative f′(x) = 2x + sin x.
Iteration xₙ₊₁ = xₙ − [xₙ² − cos xₙ − 1]/[2xₙ + sin xₙ]. Choose x₀ = 1.5.
n xₙ f(xₙ) f′(xₙ) xₙ₊₁
0 1.500000000 1.179262798 3.997494987 1.204999555
1 1.204999555 0.094330464 3.343838168 1.176789319
2 1.176789319 0.000941631 3.276956859 1.176501970
3 1.176501970 0.000000098 3.276271812 1.176501940
Root = 1.177   (three decimal places)

Question 3(b)

Table 1 represents a cubic polynomial f(x), and an error in one of the entries is suspected. Use: (i) a table of finite differences to locate and correct the error. (ii) the Newton-Gregory forward difference interpolation formula to determine f(0.5).

Table 1 — values exactly as printed
x −2 −1 0 1 2 3 4 5
f(x) 5 9 6 5 9 25 59 117

(10 marks)

Answer

(i) Locate and correct the error
Finite differences of the printed values
x f(x) Δf Δ²f Δ³f Δ⁴f
-2 5 4 -7 9 -6
-1 9 -3 2 3 4
0 6 -1 5 7 -1
1 5 4 12 6 0
2 9 16 18 6
3 25 34 24
4 59 58
5 117
Step Working
Property of a cubic For equally spaced x, third differences are constant and fourth differences are zero.
Observed fourth differences The printed data produce Δ⁴ = −6, 4, −1, 0.
Effect of correcting f(0) If δ is added to f(0), these four values change by 6δ, −4δ, δ, 0 respectively.
Choose the correction −6 + 6δ = 0, 4 − 4δ = 0 and −1 + δ = 0 all give δ = 1.
Correct entry f(0) = 6 + 1 = 7.
Corrected difference table: all third differences equal 6
x f(x) Δf Δ²f Δ³f Δ⁴f
-2 5 4 -6 6 0
-1 9 -2 0 6 0
0 7 -2 6 6 0
1 5 4 12 6 0
2 9 16 18 6
3 25 34 24
4 59 58
5 117
(ii) Newton-Gregory interpolation
Step Working
Base point and spacing Choose x₀ = 0, h = 1, so u = (0.5 − 0)/1 = 0.5.
Forward values from the corrected table f₀ = 7; Δf₀ = −2; Δ²f₀ = 6; Δ³f₀ = 6.
Formula f(x) = f₀ + uΔf₀ + u(u − 1)Δ²f₀/2! + u(u − 1)(u − 2)Δ³f₀/3!.
Insert u = 0.5 f(0.5) = 7 + 0.5(−2) + [0.5(−0.5)/2](6) + [0.5(−0.5)(−1.5)/6](6).
Evaluate f(0.5) = 7 − 1 − 0.75 + 0.375 = 5.625.
Independent polynomial check The corrected values lie on f(x) = x³ − 3x + 7, which also gives 5.625 at x = 0.5.
Corrected f(0) = 7;   f(0.5) = 5.625

Question 4(a)

Show that the general solution of the differential equation xy dy/dx = x² + y² may be expressed in the form x = Ae^(y²/(2x²)), where A is an arbitrary constant.

(7 marks)

Answer

Step Working
Homogeneous substitution Set v = y/x, so y = vx and dy/dx = v + x dv/dx, for x ≠ 0.
Substitute x(vx)(v + x dv/dx) = x² + v²x².
Cancel v²x² v x³ dv/dx = x², hence v dv = dx/x.
Integrate v²/2 = ln|x| + C.
Return to x and y y²/(2x²) = ln|x| + C.
Rearrange and exponentiate ln|x| = y²/(2x²) − C, so x = Ae^(y²/(2x²)), with the sign absorbed into A.
x = Aey²/(2x²)

This implicit form is used on intervals where the substitution is defined. A is a nonzero constant on such a solution branch.


Question 4(b)

The displacement x(t) of a body from a fixed position satisfies the differential equation d²x/dt² + x = cos t. Given that when t = 0, x = 0 and dx/dt = 0, use the method of undetermined coefficients to determine an expression for x(t).

(13 marks)

Answer

Step Working
Complementary solution The auxiliary equation is m² + 1 = 0, so x_c = C₁ cos t + C₂ sin t.
Resonant trial cos t is already in x_c. Multiply a sine/cosine trial by t; choose x_p = Kt sin t.
Differentiate x_p′ = K sin t + Kt cos t; x_p″ = 2K cos t − Kt sin t.
Substitute the trial x_p″ + x_p = 2K cos t = cos t, giving K = 1/2.
General form x = C₁ cos t + C₂ sin t + (t/2)sin t.
Apply x(0) = 0 C₁ = 0.
Apply x′(0) = 0 x′ = −C₁ sin t + C₂ cos t + (1/2)sin t + (t/2)cos t, so C₂ = 0.
x(t) = (t/2)sin t

Question 5(a)

Evaluate the integrals: (i) ∫₀¹ ∫₀^√(1−x²) x²y dy dx (ii) ∫₋₁¹ ∫₀^√(1−x²) ∫_(x²+y²)^(1−x²−y²) y dz dy dx.

Original Question 5(a) integral expressions, preserving all limits from the supplied paper.
Original Question 5(a) integral expressions, preserving all limits from the supplied paper.

(13 marks)

Answer

(i) Double integral
Step Working
Integrate with respect to y ∫₀^√(1−x²) x²y dy = [x²y²/2]₀^√(1−x²) = x²(1 − x²)/2.
Integrate with respect to x I₁ = (1/2)∫₀¹(x² − x⁴) dx = (1/2)[x³/3 − x⁵/5]₀¹.
Evaluate I₁ = (1/2)(1/3 − 1/5) = 1/15.
I₁ = 1/15
(ii) Triple integral with the printed bounds
Step Working
Integrate with respect to z ∫_(x²+y²)^(1−x²−y²) y dz = y(1 − 2x² − 2y²).
Identify the xy region −1 ≤ x ≤ 1 and 0 ≤ y ≤ √(1 − x²) describe the upper half of the unit disk.
Use polar coordinates x = r cos θ; y = r sin θ; dx dy = r dr dθ; 0 ≤ r ≤ 1 and 0 ≤ θ ≤ π.
Transform the integral I₂ = ∫₀^π ∫₀¹ r² sin θ(1 − 2r²) dr dθ.
Separate the factors I₂ = [∫₀^π sin θ dθ][∫₀¹(r² − 2r⁴)dr].
Evaluate I₂ = 2[1/3 − 2/5] = −2/15.
I₂ = −2/15   using the limits exactly as printed

Why is the result negative? The z upper bound 1 − r² is below the lower bound r² when r > 1/√2. The printed iterated integral therefore includes a negative contribution there. This is a signed integral, not the positive volume of a solid.

If one instead intended the integral of y over the actual region between the two paraboloids, that would be a different integral with 0 ≤ r ≤ 1/√2. It would equal √2/15. The stated answer above retains the original unit-disk limits.


Question 5(b)

Use a double integral to determine the volume of the solid in the first octant bounded by the coordinate planes and the plane x + 2y + z = 1.

(7 marks)

Answer

Step Working
Height of the solid z = 1 − x − 2y, above the xy plane z = 0.
Projection onto the xy plane 0 ≤ x ≤ 1 and 0 ≤ y ≤ (1 − x)/2.
Volume integral V = ∫₀¹ ∫₀^((1−x)/2) (1 − x − 2y) dy dx.
Inner integration [(1 − x)y − y²]₀^((1−x)/2) = (1 − x)²/4.
Outer integration V = (1/4)∫₀¹(1 − 2x + x²)dx = (1/4)[x − x² + x³/3]₀¹ = 1/12.
Intercept check The intercepts are 1, 1/2 and 1, so the tetrahedron formula also gives (1 × 1/2 × 1)/6 = 1/12.
V = 1/12 cubic units

Question 6(a)

Given the vector A = 2i + 3j + 2k and B = −i + 4j + 5k, determine: (i) a unit vector perpendicular to A and B. (ii) the angle between A and B.

(9 marks)

Answer

(i) Perpendicular unit vector
Step Working
Use the cross product A × B = (3×5 − 2×4)i − (2×5 − 2×(−1))j + (2×4 − 3×(−1))k.
Simplify A × B = 7i − 12j + 11k.
Find its magnitude |A × B| = √(7² + (−12)² + 11²) = √314.
Normalise n̂ = (7i − 12j + 11k)/√314. The negative of this unit vector is also valid.
Check perpendicularity A·(7,−12,11) = 14 − 36 + 22 = 0; B·(7,−12,11) = −7 − 48 + 55 = 0.
n̂ = (7i − 12j + 11k)/√314
(ii) Angle
Step Working
Dot product A·B = 2(−1) + 3(4) + 2(5) = 20.
Magnitudes |A| = √(4 + 9 + 4) = √17; |B| = √(1 + 16 + 25) = √42.
Apply the formula cos θ = (A·B)/(|A||B|) = 20/√714.
Evaluate θ = cos⁻¹(20/√714) = 41.5410°.
θ ≈ 41.54°

Question 6(b)

The temperature T in a workshop is given by T(x, y, z) = x²y + y²z. Determine, at the point (1, 1, 2): (i) |∇T| (ii) the directional derivative of T in the direction of the vector A = 2i − 2j + k.

(7 marks)

Answer

Step Working
Differentiate the scalar field ∇T = (∂T/∂x)i + (∂T/∂y)j + (∂T/∂z)k = 2xy i + (x² + 2yz)j + y² k.
Evaluate at (1,1,2) ∇T = 2i + 5j + k.
Gradient magnitude |∇T| = √(2² + 5² + 1²) = √30 ≈ 5.4772.
Unit direction |A| = √(2² + (−2)² + 1²) = 3, so â = (2i − 2j + k)/3.
Directional derivative D_âT = ∇T·â = [2(2) + 5(−2) + 1(1)]/3 = −5/3.
|∇T| = √30;   DâT = −5/3

The direction vector must be normalised. Its negative derivative means temperature decreases when moving in the stated direction at the point.


Question 6(c)

A vector field E = −yz i + xy j + zx k exists in a region of space. Determine ∇×E and at the point (1, −2, 1).

(4 marks)

Answer

The wording is retained. Find the curl as a field and then evaluate it at the given point.

Component Partial derivatives Result
i ∂(zx)/∂y − ∂(xy)/∂z 0 − 0 = 0
j ∂(−yz)/∂z − ∂(zx)/∂x −y − z
k ∂(xy)/∂x − ∂(−yz)/∂y y + z
∇×E = −(y + z)j + (y + z)k
Step Working
Insert the point At (1,−2,1), y + z = −1.
Curl at the point (∇×E)(1,−2,1) = j − k.

Question 7(a)

(i) Sketch the odd extension of the function f(t) = π² − t², 0 < t < π, on the interval −2π < t < 2π. (ii) Determine the half-range Fourier sine series of the function in (i).

(8 marks)

Answer

(i) Odd periodic extension
Interval Odd extension g(t)
−π < t < 0 t² − π²
0 < t < π π² − t²
Outside the base interval Repeat with period 2π: g(t + 2π) = g(t).
Odd periodic extension of π² − t² over −2π < t < 2π, with jumps at multiples of 2π.
Odd periodic extension of π² − t² over −2π < t < 2π, with jumps at multiples of 2π.

The one-sided limits at 0 are −π² and π². The odd midpoint value and the Fourier-series value there are 0. At t = ±π the value is 0.

(ii) Sine coefficients
Step Working
Series form f(t) = Σₙ₌₁^∞ bₙ sin(nt), for 0 < t < π. The odd extension has no constant or cosine terms.
Coefficient integral bₙ = (2/π)∫₀^π(π² − t²)sin(nt)dt.
First elementary integral ∫₀^π sin(nt)dt = [1 − (−1)ⁿ]/n.
Integrate the quadratic term twice by parts An antiderivative of t²sin(nt) is −t²cos(nt)/n + 2t sin(nt)/n² + 2cos(nt)/n³.
Evaluate that term ∫₀^π t²sin(nt)dt = −π²(−1)ⁿ/n + 2[(−1)ⁿ − 1]/n³.
Combine ∫₀^π(π² − t²)sin(nt)dt = π²/n + 2[1 − (−1)ⁿ]/n³.
Multiply by 2/π bₙ = 2π/n + 4[1 − (−1)ⁿ]/(πn³).
π² − t² = Σn=1∞ {2π/n + 4[1 − (−1)n]/(πn³)} sin(nt)

Equivalently, bₙ = 2π/n + 8/(πn³) for odd n and bₙ = 2π/n for even n. The equality to π² − t² holds inside 0 < t < π; at jumps of the periodic extension the series converges to the mean of the one-sided limits.


Question 7(b)

The force F(t) Newtons acting on a mechanical system varies with time t as shown in Figure 1. Determine the: (i) analytical description of F(t); (ii) Fourier series representation of F(t).

Figure 1 from the supplied paper: force rises from 0 to 1 over 0 < t < 1, equals −1 over 1 < t < 2, and the ramp repeats.
Figure 1 from the supplied paper: force rises from 0 to 1 over 0 < t < 1, equals −1 over 1 < t < 2, and the ramp repeats.

(12 marks)

Answer

(i) Analytical description

The repeated ramp starting at t = 2 indicates a period of 2. Using this periodic continuation, one base period is:

Interval F(t)
0 ≤ t < 1 t
1 ≤ t < 2 −1
All subsequent periods F(t + 2) = F(t).

Values assigned exactly at a jump do not change the Fourier coefficients. Over any period 2k ≤ t < 2k + 2, replace t in the first branch by t − 2k.

(ii) Fourier coefficients
F(t) = a₀/2 + Σn=1∞ [aₙ cos(nπt) + bₙ sin(nπt)]
Step Working
Fundamental angular frequency T = 2, hence ω₀ = 2π/T = π. The coefficient factor 2/T equals 1.
Mean coefficient a₀ = ∫₀²F(t)dt = ∫₀¹t dt − ∫₁²1 dt = 1/2 − 1 = −1/2.
Constant term a₀/2 = −1/4.
Cosine coefficient aₙ = ∫₀¹t cos(nπt)dt − ∫₁²cos(nπt)dt.
Integrate by parts ∫t cos(kt)dt = t sin(kt)/k + cos(kt)/k², with k = nπ.
Evaluate aₙ aₙ = [(−1)ⁿ − 1]/(n²π²). The integral of cos(nπt) over [1,2] is zero.
Sine coefficient bₙ = ∫₀¹t sin(nπt)dt − ∫₁²sin(nπt)dt.
Evaluate the ramp part [−t cos(nπt)/(nπ) + sin(nπt)/(nπ)²]₀¹ = −(−1)ⁿ/(nπ).
Evaluate the constant part [cos(nπt)/(nπ)]₁² = [1 − (−1)ⁿ]/(nπ).
Combine bₙ bₙ = [1 − 2(−1)ⁿ]/(nπ).
F(t) = −1/4 + Σn=1∞ {[(−1)n − 1]/(n²π²) cos(nπt) + [1 − 2(−1)n]/(nπ) sin(nπt)}

For a quick coefficient check: a₁ = −2/π², b₁ = 3/π, a₂ = 0 and b₂ = −1/(2π). At t = 1 the series converges to (1 + (−1))/2 = 0; at t = 0 or 2 it converges to (−1 + 0)/2 = −1/2.


Question 8(a)

Given that z = x + jy. (i) show that the locus of |(z + 2j)/(z − j)| = 2 is a circle, and (ii) determine the centre and radius of the circle in (i).

(9 marks)

Answer

Step Working
Use the modulus quotient |z + 2j| = 2|z − j|, with z ≠ j.
Substitute z = x + jy √[x² + (y + 2)²] = 2√[x² + (y − 1)²].
Square both sides x² + (y + 2)² = 4[x² + (y − 1)²].
Expand x² + y² + 4y + 4 = 4x² + 4y² − 8y + 4.
Collect and divide by 3 x² + y² − 4y = 0.
Complete the square x² + (y − 2)² = 4.
Read the circle parameters Centre = (0,2), or 2j in the complex plane. Radius = 2.
x² + (y − 2)² = 2²;   centre (0,2), radius 2

The original quotient excludes z = j. That point is not on this circle, so no additional point needs to be removed from the circle.

Complex-plane circle with centre (0,2) and radius 2 for the locus in Question 8(a).
Complex-plane circle with centre (0,2) and radius 2 for the locus in Question 8(a).

Question 8(b)

Obtain the general solution of the differential equation x² dy/dx + (x² + 2x)y = x².

(11 marks)

Answer

Step Working
Put into linear form For x ≠ 0, divide by x²: dy/dx + (1 + 2/x)y = 1.
Find the integrating factor μ(x) = exp[∫(1 + 2/x)dx] = exp[x + 2ln|x|] = x²eˣ.
Multiply through d(x²eˣy)/dx = x²eˣ.
Integrate by parts twice ∫x²eˣ dx = x²eˣ − 2∫xeˣ dx = eˣ(x² − 2x + 2).
Include the integration constant x²eˣy = eˣ(x² − 2x + 2) + C.
Divide by x²eˣ y = 1 − 2/x + 2/x² + Ce^(−x)/x².
y = 1 − 2/x + 2/x² + Ce−x/x²,   x ≠ 0

This general solution is stated on intervals that exclude the singular point x = 0.