Sei sulla pagina 1di 14

What is a differential equation?

These are all differential equations:

A differential equation is simply an equation that contains a derivative.

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 other words if x increases by 1, then y increases by 4. If x increases by 10, then y


increases by 40.

That's true whatever the value of x.

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.

If we differentiate the function y(x)=4x we end up with the result dy/dx=4, as we


wanted.

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.....

What do we mean by the "order" of a diff. eqn.?


The order of a differential equation is just the order of the highest-order derivative in
the equation. So the equation dy/dx=4 is a first-order differential equation, whereas
the equation d2y/dx2=4 is a second-order differential equation.

What are the orders of the following differential equations?

What is the order of ?


The derivative with the highest order is the first derivative, so this is a first-order
differential equation
What is the order of ?
The derivative with the highest order is the first derivative, so this is a first-order
differential equation.

What is the order of ?


The derivative with the highest order is the second derivative, so this is a second-
order differential equation.

What is the order of ?


The derivative with the highest order is the second derivative, so this is a second-
order differential equation.

Categories of differential equations


We have already seen one way of categorising differential equations: we can say
whether they are first-order, second-order and so on. As well as the order of the
differential equation, there are several other distinctions we can make.

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.

We'll start with first-order differential equations.

Type of equation Method of solution


dy/dx=f(x) Direct integration
dy/dx=f(x)g(y) Separating the variables
Homogeneous Substitute y=vx
Linear equations Integrating factor

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.

We now move on to classify second-order differential equations and methods of


solving them.

Type of equation Method of solution


ad2y/dx2+bdy/dx+cy=0 (constant coefficient and
y(x)=Aemx+Benx
homogeneous)
ad2y/dx2+bdy/dx+cy=f(x) (constant coefficient and Include particular
INhomogeneous) integral

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.

Here's one of those other solutions: y(x)=4x+1.

Here's another: y(x)=4x+2.

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 is probably familiar to you from integration, whenever we integrated a function


we always had to add on a "constant of integration", usually called c.

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.

So if we want to end up with a unique solution to a differential equation, we need


another piece of information as well as the equation it satisfies, in order to determine
the constant.

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.

With second-order differential equations, we need to integrate twice to get to an


equation "y(x)=...something". That means we end up with two constants of
integration and need two boundary conditions to specify which solution we want.

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.

It is the appropriate method if you have a differential equation like:

dy/dx=f(x)

where f(x) is any function of x (including the possibilities that f(x)=constant or


f(x)=0.)

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.

If dy/dx=x-2+x+cos(x) then the function y(x) must be the integral of x-2+x+cos(x),


which is -x-1+.5x2+sin(x)+c.

So y(x)=-x-1+.5x2+sin(x)+c.

If dy/dx+2x3=3, then rearranging we get dy/dx=-2x3+3. So the function y(x) must be


the integral of -2x3+3, which is -.5x4+3x+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).

For example, dy/dx=y2sin(x) or dy/dx=x3ey.

In this case, we cannot just integrate the right-hand side, because the y is involved
there.

Instead we do something else, as demonstrated by this example.

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:

Now the final step is to integrate both sides with respect to x:

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:

and then it simplifies into a form we can do:

So we obtain the required relation between x and y. Don't forget the constant of
integration.

Making a differential equation separable


In the last example in the previous section, we had to rearrange the right-hand side of
the differential equation before we could separate the variables.
It is not always possible to do this rearrangement and in some cases it is necessary
instead to introduce a new variable which is a combination of x and y.

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.

Here's an example to illustrate the method.

We cannot write the right-hand side as a function of x times a function of y. Instead


we introduce a new variable, v(x), defined by this relationship to y(x): y(x)=v(x)x.

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:

The right-hand side then simplifies:

so
Now at last we can separate the variables as in the earlier section:

Then as always, integrate both sides,

and we end up with a relation between x and v(x).

Finally we need to put this back in terms of x and y(x), using the relation that
y(x)=v(x)x:

Here's an example for you to try. Have a go.

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 the right-hand side now simplifies:

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:

And again simplify the right-hand side:


Now separate the variables:

and integrate both sides:

to obtain a relation between x and v(x):

Finally, rewrite in terms of x and y(x), using y(x)=v(x)x, and simplify:

Finding and using an integrating factor


Suppose you have this equation to solve:

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.

Step One: calculate the integral of the function P(x).


Step Two: the integrating factor, which we'll call IF, is defined as the exponential of
this, i.e. it's defined by:

Step Three: the solution to the equation is given by:

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:

In this case that's:

We can do that integral using integration by parts The result is:

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!

Here's another example for you to try.


Why does the integrating factor method work?
Let's look back at that first example:

Remember the integrating factor was ex in that case.

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):

Now we can integrate both sides of the equation:

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:

Multiply through by the integrating factor:

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:

Step One: Integrate P(x). In this case P(x)=3 and Q(x)=ex.

The integral of P(x) is 3x.

Step Two: Find the integrating factor:

Step Three: Write down the solution for y(x):

Simplify and then do the integral:

Simplify the answer:

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.

Potrebbero piacerti anche