In some cases, as in the first example above, it may contain little else. In others, as in
the last example, it may contain more than one derivative, and the derivative may be
first-order, second-order or any other order!
As well as at least one derivative, the equation may contain other terms involving
variables, as in the three middle examples given. Although the second and third
equations look fairly similar, the information they contain is very different, as we'll
see in this notebook.
A differential equation tells you about the relationship between two (or more)
variables. Often what we want to do is to solve the differential equation in order to see
that relationship more clearly.
By solving a differential equation, we mean finding the function that satisfies it. In
other words finding the relationship between the two variables directly, rather than
involving any derivatives.
Here's a simple example. Suppose you're told that dy/dx=4. What does that mean
about the way the variable y depends on the variable x?
dy/dx=4 so.....what?
The equation dy/dx=4 means in English that if x changes, then y changes 4 times
faster.
In terms of graphs, the equation dy/dx=4 tells us that the slope of the curve of y(x) is
4, for all of its length.
From our knowledge of differentiation, we can simplify the equation dy/dx=4, by
which I mean we can write it as "y(x)=...something" instead, getting rid of the
derivative altogether.
We can do this by thinking in a roundabout sort of way: what must y(x) be if its
derivative is 4? In other words, what function can we differentiate to end up with 4?
This may seem a familiar question, it's just what we asked when doing integration.
Indeed that's exactly what we're doing - we're integrating the differential equation
dy/dx=4 to end up with an equation "y(x)=...something".
By now you may have worked out what the "something" is: 4x.
Also, y(x)=4x is a function whose curve is just a straight line with slope 4, as we
wanted.
Later on we'll see that there is actually another function y(x) which we can
differentiate to get dy/dx=4. In fact there are infinitely many of them! But more on
that later.....
The reason for categorising differential equations is that there are many different
methods for solving them, but any particular method only works on certain types of
equation.
The first step in solving a differential equation is therefore to establish what sort of
differential equation it is. You can do this just by looking at it, as long as you
remember what different categories there are!
The aim of this section is to give you an overview of the different sorts of differential
equations. Even though you won't know the details or even what the different
categories mean, you can get a feel for what there is and you can always refer back to
this section later on as you fill in the gaps.
All that may seem quite alarming, but with some practice you'll find you can quickly
decide which method is appropriate. All the different types of equation and
corresponding methods are described in the following sections. Remember to look
back to this table for reference.
As you see, there are fewer methods to learn for the second-order equations, however
as you'll see in the later sections, there are many different sub-classes of both the
types given above.
Boundary conditions
You may recall that in an earlier section we were looking at the equation dy/dx=4 and
we solved this to get the solution y(x)=4x. However, I said at the time that there were
infinitely more solutions to that equation.
And so on.......
These are all solutions because if we differentiate y(x)=4x+c, where c is any constant,
we find that dy/dx=4, since the constant disappears when you differentiate it.
This means that whenever we solve a differential equation (i.e. we integrate it to find
the function that satisfies it) we can always add a constant on to the solution.
For example, if we were asked for the solution of the equation dy/dx=4 that satisfies
y(0)=0, then there would be only one possible answer: y(x)=4x.
If we try any of the other solutions to the equation, maybe y(x)=4x+1 or y(x)=4x+2,
say, we find that y(0) is not zero, but 1 or 2 respectively.
Such a condition which is given in conjunction with a differential equation to fix the
constant of integration and so give a unique solution, is called a boundary condition.
First Order
Direct integration
This method should be the most familiar to you, if you have done integration before.
It is the method we used to solve dy/dx=4 in an earlier section.
dy/dx=f(x)
In this case we just say, well if the derivative of y(x) is equal to f(x), then y(x) itself
must be the integral of f(x). So we integrate f(x) and that's it.
Here's some examples. As always, try them yourself. In each case, give the general
answer, that means with the constant c still undetermined.
If dy/dx=2x then the function y(x) must be the integral of 2x, which is x2+c. So
y(x)=x2+c.
If dy/dx=sin(x) then the function y(x) must be the integral of sin(x), which is -cos(x)
+c.
So y(x)=-cos(x)+c.
If dy/dx=3ex then the function y(x) must be the integral of 3ex, which is 3ex+c.
So y(x)=3ex+c.
If dy/dx=tan(x) then the function y(x) must be the integral of tan(x), which is ln|
sec(x)|+c.
So y(x)=ln|sec(x)|+c.
So y(x)=-x-1+.5x2+sin(x)+c.
So y(x)=-.5x4+3x+c.
Separable Equations
This method is appropriate if you have an equation of the form dy/dx=f(x)g(y).
In this case, we cannot just integrate the right-hand side, because the y is involved
there.
Example 1. Solve:
The idea, as the name of the method suggests, is that we separate the two variables x
and y.
Remember that the reason we couldn't use direct integration was because of the y-
dependence on the right-hand side. The first step is to rearrange the equation so that
there is NO y-term on the right-hand side.
We do this by moving all the parts that involve y onto the left-hand side. In this case
that means multiplying both sides by y-1. This gives:
Using the function-of-a-function rule on that left-hand integral we can rewrite the
equation as:
Now we can just do those integrals, to get what we were after in the first place: a
relationship between x and y with no derivatives involved:
Here's some more examples of the same thing, you try them.
To solve this equation, the first step as before is to move the y-term away from the
right-hand side on to the left:
The second step is to integrate both sides, and remember that because of the dy/dx on
the left-hand side, that means we integrate with respect to y:
The integrals are of standard form and we can do them, to obtain the required relation
between x and y. Don't forget the constant of integration.
Sometimes we need to rearrange the right-hand side to get it into the form of a
function of x times a function of y, as in this case. Here we can take a y outside a
bracket on the top, so that the two variables can be separated:
Then to solve this equation, we again move the y-term away from the right-hand side
on to the left:
As before, the next step is to integrate both sides, and remember that because of the
dy/dx on the left-hand side, that means we integrate with respect to y:
We need to split up the integral on the left-hand side before we can do it:
So we obtain the required relation between x and y. Don't forget the constant of
integration.
The equation is then written entirely in terms of this new variable and x. The idea is
that the right-hand side is thereby simplified and the two variables (that's the new one
and x) may be easily separated.
To write the differential equation in terms of x and v(x), instead of x and y(x), we
replace all occurrences of y by vx. We also need to replace the dy/dx, so that the
variable y doesn't appear in the equation at all.
To see what we should replace dy/dx with, we have to differentiate the equation
relating y(x) and v(x), namely y(x)=v(x)x. Differentiating this using the product rule
we find:
Now we can re-write our original equation in terms of x and v(x) and dv/dx:
It is now that we see the point of introducing v(x): we can now simplify the right-hand
side of the equation, by cancelling an x from the top and bottom:
We can rearrange that to look more like the other separable examples, i.e. in the form
dv/dx=......., by first taking the v over to the right-hand side and then dividing all
through by x:
so
Now at last we can separate the variables as in the earlier section:
Finally we need to put this back in terms of x and y(x), using the relation that
y(x)=v(x)x:
As before, we introduce v(x), by using y(x)=v(x)x. Then rewrite the equation in terms
of x and v and dv/dx:
Again get the left-hand side to be simply dv/dx=.....by taking the v over to the right
and dividing all through by x:
In this case we cannot separate the variables and introducing a new variable doesn't
help either. In this case we need to use a different method entirely, as follows.
First I'll tell you the steps to follow, for the general equation of this form, apparently
pulling them from thin air, then we'll go through the example of the equation above,
and then when it's a bit more familiar to you I'll show you why the procedure works!
Here's the typical equation for which we can use this method:
Here the functions P(x) and Q(x) can be any functions of x, in the example above they
were 1 and x respectively.
That's the bit I just pulled from nowhere! Let's see how it works in practice, then we
can look at where it really comes from.
Going back to the equation at the start of this section, then, we have
So P(x)=1 and Q(x)=x. The integrating factor is therefore ex, since the integral of 1 is
x. (No need for a constant of integration, very unusually, in this procedure, that's
because if you do put one in it will cancel out later on anyway.....)
So, we can write down the solution y(x) of the equation using the "mysterious"
formula given in Step Three:
which simplifies to
Try putting this solution for y(x) back into the original equation to check that it does
satisfy it. This is a very useful habit to get into!
Now look what we get if we multiply the whole equation through by the integrating
factor:
Now this is the crux of the method: the left-hand side is the derivative of a product
(this is a result of the definition of the integrating factor and will always be the case):
and by dividing both sides by x to get y on its own, we retrieve the result we found
with the formula:
We can see now where the formula came from if we follow that same procedure with
the general equation:
Write the left-hand side as the derivative of a product (it's rather more complicated
this time but try differentiating what's inside the square brackets and you'll see it does
give the previous left-hand side....):
We'll write the integrating factor as just IF instead of that exponential to make it
clearer:
Then integrate both sides:
Finally divide both sides by IF to get y on its own and there we are, we have found the
formula:
That's it - but don't forget to check by putting that solution back into the original
equation to see that it does satisfy it.