---
tag: 4D99EN036G
kind: proof
name: Proof of the solution formula for linear first-order equations
msc: [34A30]
proves: 06B9W45XV0
uses: [0Z3YKRQZ48, 01THH3Y3YP, 075VBY4K4X, 0NC2A3HWGT, 0RXX2PT1MQ, 0EX9GFJ0B3, 0P9BNBW2W3, 0V9A43H7WV, 0M0TKFRX2A, 003QDZ4T16]
sources:
  - url: https://en.wikipedia.org/wiki/Integrating_factor
    locator: Solving first order linear ordinary differential equations
---

## Proof

We use the integrating factor $\mu = e^{P}$.

1. The function $p$ is continuous on $I$. So $P(x) = \int_{x_0}^{x} p(s)\, ds$ is differentiable on $I$ with $P' = p$, by [[the integral of a continuous function is an antiderivative|0NC2A3HWGT]]. Also $P(x_0) = 0$.
2. Let $\mu(x) = e^{P(x)}$. By the [[chain rule|0RXX2PT1MQ]] and [[the derivative of the exponential|0EX9GFJ0B3]], $\mu' = p\, \mu$ on $I$.
3. The [[exponential is positive|0P9BNBW2W3]], so $\mu(x) > 0$ for each $x \in I$. Also $\mu(x_0) = e^0 = 1$. So $\mu$ is an [[integrating factor|01THH3Y3YP]] of the [[linear first-order equation|0Z3YKRQZ48]].
4. Let $y : I \to \R$ be differentiable. By the [[product rule|0V9A43H7WV]] and step 2, $(\mu y)' = \mu y' + p \mu y = \mu\, (y' + p y)$.
5. The function $\mu q$ is continuous on $I$. So $Q(x) = \int_{x_0}^{x} \mu(s)\, q(s)\, ds$ is differentiable on $I$ with $Q' = \mu q$, again by the antiderivative theorem. Also $Q(x_0) = 0$.
6. Uniqueness. Let $y$ be a solution of the [[initial value problem|075VBY4K4X]] on $I$. By step 4, $(\mu y)' = \mu q = Q'$.
7. So $G = \mu y - Q$ has $G' = 0$ on $I$, by [[linearity of differentiation|0M0TKFRX2A]]. Hence [[$G$ is constant|003QDZ4T16]] on $I$.
8. Its value at $x_0$ is $\mu(x_0) y(x_0) - Q(x_0) = y_0$. So $\mu(x) y(x) = y_0 + Q(x)$ for each $x \in I$.
9. Divide by $\mu(x) > 0$ and use $1/\mu(x) = e^{-P(x)}$. This gives the formula $y(x) = e^{-P(x)}\left(y_0 + Q(x)\right)$ of the statement. So there is at most one solution.
10. Existence. Define $y(x) = e^{-P(x)}\left(y_0 + Q(x)\right)$ for $x \in I$. It is differentiable on $I$ by steps 1 and 5, the chain rule and the product rule.
11. Here $\mu y = y_0 + Q$, so $(\mu y)' = Q' = \mu q$. By step 4, $\mu\, (y' + p y) = \mu q$ on $I$.
12. Dividing by $\mu > 0$ gives $y' + p y = q$ on $I$. Also $y(x_0) = e^{0}(y_0 + 0) = y_0$.
13. So $y$ is a solution on $I$, and by step 9 it is the only one.

## Idea

Multiplying by $\mu = e^{P}$ turns the left side $y' + p y$ into the exact derivative $(\mu y)'/\mu$. Then the equation says that $\mu y$ is an antiderivative of $\mu q$. An antiderivative is fixed by its value at one point, and this value is $y_0$.
