Linear equations: dy/dx + Py = Q
For dy/dx + Py = Q, multiply by the integrating factor e^(∫P dx). Then the solution is y × IF = ∫(Q × IF) dx + C.
Why the integrating factor works
- 1A first order DE is linear when y and dy/dx appear only to the first power and are not multiplied together.
- 2Multiply dy/dx + Py = Q by g(x) = e^(∫P dx). Note that g′(x) = P·g(x).
- 3The left side becomes g(dy/dx) + gPy = g(dy/dx) + g′y = d/dx (y·g), by the product rule.
- 4So d/dx (y·g) = Q·g. Integrate both sides with respect to x.
- 5So, y·g = ∫ Q·g dx + C. This g is the integrating factor.
The method
- 1Write the DE in standard form dy/dx + Py = Q. Divide by the coefficient of dy/dx first.
- 2Read off P (the coefficient of y, with its sign) and Q.
- 3Find IF = e^(∫P dx). Simplify using e^(log f) = f.
- 4Write the solution: y × IF = ∫(Q × IF) dx + C.
- 5Integrate the right side. Divide by IF if you want y alone.
- 6Use any given condition to find C.
Example 1: direct
Solve dy/dx + 2y = e⁻ˣ.
- Standard form already: P = 2, Q = e⁻ˣ.
- IF = e^(∫2 dx) = e²ˣ.
- y·e²ˣ = ∫ e⁻ˣ·e²ˣ dx + C = ∫ eˣ dx + C.
- y·e²ˣ = eˣ + C.
- Divide by e²ˣ: y = e⁻ˣ + Ce⁻²ˣ.
y = e⁻ˣ + Ce⁻²ˣ
Example 2: board-style, with a condition
Find the particular solution of x(dy/dx) + y = x log x (x > 0), given that y = 1/4 when x = 1.
- Divide by x: dy/dx + (1/x)y = log x. So P = 1/x, Q = log x.
- IF = e^(∫(1/x) dx) = e^(log x) = x.
- Solution: y·x = ∫ x log x dx + C.
- By parts (log x first, x second): ∫ x log x dx = (x²/2) log x − ∫ (x²/2)(1/x) dx = (x²/2) log x − x²/4.
- So xy = (x²/2) log x − x²/4 + C.
- Put x = 1, y = 1/4: 1/4 = 0 − 1/4 + C, so C = 1/2.
- xy = (x²/2) log x − x²/4 + 1/2.
y = (x/2) log x − x/4 + 1/(2x)
Ready reckoner for the IF
| P | ∫P dx | IF = e^(∫P dx) |
|---|---|---|
| k (a constant) | kx | e^(kx) |
| 1/x | log x | x |
| −1/x | −log x | 1/x |
| 2/x | 2 log x | x² |
| tan x | log sec x | sec x |
| cot x | log sin x | sin x |
| 2x/(1 + x²) | log(1 + x²) | 1 + x² |
Mistakes that cost marks
- Not dividing by the coefficient of dy/dx first. For x(dy/dx) + 2y = x³, P = 2/x, not 2.
- Losing the sign of P. dy/dx − 3y = Q has P = −3, so IF = e⁻³ˣ.
- Forgetting + C, or adding C after dividing by the IF (then C must be divided too).
- Writing e^(log x) as log x. It is x.
A pressure cooker cooling on the kitchen counter follows a linear DE of the form dy/dt + Py = Q. So does the charge on a capacitor charging through a resistor in an electronic circuit.
1 marks: “Find the integrating factor of x(dy/dx) − y = x³ (x > 0).” Standard form: dy/dx − (1/x)y = x². IF = e^(−log x) = 1/x.
3 marks: “Solve dy/dx + y = cos x.” P = 1, IF = eˣ. yeˣ = ∫ eˣ cos x dx = eˣ(sin x + cos x)/2 + C. So y = (sin x + cos x)/2 + Ce⁻ˣ.
3 marks: “Find the particular solution of (1 + x²)(dy/dx) + 2xy = 6x², given y = 1 when x = 0.” dy/dx + [2x/(1 + x²)]y = 6x²/(1 + x²). IF = 1 + x². y(1 + x²) = ∫ 6x² dx = 2x³ + C. x = 0, y = 1 gives C = 1. y = (2x³ + 1)/(1 + x²).
Standard form, P, IF, then y × IF = ∫ Q × IF dx + C.