Differential Equation, Past Papers, UOS Main Campus

Differential Equation Past Paper 2014 – BSCS 4th Term UOS (Math-211)

ProgramBSCS
Term4th
Year2014
AnswersSolved ✓

University of Sargodha BS Computer Science 4th term Differential Equation (Math-211) paper, 2014 exam, session 2012-16 (80 marks, 2:30 hours). The paper is retyped below, followed by step-by-step solutions for all 16 short questions and all six subjective questions (exact, homogeneous, Bernoulli, undetermined coefficients, Cauchy-Euler and the Laplace equation). All answers were checked with SymPy.

Solved answers

Q1 – Short answers (16 × 2)

i. Order and degree. The highest derivative is d³y/dx³, so order = 3; it appears to the first power, so degree = 1.

ii. Form the DE of y = (x³ + c)e−3x. y e3x = x³ + c. Differentiate: e3x(y′ + 3y) = 3x², so dy/dx + 3y = 3x² e−3x.

iii. dy/dx + y = 2x e−x, y(−1) = e + 3. Integrating factor ex: (y ex)′ = 2x, so y ex = x² + c, y = (x² + c)e−x. y(−1) = (1 + c)e = e + 3 ⇒ c = 3/e. y = (x² + 3e−1)e−x = x²e−x + 3e−x−1.

iv. y″ + y = 0, y(0) = 1, y′(π/2) = 1. y = c1 sin x + c2 cos x. y(0) = c2 = 1. y′ = c1 cos x − c2 sin x, so y′(π/2) = −c2 = −1. This must equal 1, which is impossible. Hence this boundary value problem has no solution. (With y′(π/2) = −1 instead, c1 would be arbitrary and there would be infinitely many solutions y = c1 sin x + cos x.)

v. dy/dx = x²/y. y dy = x² dx ⇒ y²/2 = x³/3 + c ⇒ 3y² − 2x³ = C.

vi. Homogeneous function of degree n. f(x, y) is homogeneous of degree n if f(tx, ty) = tⁿ f(x, y) for all t, e.g. x² + xy is homogeneous of degree 2.

vii. Exact differential equation. M(x, y)dx + N(x, y)dy = 0 is exact if there is a function f with ∂f/∂x = M and ∂f/∂y = N; the test is ∂M/∂y = ∂N/∂x. Its solution is f(x, y) = c.

viii. d(arctan(x/y)). d(arctan(x/y)) = (y dx − x dy) / (x² + y²).

ix. Bernoulli equation. dy/dx + P(x)y = Q(x)yⁿ, n ≠ 0, 1. The substitution v = y1−n turns it into a linear equation.

x. (D² + 4D + 3)y = 0. m² + 4m + 3 = 0 ⇒ m = −1, −3. y = c1e−x + c2e−3x.

xi. x⁴ d⁴y/dx⁴ + 1 = 0. d⁴y/dx⁴ = −x−4. Integrating four times: y‴ = x−3/3 + a, y″ = −x−2/6 + ax + b, y′ = 1/(6x) + …, so y = (1/6) ln|x| + c1x³ + c2x² + c3x + c4. (Check: y⁗ = −1/x⁴.)

xii. Cauchy-Euler equation. anxⁿ y(n) + an−1xn−1y(n−1) + … + a1x y′ + a0y = g(x), with constant ai; second order: ax²y″ + bxy′ + cy = g(x). It is solved with x = ez or y = xm.

xiii. Trial solution in series. y = Σn=0∞ cn(x − x0)ⁿ about an ordinary point (usually x0 = 0: y = Σ cnxⁿ); about a regular singular point (Frobenius) y = Σ cnxn+r.

xiv. Heat equation in two variables. ∂u/∂t = k ∂²u/∂x² (one space variable x and time t), k > 0.

xv. Wave equation in two variables. ∂²u/∂t² = a² ∂²u/∂x².

xvi. Laplace equation in three variables. ∂²u/∂x² + ∂²u/∂y² + ∂²u/∂z² = 0 (∇²u = 0).

Q2 – (a) and (b)

(a) (2x cos y)dx + x²(sec y − sin y)dy = 0. My = −2x sin y ≠ Nx = 2x(sec y − sin y), so it is not exact; but it is separable. Divide by x² cos y:

(2/x)dx + (sec²y − tan y)dy = 0 ⇒ 2 ln x + tan y + ln|cos y| = c ⇒ x² cos y · etan y = C.

(b) (x² − 3y²)dx + 2xy dy = 0 is homogeneous. Put y = vx, dy = v dx + x dv:

(1 − 3v²)dx + 2v(v dx + x dv) = 0 ⇒ (1 − v²)dx + 2vx dv = 0 ⇒ dx/x = −2v dv/(1 − v²) ⇒ ln x = ln|1 − v²| + ln C ⇒ x = C(1 − y²/x²). Solution: x³ = C(x² − y²), i.e. y² = x² − x³/C.

All answers were checked with SymPy (substituted back into the equations).

Q3 – Exact equation and integrating factor

(a) M = 2y sin x cos x + y² sin x, N = sin²x − 2y cos x. My = 2 sin x cos x + 2y sin x = Nx, so the equation is exact.

f = ∫M dx = y sin²x − y² cos x + g(y); fy = sin²x − 2y cos x + g′(y) = N ⇒ g′(y) = 0. Solution: y sin²x − y² cos x = c.

(b) dy/dx − y = e2x − 1. Integrating factor e−x: (y e−x)′ = ex − e−x ⇒ y e−x = ex + e−x + c. y = e2x + 1 + c ex.

Q4 – Bernoulli equation and initial value problem

(a) x y′ + y = y² ln x is a Bernoulli equation (n = 2). Divide by xy²: y−2y′ + y−1/x = (ln x)/x. Put v = 1/y, v′ = −y−2y′: −v′ + v/x = (ln x)/x ⇒ v′ − v/x = −(ln x)/x.

Integrating factor 1/x: (v/x)′ = −(ln x)/x² ⇒ v/x = (ln x)/x + 1/x + c ⇒ v = ln x + 1 + cx. y = 1/(1 + ln x + cx).

(b) (D⁴ − D³)y = 0: m³(m − 1) = 0 ⇒ m = 0, 0, 0, 1. y = c1 + c2x + c3x² + c4ex.

y‴(0) = c4 = e; y″(0) = 2c3 + c4 = 3e ⇒ c3 = e; y′(0) = c2 + c4 = 1 ⇒ c2 = 1 − e; y(0) = c1 + c4 = 1 ⇒ c1 = 1 − e.

y = (1 − e)(1 + x) + e x² + ex+1.

All answers were checked with SymPy (substituted back into the equations).

Q5 – Undetermined coefficients

(a) y″ − 3y′ + 2y = x²ex. m² − 3m + 2 = 0 ⇒ m = 1, 2; yc = c1ex + c2e2x. Since ex is in yc, take yp = x(Ax² + Bx + C)ex = (Ax³ + Bx² + Cx)ex.

Write yp = u ex; then y″ − 3y′ + 2y = (u″ − u′)ex, so u″ − u′ = x² with u = Ax³ + Bx² + Cx: (6Ax + 2B) − (3Ax² + 2Bx + C) = x² ⇒ −3A = 1, 6A − 2B = 0, 2B − C = 0 ⇒ A = −1/3, B = −1, C = −2.

y = c1ex + c2e2x − (x³/3 + x² + 2x)ex.

(b) (D³ − D)y = ex: m(m − 1)(m + 1) = 0 ⇒ yc = c1 + c2ex + c3e−x. ex is in yc, so yp = Axex: D(xex) = (x + 1)ex, D³(xex) = (x + 3)ex, so (D³ − D)(Axex) = 2Aex = ex ⇒ A = 1/2.

y = c1 + c2ex + c3e−x + ½ x ex.

All answers were checked with SymPy (substituted back into the equations).

Q6 – Cauchy-Euler equation of order 4

Put x = ez, z = ln x, D = d/dz. Then x y′ = Dy, x²y″ = D(D − 1)y, x³y‴ = D(D − 1)(D − 2)y, x⁴y⁗ = D(D − 1)(D − 2)(D − 3)y.

[D(D−1)(D−2)(D−3) + 6D(D−1)(D−2) + 9D(D−1) + 3D + 1]y = (1 + z)². Expanding the operator: D⁴ − 6D³ + 11D² − 6D + 6D³ − 18D² + 12D + 9D² − 9D + 3D + 1 = D⁴ + 2D² + 1 = (D² + 1)².

Auxiliary equation (m² + 1)² = 0 ⇒ m = ±i (repeated). yc = (c1 + c2z) cos z + (c3 + c4z) sin z.

Particular integral: yp = (1 + D²)−2(1 + 2z + z²) = (1 − 2D² + …)(z² + 2z + 1) = z² + 2z + 1 − 2(2) = z² + 2z − 3.

y = (c1 + c2 ln x) cos(ln x) + (c3 + c4 ln x) sin(ln x) + (ln x)² + 2 ln x − 3.

All answers were checked with SymPy (substituted back into the equations).

Q7 – Laplace equation by Fourier series

Solve uxx + uyy = 0 in the rectangle 0 < x < a, 0 < y < b with the usual boundary conditions u(0, y) = 0, u(a, y) = 0, u(x, 0) = 0, u(x, b) = f(x) (the boundary values are not given in the paper, so this standard case is used).

Separation of variables: u = X(x)Y(y) ⇒ X″Y + XY″ = 0 ⇒ X″/X = −Y″/Y = −λ. So X″ + λX = 0, Y″ − λY = 0.

X(0) = X(a) = 0 gives non-zero solutions only for λ = (nπ/a)², Xn = sin(nπx/a), n = 1, 2, 3, … Then Y″ − (nπ/a)²Y = 0 with Y(0) = 0 gives Yn = sinh(nπy/a).

By superposition u(x, y) = Σn=1∞ An sinh(nπy/a) sin(nπx/a).

Using u(x, b) = f(x): f(x) = Σ An sinh(nπb/a) sin(nπx/a), a Fourier sine series, so An sinh(nπb/a) = (2/a)∫0a f(x) sin(nπx/a) dx, i.e.

An = [2 / (a sinh(nπb/a))] ∫0a f(x) sin(nπx/a) dx.

Example: if f(x) = u0 (constant), ∫ = (a u0/nπ)(1 − cos nπ), so An = 4u0/(nπ sinh(nπb/a)) for odd n and 0 for even n.

Save this paper for offline studyDownload the question paper, or save the paper together with all solved answers as a PDF.
↓ Download Paper (JPG)

About Saif R

An educator and technology enthusiast passionate about empowering students through quality education and digital learning. Dedicated to making academic resources and opportunities accessible to everyone.