2.6: First Order Linear Differential Equations
( \newcommand{\kernel}{\mathrm{null}\,}\)
In this section we will concentrate on first order linear differential equations. Recall that this means that only a first derivative appears in the differential equation and that the equation is linear. The general first order linear differential equation has the form
y′+p(x)y=g(x)
Before we come up with the general solution we will work out the specific example
y′+2xy=lnx.
The strategy for solving this is to realize that the left hand side looks a little like the product rule for differentiation. The product rule is
(my)′=my′+m′y.
This leads us to multiplying both sides of the equation by m which is called an integrating factor.
my′+m2xy=mlnx.
We now search for a m with
m′=m2x
or
dmm=2xdx.
Integrating both sides, produces
lnm=2lnx=ln(x2)
or m=x2 by exponentiating both sides.
Going back to the original differential equation and multiplying both sides by x2, we get
x2y′+2xy=x2lnx.
Using the product rule in reverse gives
(x2y)′=x2lnx.
Now integrate both sides. Note that the integral of the derivative is the original. Integrate by parts to get
∫x2lnxdx.
- u=lnx and dv=x2dx
- du=1xdx and v=13x3
=x3lnx3−∫x23dx=x3lnx3−x39+C
Hence
x2y=13x3lnx−19x3+C.
Divide by x2
y=13xlnx−19x+Cx2.
Notice that when C is nonzero, the solutions are undefined at x=0. Also given an initial value with x positive, there will be no solution for negative x. Now we will derive the general solution to first order linear differential equations.
Consider
y′+p(t)y=g(t).
We multiply both sides by m to get
my′+mp(x)y=mg(x).
We now search for an m with
m′=mp(x)
or
dmm=p(x)dx.
Integrating both sides, produces
lnm=∫p(x)dx
exponentiating both sides
m=e∫p(x)dx.
Going back to the original differential equation and multiplying both sides by m, we get
my′+mp(x)y=mg(x)
(my)′=mg(x)
my=∫μg(x)dx.
Solving for y gives
y=e−∫p(x)dx∫g(x)e∫p(x)dxdx.