← Rates of Change and Differential Equations › First-Order Linear Differential Equations › Solutions
First-Order Linear Differential Equations — Full Worked Solutions
-
Solve dy/dx + 3y = 12. Fluency
Step 1 — Standard form: dy/dx + 3y = 12. P(x) = 3, Q(x) = 12.
Step 2 — Integrating factor: μ = e∫3 dx = e3x.
Step 3 — Multiply: e3x dy/dx + 3e3xy = 12e3x.
Step 4 — Recognise: d/dx[e3xy] = 12e3x.
Step 5 — Integrate: e3xy = ∫12e3x dx = 4e3x + C.
Step 6 — Divide: y = 4 + Ce−3x
Check: dy/dx = −3Ce−3x, so dy/dx + 3y = −3Ce−3x + 12 + 3Ce−3x = 12. ✓
-
Solve dy/dx − 4y = 0, given y(0) = 5. Fluency
Standard form: dy/dx + (−4)y = 0. P(x) = −4, Q(x) = 0.
Integrating factor: μ = e∫(−4) dx = e−4x.
Multiply and recognise: d/dx[e−4xy] = 0.
Integrate: e−4xy = C, so y = Ce4x.
Apply initial condition: y(0) = 5: 5 = Ce0 = C.
y = 5e4x
Note: This is separable. Alternatively: dy/y = 4 dx ⇒ ln|y| = 4x + k ⇒ y = Ae4x.
-
Solve dy/dx + y = ex. Fluency
Standard form: dy/dx + y = ex. P(x) = 1.
Integrating factor: μ = e∫1 dx = ex.
Multiply: d/dx[exy] = ex × ex = e2x.
Integrate: exy = ∫e2x dx = e2x/2 + C.
Divide by ex: y = ex/2 + Ce−x
Check: dy/dx = ex/2 − Ce−x. Then dy/dx + y = ex/2 − Ce−x + ex/2 + Ce−x = ex. ✓
-
Solve dy/dx + (2/x)y = x3, for x > 0. Fluency
Standard form: dy/dx + (2/x)y = x³. P(x) = 2/x.
Integrating factor: μ = e∫(2/x) dx = e2 ln x = x² (for x > 0).
Multiply: d/dx[x²y] = x² × x³ = x5.
Integrate: x²y = ∫x5 dx = x6/6 + C.
Divide by x²: y = x4/6 + C/x²
-
Solve dy/dx + 2xy = 4x, given y(0) = 3. Understanding
Standard form: dy/dx + 2xy = 4x. P(x) = 2x, Q(x) = 4x.
Integrating factor: μ = e∫2x dx = ex².
Multiply: d/dx[ex²y] = 4xex².
Integrate (substitution u = x², du = 2x dx):
ex²y = ∫4xex² dx = 2ex² + C.
Divide: y = 2 + Ce−x².
Apply y(0) = 3: 3 = 2 + C ⇒ C = 1.
y = 2 + e−x²
As x → ±∞, e−x² → 0, so y approaches the equilibrium solution y = 2.
-
Solve x dy/dx − y = x², for x > 0. Understanding
Divide by x to get standard form: dy/dx − (1/x)y = x.
P(x) = −1/x, Q(x) = x.
Integrating factor: μ = e∫(−1/x) dx = e−ln x = x−1 = 1/x.
Multiply: (1/x) dy/dx − (1/x²)y = 1, which is d/dx[y/x] = 1.
Integrate: y/x = x + C.
y = x² + Cx
Check: dy/dx = 2x + C. Then x(2x+C) − (x²+Cx) = 2x²+Cx−x²−Cx = x². ✓
-
Solve dy/dx + y tan x = sec x, for −π/2 < x < π/2. Understanding
Standard form: dy/dx + (tan x)y = sec x. P(x) = tan x.
Integrating factor: μ = e∫tan x dx. Since ∫tan x dx = ln|sec x|,
μ = eln|sec x| = sec x (positive on (−π/2, π/2)).
Multiply: d/dx[sec x · y] = sec x × sec x = sec² x.
Integrate: y sec x = ∫sec² x dx = tan x + C.
Divide by sec x: y = sin x + C cos x
Note: C cos x is the homogeneous solution (when Q = 0); sin x is the particular solution.
-
Solve dy/dx − 2y = e3x, given y(0) = 0. Understanding
Standard form: dy/dx + (−2)y = e3x. P(x) = −2.
Integrating factor: μ = e∫(−2) dx = e−2x.
Multiply: d/dx[e−2xy] = e−2x × e3x = ex.
Integrate: e−2xy = ex + C.
Divide: y = e3x + Ce2x.
Apply y(0) = 0: 0 = e0 + C ⇒ C = −1.
y = e3x − e2x
Check: dy/dx = 3e3x − 2e2x. Then dy/dx − 2y = 3e3x − 2e2x − 2e3x + 2e2x = e3x. ✓
-
An RL circuit: L dI/dt + RI = V with L = 2, R = 4, V = 12, I(0) = 0. Problem Solving
Rewrite in standard form: dI/dt + (R/L)I = V/L ⇒ dI/dt + 2I = 6.
P(t) = 2, Q(t) = 6.
Integrating factor: μ = e∫2 dt = e2t.
Multiply: d/dt[e2tI] = 6e2t.
Integrate: e2tI = 3e2t + C ⇒ I = 3 + Ce−2t.
Apply I(0) = 0: 0 = 3 + C ⇒ C = −3.
I(t) = 3(1 − e−2t) amperes
Interpretation: At t = 0, I = 0 (no current initially). As t → ∞, I → 3 A, the steady-state current given by Ohm’s law I = V/R = 12/4 = 3 A. The time constant is τ = L/R = 2/4 = 0.5 s.
-
Solve (1 + x²) dy/dx + 2xy = cos x. Problem Solving
Divide by (1 + x²) to get standard form:
dy/dx + [2x/(1+x²)]y = cos x / (1+x²).
P(x) = 2x/(1+x²).
Integrating factor: ∫[2x/(1+x²)] dx = ln(1+x²) (since d/dx[1+x²] = 2x).
μ = eln(1+x²) = 1 + x².
Multiply: The equation becomes
(1+x²) dy/dx + 2xy = cos x, i.e., d/dx[(1+x²)y] = cos x.
Integrate: (1+x²)y = ∫cos x dx = sin x + C.
y = (sin x + C) / (1 + x²)
Note: μ = 1 + x² > 0 for all real x, so no domain restrictions apply.