You are on page 1of 10

First-Order Linear Differential Equations:

A First order linear differential equation is an equation of the form

y 0 + P (x)y = Q(x).

Where P and Q are functions of x. If the equation is written in


this form it is called standard form. The equation is called first
order because it only involves the function y and first derivatives
of y. We can solve this equation in general but it is better to
understand how to solve it than it is to just memorize the solution.
Integrating factors
We are trying to solve y 0 + P (x)y = Q(x). We make the following
observation (using the product rule):
d R R d R P (x)dx
[y e P (x)dx ] = y 0 e P (x)dx + y [e ]
dx dx
d R P (x)dx R
Now [e ] = e P (x)dx P (x) So we have
dx
d R R
[y e P (x)dx ] = e P (x)dx [y 0 + P (x)y]
dx
R
We define u(x) = e P (x)dx to be the integrating factor which has
the property that
d
[u(x)y] = u(x)[y 0 + P (x)y].
dx
Solving y 0 + P (x)y = Q(x) :

Now we start with our equation and multiply both sides by the
integrating factor:
 
d
[u(x)y] = u(x)[y 0 + P (x)y] = u(x)Q(x).
dx

Now we can integrate both sides and notice that the left-hand side
is already the derivative of something!
Z Z
d
u(x)ydx = u(x)Q(x)dx.
dx
Z Z
1
u(x)y = u(x)Q(x)dx y = u(x)Q(x)dx.
u(x)
Solving y 0 + P (x)y = Q(x) :

The general solution to the first order linear differential equation is


given by Z
1
y(x) = u(x)Q(x)dx,
u(x)
with R
P (x)dx
u(x) = e .
Now lets do an example.
Example: y 0 + 4xy = x

First we note that this is already in standard form with P (x) = 4x,
and Q(x) = x.
The first step is to find the integrating factor
2
R R
P (x)dx 4xdx
u(x) = e =e = e2x .

Note that we do not need the general form of the integral until
the last step.
1
R
The next step is to find y = u(x) u(x)Q(x)dx.
2.
Recall that 1
= e2x
e2x2
Example: y 0 + 4xy = x continued
1 2
u(x)Q(x)dx, with u(x) = e2x , so we have to
R
We have y = u(x)
solve Z
2x2 2
y=e xe2x dx.

This integral can be done with the method of substitution, let


z = 2x2 , then dz = 4xdx
Z Z
2 1 z 1 z 1 2
xe2x dx = e dz = e + C = e2x + C.
4 4 4
Almost done, now let
2 1 2 1 2
y = e2x [ e2x + C] = + Ce2x .
4 4
Note how important the +C is in the integral, without it we lose
an entire part of the solution!
Example: y 0 + 4xy = x continued

We can have the utmost confidence in our solution if we check our


work. If we did everything right then we will be able to solve the
differential equation with our answer, i.e.
1 2
y= + Ce2x should satisfy y 0 + 4xy = x.
4
Now
2 2
y 0 = Ce2x (4x) = 4Cxe2x .

So
2 2 1
y 0 + 4xy = 4Cxe2x + 4xCe2x + 4x = x
4
and it works!
Is there another way to do that problem?

Yes, we can also solve that problem using separation of variables.


dy dy 1
+ 4xy = x = x(1 4y) dy = xdx.
dx dx (1 4y)

Try solving it this way and see if you get the same answer (you
should!)
Another Example:

Find the solution to


xy 0 + y = x2 + 1
First we write
1 1 1 1
y0 + y = x + P (x) = and Q(x) = x + .
x x x x
Therefore R
P (x)dx
u(x) = e = x,
and
Z Z
1 1 1
y= Q(x)u(x)dx = x2 + 1dx = x2 + 1 + Cx1 .
u(x) x 3
Solve xy 0 + y = x2 + 1

Lets check our answer y = 31 x2 + 1 + Cx1 :

2
y 0 = x Cx2
3

2 1
xy 0 + y = x2 Cx1 + x2 + 1 + Cx1
3 3

xy 0 + x = x2 + 1!

You might also like