First order linear differential equations
We are now going to deal with another subset of first order differential equations which in some ways are easier than the previous and in other ways more complicated. These are linear first order differential equations. The general form of a first order linear differential equation is:
where and are any functions of .
Very importantly, I’m leaving off the fact that is dependent on in the notation, but you should remember that this is really and that is the function you are trying to solve for.
Sometimes you will be given an equation which is not obviously in this form but it can be transformed to this form. For instance:
This can easily be transformed into the canonical form for a linear first order DE. We are going to try and rewrite the left hand side of the equation in a form which will mean that we can solve the differential equation very easily. We are going to try and rewrite the left hand side of the first equation as:
for some so that indeed the two expressions are the same. The bottom line: We want to find for which the previous equation is equal to the L.H.S of the first equation.
Let’s start by expanding the previous equation using the product rule:
ie. if this is going to equal the L.H.S of the first equation then we must have that:
So let’s see if we can find what has to be for this to be true. We can use a rather nice trick which is that:
so we have . Let’s bring up the from the bottom and integrate, to give:
and thus:
Let’s redefine the exponential of the constant and just say:
But in fact we see that we will write the left hand side of the equation in the form:
and so the constant will vanish because we have it in the numerator and denominator, so we can actually ignore it and say:
All we are claiming is that if then
Think of some simple functions for and show that indeed the left and right are the same when .
This looks pretty strange, but in fact it’s fine. If we can integrate then we can certainly take the exponential of the integral. So, we are claiming that now the differential equation can be written in the form so that the solution is:
So we have done it….without knowing what we were doing….We can plug back in what has to be in terms of and we have found the solution to the equation. The complete solution is then:
which might look horrible, but there’s no part of that which you can’t do…as long as the integrals themselves aren’t too complicated.
Let’s look at an example of this where we will follow the same reasoning but it will all be a bit more clear when we have specific ‘s and ‘s and ‘s. Let’s take a really simple example:
so now we have and . We thus have that . So apparently the left hand side of the equation should be the same as:
Check this by plugging in :
which is indeed the left hand side of the original equation. So now we have that:
which is just . We can then solve this to get:
Check that this is a solution by plugging it into the original differential equation that we were trying to solve. You’ll see that it is a general solution to this equation. As always can be fixed to a particular value by being given an initial condition.
Let’s take another example. This time it corresponds to a falling body accelerating under gravity but with air resistance:
The 9.8 is the acceleration due to gravity. The 0.196 is a number which represents the amount of air resistance, but in fact it’s chosen here to make the numbers come out nicer in the end. Let’s start by putting it into the canonical form for a first order linear DE:
The left hand side can then be rewritten to give:
Now we rearrange, and integrate to give:
which gives, after integration:
or:
If we state that at the velocity is 0 then we get:
so :
which corresponds to a body accelerating under gravity (like being dropped out of a plane) and the acceleration being slowed by air resistance until it reaches a terminal velocity of .
Let’s just make sure that we could have used our formalism to get the answer straight away without the juggling we did of the left hand side:
Calculating:
with and you’ll find that you do indeed get the same solution we found above.
Let’s look at another example:
I’m jumping about between different forms of notation because in general you will come across all of these and it’s useful for you to be able to translate between them. The dash is just the usual derivative and we can see here that is supposed to be a function of a variable . It should always be clear what the functional dependence will be just by looking at the equation.
Try running through this example like we did with the last one by getting the left hand side into a term which has a single derivative on times some function of . We will however simply take and and plug it into the formalism. here and so and thus:
A reiteration
I think that it’s important to understand how we’re solving these first order linear differential equations. The idea is to make a rearrangement of them into a form which is very easily to solve. In order to do that we have to find a special function which allows for this transformation, but once we’ve found it and made the rearrangement, we can solve the equation with ease (modulo being able to do the integrals).
We said at the very beginning of this section that in some ways these equations are more complicated than the separable equations we first looked at, and in other ways are less complicated. The method to solve them was certainly more involved than when we solved the separable equations but it turns out that the linearity of these equations imbues them with some very special properties. In general solutions to linear equations can be combined in ways which make finding the combined effects of different solutions very easy. We will not have a chance to go into this, but suffice it to say that in general, finding solutions to non-linear equations can be incredibly complicated, but they can have some amazing behaviour.
If you had a somewhat more sophisticated differential then you could study more complex problems…
I’m not sure if its just my computer but there is a line that reads:
$\frac{1}{R(x)}\frac{d(y R(x))}{dx}=P(x)$
Cheers Moemedi, spot on.
J
That flow diagram was really helpful!
Cheers Rohin, glad it helped!
J
[…] MAM1000 lecture notes part 36 – Differential equations – first order linear differential… […]