Integrating Factor Method
Linear first-order equations appear everywhere, from circuits to drug dosing. A clever multiplier, the integrating factor, turns the left side into a single derivative that can be integrated directly.
Standard form
A first-order linear equation can be written as \(y' + P(x)y = Q(x)\). It is 'linear' because \(y\) and \(y'\) appear only to the first power and are not multiplied together. Examples: \(y' + 2y = e^x\), \(xy' - y = x^3\) (divide by \(x\) first). Getting the equation into standard form, with coefficient \(1\) on \(y'\), is the first step.
y' + P(x)\,y = Q(x)The integrating factor
Multiply both sides by \(\mu(x) = e^{\int P(x)\,dx}\). Because \(\mu' = P\mu\), the left side becomes \(\mu y' + \mu P y = (\mu y)'\), the derivative of a product. Now integrate both sides: \(\mu y = \int \mu Q\,dx + C\), and divide by \(\mu\). You do not need a constant when computing \(\mu\) itself; any one integrating factor works.
\mu(x) = e^{\int P(x)\,dx}Worked example
Solve \(y' + 2y = e^x\). Here \(P = 2\), so \(\mu = e^{2x}\). Multiply: \((e^{2x}y)' = e^{3x}\). Integrate: \(e^{2x}y = \frac{1}{3}e^{3x} + C\). Divide: \(y = \frac{1}{3}e^x + Ce^{-2x}\). As \(x\) grows, the \(Ce^{-2x}\) term fades and every solution approaches \(\frac{1}{3}e^x\), whatever the starting value.
y = \tfrac{1}{3}e^x + Ce^{-2x}Worked example: variable coefficients
Solve \(xy' + y = x^2\) for \(x > 0\). Divide by \(x\): \(y' + \frac{1}{x}y = x\). Then \(\mu = e^{\ln x} = x\), and \((xy)' = x^2\). Integrate: \(xy = \frac{x^3}{3} + C\), so \(y = \frac{x^2}{3} + \frac{C}{x}\). Notice that the original left side \(xy' + y\) was already \((xy)'\); the integrating factor recovers exactly this kind of structure.
The structure of solutions
Every solution of a linear equation is a particular solution plus a multiple of the homogeneous solution (the solution of \(y' + Py = 0\)). In \(y = \frac{1}{3}e^x + Ce^{-2x}\), \(\frac{1}{3}e^x\) is particular and \(Ce^{-2x}\) is homogeneous. This 'particular plus homogeneous' pattern carries over to higher-order linear equations and to linear algebra.
Application: a draining and filling tank
A 200 L tank starts with pure water. Brine with 0.5 kg of salt per litre flows in at 4 L/min, and the mixture flows out at 4 L/min. Then \(S' = 2 - \frac{4}{200}S\), or \(S' + 0.02S = 2\). With \(\mu = e^{0.02t}\): \(S = 100 + Ce^{-0.02t}\), and \(S(0) = 0\) gives \(S = 100(1 - e^{-0.02t})\). The salt approaches 100 kg, the amount that matches the inflow concentration.
Application: an RL circuit
In a circuit with a resistor \(R\), an inductor \(L\), and a battery of voltage \(V\), the current satisfies \(L\frac{dI}{dt} + RI = V\). In standard form, \(I' + \frac{R}{L}I = \frac{V}{L}\). The solution starting from \(I(0) = 0\) is \(I = \frac{V}{R}\left(1 - e^{-Rt/L}\right)\): the current rises toward Ohm's-law value \(\frac{V}{R}\), with time constant \(\frac{L}{R}\).
I(t) = \frac{V}{R}\left(1 - e^{-Rt/L}\right)Linear versus separable
Some equations are both: \(y' + 2y = 6\) is separable and linear. Others are only one. \(y' = xy^2\) is separable but not linear (because of \(y^2\)). \(y' + y = x\) is linear but not separable. Recognising the type tells you which method to use; when both apply, choose whichever is quicker.
Existence and uniqueness
If \(P\) and \(Q\) are continuous on an interval containing \(x_0\), the initial value problem \(y' + Py = Q\), \(y(x_0) = y_0\) has exactly one solution on that whole interval. This guarantee is why linear models are so dependable: their solutions do not suddenly blow up, unlike some nonlinear equations.
Common mistakes
Forgetting to put the equation in standard form, so the wrong \(P\) is used. Including a \(+C\) inside the integrating factor (harmless but messy). Multiplying only the left side by \(\mu\). Forgetting to divide the constant \(C\) by \(\mu\) at the end, writing \(y = \frac{1}{3}e^x + C\) instead of \(Ce^{-2x}\).
Try it yourself
Solve \(y' - y = 2\) with \(y(0) = 1\). Answer: \(\mu = e^{-x}\), \((e^{-x}y)' = 2e^{-x}\), so \(e^{-x}y = -2e^{-x} + C\) and \(y = -2 + Ce^x\). The condition gives \(C = 3\), so \(y = 3e^x - 2\).
Key takeaways
Write the equation as \(y' + P(x)y = Q(x)\). Multiply by \(\mu = e^{\int P\,dx}\) so the left side becomes \((\mu y)'\). Integrate, then divide by \(\mu\), keeping the constant attached. Solutions are particular plus homogeneous, and linear initial value problems have unique solutions wherever the coefficients are continuous.
Flashcard
Standard form of a linear first-order equation
Check your understanding
What is the integrating factor for y' + 3y = x?
