Chapter 6 Differential Equations
6.1 Introduction
Differential equations arise nearly every time we try to model real world phenomena using mathematics. We recall that the derivative measures the of one quantity with regards to another. Newton’s second law says:
The rate of change of momentum of a body is equal to the applied external force.

The momentum of a body is the product of the mass and the velocity (in one dimension). Thus, if a body is experiencing a force then Newton’s law can be written mathematically as Thus we get an equation involving differentiation, and such an equation we call a differential equation. You have already met simple differential equations of the form for then the answer is It is important that we know the value of at some point, or else we cannot exactly say what is. We need a constant of integration. Below we have a picture where we can see that all these functions have the same derivative, so to choose which is the right one for our situation we have to know a point through which the function goes.

Here is a web page with more examples of differential equations Differential equations at Mathisfun.com
6.1.1 The cultural heritage of mathematics

Katherine Johnson (1918 – 2020)
In 1962, the United States decided to send people to the Moon. Getting to and from the Moon would take a lot of work. Katherine studied how to use geometry for space travel. She figured out the paths for the spacecraft to orbit (go around) Earth and to land on the Moon. NASA used Katherine’s math, and it worked.
https://www.nasa.gov/audience/forstudents/k-4/stories/nasa-knows/who-was-katherine-johnson-k4
The paths that bodies take under gravitational attraction are the so-called conic sections.

Hypatia (370-415)
Hypatia was known more for the work she did in mathematics than in astronomy, primarily for her work on the ideas of conic sections introduced by Apollonius. She edited the work On the Conics of Apollonius, which divided cones into different parts by a plane. This concept developed the ideas of hyperbolas, parabolas, and ellipses.
https://www.agnesscott.edu/lriddle/women/hypatia.htm
6.2 Separable equations
The next most straightforward sort of differential equation that we can solve is one of the form for then we can write We still need a boundary condition (we will assume that and are spatial variables here). We can integrate both of these in principle to get a solution.

A projectile moving upwards is subject to a force due to gravity equal to where is its mass, and is acceleration due to gravity. It is also slowed down by an air resistance which is equal to , where is its speed and is some positive real constant which depends on the geometry of the projectile. The speed of the projectile at time is (this is the initial condition).
Newton’s second law says Since is constant in this equation (the projectile does not change mass as it flies) we can cancel from both sides above to get This is separable. Rearranging we have the equation Integrating both sides we have where is a constant of integration that we find using the initial condition. When so that Thus Rearranging the above equation we have Thus Multiplying both sides by we have Hence so thatYou can find more examples of separable equations and their solutions at Math24.net.
The equation is separable with and . Now if and only if or . So the equation can be solved by separating variables in the three intervals , , and . On any such interval, we have: with . This means that Therefore and taking the exponential of both sides we have Since is constant, is also constant. Let us call this . Then, Now, is positve if . In this case so that
Now is negative if or . In this case
so that
Now, if , i.e. , then , and if , then . Hence we will have a vertical aymptote in at .
Remark IN the picture above you can see where the asymptotes are by the wierd jum in the graph. I have left this in, so that you can see how the solution changes from negative to greater than 1 as we move through . The situation seen with the previous example is typical of separable equations. You always need to examine the case separately. Notice that if then thanks to the differential Equation (6.2). So the values for which are constant stationary solutions of the equation.
Definition 6.2 A stationary or equilibrium solution for a differential equation is any solution . The stationary solutions can be found by solving for the equation .
We can get a qualitative (behavioural) understanding of the solutions of these sort of equations by drawing the so-called direction fields.
Definition 6.3 A direction field on a region of the Cartesian plane is a map which assigns to each point of the region a line passing through that point. A curve in the Cartesian plane is an integral curve of a direction field if its tangent lines coincide exactly with the lines of the direction field along the curve.
The lines of a direction field can be thought of as tangents to hypothetical curves. The idea of a tangent is closely bound up with the idea of slope (a.k.a. derivative). So instead of thinking of the lines in a direction field, we can think of the slope of the lines. (We allow infinite slope here.) And slope is given by a number.
So on the -plane, we can identify a direction field with a function . And the idea of slope leads us to the equation .
Hence, the integral curves for the direction field correspond exactly to the solutions to this differential equation.Example 6.3 Sketch the direction field for the equation .

6.2.1 Test yourself
6.2.1.1 Equations of the form and
6.2.1.2 Equations of the form
6.3 Linear first order equations
The main idea behind solving these equations is to rearrange the equation into and to try to turn the left hand side into the derivative of a product.
Recall that Multiply (6.3) by (we use because this is going to be called the integrating factor) and then try to make it look like the equation above. Multiplying by gives We want For this to be true we need This is a separable equation: which we solve to give so that
is called the integrating factor for the differential equation
Thus we have the following theorem:
Example 6.4 Let us try this out with Example 6.2. The equation we had was
We rearrange the last equation to get it into our standard form which is a linear differential equation for . The function and . Hence Then If we integrate both sides we have where is a constant of integration. The general solution (multiple both sides by ) is We now use the initial condition that when to give in other words Dividing both sides by we get which is the same result as before.
Example 6.5 Solve the differential equation where .
In this case the integrating factor is So Hence where is a constant of integration. Thus we have a general solution We now use the boundary condition to find a particular solution, giving .
You can find more examples of linear first order differential equations at math24.net.
6.3.1 Test yourself
6.4 Homogeneous equations
In this case we put so that . Then Hence we have a separable equation We can solve this if we can integrate the left hand side.
Example 6.6 Find the general solution of the differential equation
If we divide top and bottom by on the right hand side we get In this case the function . If we make the change of variable , we have Rearranging this we get Hence so that where . Therefore where is an arbitrary positive constant of integration. In order for this to make sense we require that, so that . However , so that is the general solution of the differential equation. We will choose a solution branch depending on where the initial condition is. For instance, for positive then we have to choose the positive square root. But if for positive we have to choose the negative square root. In the picture below we plot solutions where (blue) and (red).
You can find more examples of homogeneous equations and their solutions at Math24.net
6.5 Second order linear differential equations with constant coefficients
The most well-known example of a second order equation with constant coefficients is the harmonic oscillator. In this equation we use Newtons’ second law, but use the fact that the velocity is the rate of change of the position of an object. So we have for acceleration , velocity and displacement , the following relationships and

Hooke’s Law for modelling the motion of a spring
For a spring we have Hooke’s Law which says that if we extend a spring by an amount from its natural resting position, then the force of resistance to extension of the spring is , where is a constant called the stiffness of the spring.
Thus, if we have a mass on a spring then the downward force will be and the upward force due to the tension in the spring when extended distance will be . If then we will have no net force acting and the mass can be stationary. If we extend the spring by a further small distance and let it go then it will move upwards due to the excess tension in the spring over the weight. The equation of motion is Since we get the equation Substituting we obtain the equation This is a famous differential equation called the equation of simple harmonic motion. This is an example of a second order linear differential equation with constant coefficients. Here is an explanation from a man with an American accent.
We solve equations like these by using the property of the exponential function that we discovered earlier - that these are eigenfunctions of the differentiation operator. We try a solution of the type for some . Let us substitute this into our differential equation and see what happens.
Now and Substituting this into (6.5) we get Cancelling , we obtain The solution of this equation is Therefore the solution of the differential equation is for arbitrary constant (to be determined by initial conditions). Using the equations we can rewrite this as So we see we have two different solution and , and the constants and depend on the boundary conditions.
More generally we may have a second order differential equation of the following form It is easiest in the first instance if we assume . Such an equation is called a homogeneous differential equation. Then, if we follow the same strategy as above, trying a solution of the form , we change the differential equation to the algebraic equation This equation is called the auxiliary equation.
The solution of the auxiliary equation can be in three different forms depending on the sign of the discriminant
Case 1: The easy case: . In this case the two roots of the auxiliary equation are real: and the general solution of the homogeneous equation is where and are arbitrary real constants, which can be determined from boundary conditions.
Example 6.7 Find the general solution of the linear second order differential equation
The auxiliary equation is which has solutions and . Hence the general solution to this differential equation is Suppose that and . Then and We can solve these simultaneous equations to get and , so that
Case 2: . In this case we have two equal roots, . Then we have a general solution of the form You should check that this is true.
Case 3: . In this case the solutions of the auxiliary equation are complex: where and . The general solution is then Again you should check that this is true.
6.5.1 Test yourself
6.6 Challenge Yourself
- Explore the solution of the Bernoulli equation , for .
- In this question you are going to approximately solve the differential equation , , using the limit definition of differentiation. Let . Find the approximate value of using the approximation where the second equation follows from the differential equation . Compare the approximate answer to the actual answer by analytically solving the differential equation. Now find approximate values at for . What happens to the solution as .
- Can you find an approximation to at a point by using , and . Suppose you know and . If you have a second order differential equation can you find and ?
- Do some research into second order differential equations with a non-zero right hand side: