Training Differential Equations First-Order Linear Equations
3 / 5

First-Order Linear Equations

24 min Differential Equations

First-Order Linear Equations

When a first-order equation is not separable, the next tool to reach for is the integrating factor method. This technique applies to any equation that can be written in the standard linear form $y' + P(x)y = Q(x)$. The word "linear" here means the unknown function $y$ and its derivative $y'$ each appear to the first power — no $y^2$ terms, no $yy'$ terms — though $P$ and $Q$ can be any functions of $x$.

The key insight is that multiplying both sides of the equation by a carefully chosen function $\mu(x) = e^{\int P(x)\,dx}$ transforms the left side into the exact derivative of a product: $\frac{d}{dx}[\mu(x)y]$. This is powerful because once you recognize the product rule in reverse, you can integrate both sides directly and solve for $y$. The integrating factor turns what looks like an intractable equation into a straightforward integration problem.

Many real-world models naturally produce first-order linear equations. A tank that receives a salt solution at a constant rate while draining at another rate leads to a mixing problem whose governing equation is linear. Newton's law of cooling, when the ambient temperature varies with time, also takes this form. RC electrical circuits obey a first-order linear ODE relating charge (or current) to a driving voltage.

In this lesson you will practice identifying $P(x)$ and $Q(x)$, computing the integrating factor, and carrying out the integration to find the general solution. The interactive explorer lets you adjust the constant coefficients and see how the integrating factor and solution curve change in real time.

Integrating Factor

Use $$\mu(x)=e^{\int P(x)dx}.$$ Multiply the equation by $\mu(x)$ to make the left side a product derivative.

Example 1

Solve $y'+y=0$.

  1. Integrating factor is $e^x$.
  2. This gives $$\frac{d}{dx}(e^xy)=0,$$ so $e^xy=C$ and $$y=Ce^{-x}.$$
Example 2

Solve $y'+2y=4$.

  1. Integrating factor:
  2. $e^{2x}$.
  3. Then $$\frac{d}{dx}(e^{2x}y)=4e^{2x}.$$ Integrating gives $$e^{2x}y=2e^{2x}+C,$$ so $$y=2+Ce^{-2x}.$$
Interactive Explorer: Integrating Factor Method
Equation: y' + 2y = 4
μ(x) = e^(2x)
Steady state: y → 2
Solution: y = 2 + (−2)e^(−2x)

Practice Problems

1. Identify $P(x)$ in $y'+3y=x$.
2. What is the integrating factor for $y'+2y=5$?
3. Solve $y'+y=0$.
4. Solve $y'+2y=0$.
5. Why use an integrating factor?
Show Answer Key

1. $3$

2. $e^{2x}$

3. $y=Ce^{-x}$

4. $y=Ce^{-2x}$

5. It turns the left side into the derivative of a product