Linear Differential Equations
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn the integrating factor method for solving first-order linear differential equations. This handles equations that aren’t separable.
The Concept
Section titled “The Concept”A first-order linear DE has the standard form
The trick is to multiply both sides by an integrating factor that turns the left side into the derivative of a product.
The integrating factor is
Here’s what each piece means:
- μ(x) (the Greek letter mu) is the integrating factor itself. It’s a function of x that you’ll multiply through the entire equation. The name “integrating factor” comes from the fact that it makes the equation integrable.
- e is Euler’s number (approximately 2.718), the base of the natural exponential.
- ∫ P(x) dx is the antiderivative of P(x), the coefficient of y in the standard form. You don’t need a constant of integration here because any antiderivative works (the constant would just multiply through and cancel).
- The whole expression says: take the coefficient of y, integrate it, then raise e to that result. That’s your multiplier.
After multiplying through by this factor, the left side becomes the derivative of a product. Quick refresher on the product rule from Calculus 1: the derivative of two functions multiplied together is
The integrating factor is specifically designed so that the left side of the equation matches this pattern in reverse. After multiplying, you get
Integrate both sides and solve for y
The whole method boils down to: find the integrating factor, multiply, recognize the product rule, integrate, solve.
Worked Examples
Section titled “Worked Examples”Example 1: Basic linear equation
Solve dy/dx + 2y = 4x.
Here P(x) = 2 and Q(x) = 4x. The integrating factor is
Multiply both sides by e^(2x)
The left side is the derivative of the product
Integrate both sides. The right side needs integration by parts with u = 4x, dv = e^(2x) dx
So
Divide both sides by e^(2x)
The term 2x - 1 is the steady-state behavior, and Ce^(-2x) is a transient that decays to zero as x grows. No matter what C is, the solution eventually looks like y = 2x - 1.
Example 2: Initial value problem
Solve dy/dx + (1/x)y = x with y(1) = 0, for x > 0.
Here P(x) = 1/x and Q(x) = x. The integrating factor is
Multiply both sides by x
The left side is the derivative of xy
Integrate both sides
Divide by x
Apply the initial condition y(1) = 0
The specific solution is
The curve passes through (1, 0) and grows roughly like x²/3 for large x. Near x = 0 the -1/(3x) term dominates and the function drops toward negative infinity, but our solution only applies for x > 0 starting from x = 1.
Example 3: Mixing problem
A 100-liter tank initially contains pure water. Brine with 3 g/L of salt flows in at 5 L/min, and the well-mixed solution flows out at 5 L/min. Find the amount of salt A(t) in the tank at time t.
Salt comes in at 3 times 5 = 15 g/min. Salt leaves at (A/100) times 5 = A/20 g/min. The DE is
Rewrite in standard form
The integrating factor is
Multiply and integrate
At t = 0, A = 0 (pure water), so C = -300
The salt amount approaches 300 g (which is 3 g/L times 100 L) as t goes to infinity. The exponential term decays with a time constant of 20 minutes.
Real-World Application
Section titled “Real-World Application”Linear DEs with integrating factors model situations where something accumulates or decays with a forcing term:
- Mixing problems (salt, chemicals, pollutants flowing through tanks)
- RC circuits (voltage across a capacitor with a driving signal)
- Population models with constant immigration
- Drug concentration in the bloodstream with continuous dosing
- Game design: resource pools that fill and drain simultaneously