Note: Ode Existence Uniqueness

Steve Trettel

|

$$\newcommand{\RR}{\mathbb{R}}$$

Here’s an undergraduate-friendly proof the the existence and uniqueness of solutions to general first order homogeneous ODEs.

(Existence and Uniqueness)

Let $I\subset \RR$ be an interval (possibly all of $\RR$) and $P$ be a continuous function on $I$. Then for every $a\in I$, $b\in\RR$ the differential equation

$$y^\prime + P(x)y=0$$

has a unique solution $f\colon I\to \RR$ with $f(a)=b$, given by

$$f(x)=\frac{b}{\exp\left(\int_{[a,x]}P\right)}$$

First, we verify existence: one way to guess the solution is to divide the equation through by $y$, giving

$$\frac{y^\prime}{y}=-P$$

The left hand side of this is the result of differentiating $\log y$ with respect to $x$, so we may write

$$\left(\right)^\prime = -P\,\implies\, \log(y)=-\int P$$

Exponentiating both sides gives the proposed solution,

$$y=\exp\left(-\int P\right)$$

Let $a\in I$ and $b\in\RR$ be arbitrary. As $P$ is continuous on $I$ it is integrable, and thus for any $x\in I$ it is integrable on the subinterval $[a,x]$. Define the function $A\colon I\to\RR$ by

$$A(x)=\int_{[a,x]}P$$

By the fundamental theorem of calculus, $A$ is differentiable and

$$A^\prime(x)=\left(\int_{[a,x]}P\right)^\prime = P(x)$$

Finally, define the function $f\colon I\to \RR$ as $f(x)=b\exp(-A(x))$. Note that $A(a)=\int_{{a}}P=0$ so

$$f(a)=b\exp(-A(a))=b\exp(0)=b.$$

We show $f$ satisfies the differential equation by direct computation. Since $f$ is a composition of differentiable functions, its differentiable and we proceed via the Chain Rule:

$$ \begin{align*} f^\prime(x)&=b\left(\exp(-A(x))\right)^\prime\\ &=b\exp^\prime(-A(x))(-A(x))^\prime\\ &=b\exp(-A(x))(-P(x))\\ &=-P(x)f(x) \end{align*} $$

Thus, $f^\prime(x)+P(x)f(x)=0$ for all $x$, so $f$ is indeed a solution to the differential equation $y^\prime+Py=0$, with $f(a)=b$.

Now that we know $y^\prime + P(x)y=0$ has solutions, we show that they are uniquely determined by initial condition.

Let $g$ be an arbitrary solution to $y^\prime + Py =0$ with $g(a)=b$. We wish to show $g(x)= b\exp(-A(x))$ for $A(x)=\int_{[a,x]}P$ as above. The rather striking idea is to consider the function

$$h(x)=g(x)\exp(A(x))$$

and attempt to show that $h$ is constant. Computing its derivative, we see

$$ \begin{align*} h^\prime&=\left(g\exp(A)\right)^\prime\\ &=g^\prime\exp(A)+g\exp^\prime(A)A^\prime\\ &=g^\prime\exp(A)+g\exp(A)P\\ &=(g^\prime+Pg)\exp(A)\\ &=0 \end{align*} $$

Where the last equality to zero follows as $g^\prime + Pg=0$ is exactly the assumption that $g$ sovles our differential equation. Thus, we see $h^\prime(x)=0$ for all $x$,so $h$ is constant. Evaluating at $x=a$ we see

$$h(a)=g(a)\exp(A(a))=g(a)\exp(0)=g(a)=b$$

Where $A(a)=0$ as it is the integral over $[a,a]={a}$ as we saw previously. Thus, $h(x)$ is a constant function with $h(a)=b$, so in fact $h(x)=b$ for all $x\in\RR$. But solving this for $g$ gives

$$b=g(x)\exp(A(x))\implies g(x)=b\exp(-A(x))$$

and so $g$ is exactly the solution we already knew about. Thus, this is the only solution passing through $(a,b)$.

Non-Homogeneous Equations

The general first order linear equation is

$$y^\prime + P y = Q$$

Where $P,Q$ are continuous functions of $x$. To ‘guess’ a solution to this is a bit more involved, but still possible. We’ll start by looking at the special case $P(x)=x$. Here the left hand side is just the expanded product rule of $(xy)^\prime$, so we have

$$(xy)^\prime = Q \,\implies\, xy = \int_{[a,x]} Q\,\implies\, y=\frac{\int_{[a,x]} Q}{x}$$

In general of course we are not so lucky: $y^\prime + Py$ is not the result of a product rule. But we can change this! Letting $f$ be some arbitrary function, let’s multiply through the whole equation to yield

$$f y^\prime + fP y = f Q$$

Can we find a particular function $f$ for which the left side is a product rule? If so, $(fy)^\prime = f y^\prime +fPy$. This implies $f^\prime = fP$, which is exactly our earlier homogeneous case: we know the solution to this is

$$f(x)=\exp\left(\int P\right)$$

With this choice of $f$, we can rewrite our equation as

$$(fy)^\prime = fQ$$

which can be solved directly by antidifferentiation:

$$fy = \int fQ\,\implies\, y = \frac{ \int fQ}{f}$$

Plugging in our known candidate for $f$ gives our proposed solution:

$$y(x)=\frac{\int \exp\left(\int P\right)Q}{\exp\left(\int P\right)}$$
(Existence and Uniqueness)

Let $I\subset \RR$ be an interval (possibly all of $\RR$) and $P,Q$ be continuous functions on $I$. Then for every $a\in I$, $b\in\RR$ the differential equation

$$y^\prime + P(x)y=Q(x)$$

has a unique solution $f\colon I\to \RR$ with $f(a)=b$ given by

$$f(x)=\frac{b+\int_{[a,x]}\left[Q\exp\left(\int_{[a,x]}P\right)\right]}{\exp\left(\int_{[a,x]} P\right)}$$

Exercise: Prove this! Existence = calculation with derivatives.

Uniqueness: if $f,g$ are both solutions, what do we know about $h=f-g$? It solves the homogeneous problem $h^\prime + Ph =0$ with $h(a)=0$. But this has just one solution (we’ve proven uniqueness) and its the zero solution! So their difference is zero.