A self-contained proof using only the Fundamental Theorem of Calculus.
Here’s an undergraduate-friendly proof the the existence and uniqueness of solutions to general first order homogeneous ODEs.
Existence and Uniqueness
Let I⊂R be an interval (possibly all of R) and P be a continuous function on I. Then for every a∈I, b∈R the differential equation
y′+P(x)y=0
has a unique solution f:I→R with f(a)=b, given by
f(x)=exp(∫[a,x]P)b
First, we verify existence: one way to guess the solution is to divide the equation through by y, giving
yy′=−P
The left hand side of this is the result of differentiating logy with respect to x, so we may write
()′=−P⟹log(y)=−∫P
Exponentiating both sides gives the proposed solution,
y=exp(−∫P)
Let a∈I and b∈R be arbitrary. As P is continuous on I it is integrable, and thus for any x∈I it is integrable on the subinterval [a,x]. Define the function A:I→R by
A(x)=∫[a,x]P
By the fundamental theorem of calculus, A is differentiable and
A′(x)=(∫[a,x]P)′=P(x)
Finally, define the function f:I→R as
f(x)=bexp(−A(x)). Note that
A(a)=∫{a}P=0 so
f(a)=bexp(−A(a))=bexp(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:
f′(x)=b(exp(−A(x)))′=bexp′(−A(x))(−A(x))′=bexp(−A(x))(−P(x))=−P(x)f(x)Thus, f′(x)+P(x)f(x)=0 for all x, so f is indeed a solution to the differential equation y′+Py=0, with f(a)=b.
Now that we know y′+P(x)y=0 has solutions, we show that they are uniquely determined by initial condition.
Let g be an arbitrary solution to y′+Py=0 with g(a)=b. We wish to show g(x)=bexp(−A(x)) for A(x)=∫[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
h′=(gexp(A))′=g′exp(A)+gexp′(A)A′=g′exp(A)+gexp(A)P=(g′+Pg)exp(A)=0Where the last equality to zero follows as g′+Pg=0 is exactly the assumption that g sovles our differential equation. Thus, we see h′(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∈R. But solving this for g gives
b=g(x)exp(A(x))⟹g(x)=bexp(−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′+Py=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)′, so we have
(xy)′=Q⟹xy=∫[a,x]Q⟹y=x∫[a,x]Q
In general of course we are not so lucky: y′+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
fy′+fPy=fQ
Can we find a particular function f for which the left side is a product rule? If so, (fy)′=fy′+fPy. This implies f′=fP, which is exactly our earlier homogeneous case: we know the solution to this is
f(x)=exp(∫P)
With this choice of f, we can rewrite our equation as
(fy)′=fQ
which can be solved directly by antidifferentiation:
fy=∫fQ⟹y=f∫fQ
Plugging in our known candidate for f gives our proposed solution:
y(x)=exp(∫P)∫exp(∫P)Q
Existence and Uniqueness
Let I⊂R be an interval (possibly all of R) and P,Q be continuous functions on I. Then for every a∈I, b∈R the differential equation
y′+P(x)y=Q(x)
has a unique solution f:I→R with f(a)=b given by
f(x)=exp(∫[a,x]P)b+∫[a,x][Qexp(∫[a,x]P)]
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′+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.