First-Order Linear Differential Equations
Solving First-Order Linear Differential Equations
Motivation: Reverse Product Rule
The integral ∫xsinxdx is a non-elementary integral—it has no closed-form antiderivative. However, adding a term can change the situation dramatically. Consider:
This integral does have a simple antiderivative: sinx⋅lnx+C. Why? Because the integrand is exactly the derivative of sinx⋅lnx obtained via the product rule:
Key insight: Recognizing that a sum of terms came from a product rule derivative makes integration possible. This same idea is used to solve first-order linear differential equations.
Standard Form of a First-Order Linear Differential Equation
A first-order linear differential equation has the form:
First-order: only the first derivative dxdy appears.
Linear: y and dxdy are not raised to any power other than 1 (no y2, y, cosy, etc.).
P(x) and Q(x) are functions of x only.
If the equation is not initially in this form, algebraic manipulation (e.g., dividing by a coefficient) puts it into standard form.
The Integrating Factor Method
The goal is to rewrite the left-hand side of the differential equation as the derivative of some product — specifically, the derivative of μ(x)⋅y, where μ(x) is called the integrating factor.
Recall the product rule:
If we multiply the entire differential equation by μ(x), we get:
For the left-hand side to match dxd(μy), we need:
Deriving the Integrating Factor
Set dxdμ=μP(x).
Separate variables: μdμ=P(x)dx.
Integrate both sides:
ln∣μ(x)∣=∫P(x)dxExponentiate to solve for μ(x):
μ(x)=e∫P(x)dxThe absolute value can be dropped because only one (positive) integrating factor is needed — any constant factor cancels out in the process.
Definition: The integrating factor μ(x)=e∫P(x)dx transforms the left-hand side of the linear DE into the derivative of μ(x)⋅y.
Applying the Method
Multiply the original DE (in standard form) by μ(x).
The left-hand side becomes dxd(μ(x)⋅y).
Integrate both sides with respect to x:
μ(x)y=∫μ(x)Q(x)dx+CSolve for y by dividing by μ(x).
Worked Example
Solve the differential equation:
Step 1: Put into standard form
Divide by cosx:
Recognize cosxsinx=tanx and cosx1=secx. So the standard form is:
Step 2: Identify P(x) and Q(x)
Step 3: Compute the integrating factor
(We take the positive version secx; dropping the absolute value and constant is fine.)
Step 4: Multiply the standard-form equation by μ(x)
The left-hand side is now dxd(secx⋅y) because:
Step 5: Integrate both sides
Step 6: Solve for y
Multiply both sides by cosx:
This is the general solution of the differential equation.
Initial Value Problem (IVP)
If an initial condition is supplied, the constant C can be determined.
Example: Solve the same DE with y(π)=2.
From the general solution y=sinx+Ccosx, substitute x=π, y=2:
Thus C=−2, and the particular solution is:
Summary of the Integrating Factor Method
Write the differential equation in standard form: dxdy+P(x)y=Q(x).
Compute the integrating factor: μ(x)=e∫P(x)dx.
Multiply the entire equation by μ(x).
Recognize the left-hand side as dxd(μ(x)y).
Integrate both sides: μ(x)y=∫μ(x)Q(x)dx+C.
Solve for y.
The key is that the integrating factor forces the left-hand side to become a perfect derivative, turning the differential equation into an integrable expression. This method works only for linear first-order ODEs.

Ask anything
We've read this whole study set, so questions about it get the best answers.