Alexander Fufaev
My name is Alexander FufaeV and here I write about:

Differential Equations: All the Basics Everyone Should Know

Table of contents
  1. What is a differential equation? Here you will learn how to identify a differential equation and which problems involve DEQ's.
  2. Different notations of a differential equation Here you will learn the Leibniz, Newton and Lagrange notations of a differential equation.
  3. What should I do with a differential equation? Here you will learn what it means to solve a DEQ and whether it is always possible.
  4. How to identify a differential equation? What characterizes a DEQ and how do I know if I have a DEQ in front of me? This is the first question you have to answer before solving a DEQ!
  5. Classification: Which DEQ types are there? Here you will learn how to recognize when a DEQ is ordinary, partial, linear, homogeneous, inhomogeneous, and of what order it is.
  6. Constraints: Boundary and initial conditions Here you will learn why constraints to a DEQ are important and what the difference is between boundary and initial conditions.

For example, if you plan to deal with...

  • the atomic world,

  • the movement of the planets,

  • chemical processes,

  • electrical circuits,

  • weather forecasts

  • or with the spread of a virus

then you will eventually encounter differential equations.

Once you understand how differential equations work and how to solve them, you will be able to see into the past and into the future. In this lesson you will learn the basics for it.

What is a differential equation?

Hooke Law: Displacement of the spring and restoring force Hover the image!
A mass on the spring experiences a restoring force when the spring is displaced.

Let's look at Hooke's Law as a simple example:

This law describes the restoring force \(F\) on a mass attached to a spring. The mass experiences this force when you displace it by the distance \(y\) from the equilibrium position. \(D\) is a constant coefficient that describes how hard it is to stretch or compress the spring.

The mass \(m\) is hidden in the force. We can write the force according to Newton's second law as \(m \, a \):

Here \(a\) is the acceleration that the mass experiences when it is displaced by the distance \(y\) from its rest position. As soon as you pull on the mass and release it, the spring will start swinging back and forth. Without friction, as in this case, it will never stop swinging.

While the mass oscillates, the displacement \(y\) changes. The displacement is therefore dependent on the time \(t\). Thus also the acceleration \(a\) depends on the time \(t\). The mass of course remains the same at any time, no matter how much the spring is displaced. This is also true in good approximation for the spring constant \(D\):

If we now bring \(m\) to the other side, we can use this equation to calculate the acceleration experienced by the mass at each displacement \(y\):

But what if we are interested in the question:

At which displacement \(y\) will the spring be after 24 seconds?

To be able to answer such a future question, we must know how exactly \(y\) depends on the time \(t\). We only know that \(y\) DOES depend on time, but not HOW.

And exactly when dealing with such future questions differential equations come into play. We can easily show that the acceleration \(a\) is the second time derivative of the distance traveled, so in our case it is the second derivative of \(y\) with respect to time \(t\):

Now we have set up a differential equation for the displacement \(y\)! You can recognize a differential equation (in short: DEQ) by the fact that in addition to the unknown function \(y(t)\) it also contains derivatives of this function. Like in this case the second derivative of \(y\) with respect to time \(t\).

What is a differential equation?

A differential equation is an equation containing a searched function \(y\) and derivatives of this function.

Different notations of a differential equation

You will certainly encounter many notations of a differential equation. We have written down our differential equation 1.4 in the commonly called Leibniz notation:

You will often encounter this notation in physics. We can also write it down a bit more compactly without mentioning the time dependence:

If the function \(y\) depends only on the time \(t\), then we can write down the time derivative even more compactly with the Newton notation. One time derivative of \(y\) corresponds to one point above \(y\). So if there is a second time derivative as in our case, there will be two points:

Obviously, this notation is rather unsuitable if you want to consider the tenth derivative...

Another notation you are more likely to encounter in mathematics is the Lagrange notation. Here we use primes for the derivatives. So for the second derivative, two primes:

In Lagrange notation, it should be clear from the context, with respect to which variable the function is differentiated. If it is not clear, then you should write out explicitly on which variables \(y\) depends:

Each notation has its advantages and disadvantages. However, remember that these are just different ways of writing down the same physics. Even rearranging and renaming does not change the physics under the hood of this differential equation. We could call the deflection \(y\) for example also as \(x\):

What should I do with a differential equation?

To answer our previous question:

At which displacement \(y\) will the spring be after 24 seconds?

we must solve the posed differential equation. Solving a differential equation means that you have to find out how the function \(y\) you are looking for exactly depends on the variable \(t\):

For simple differential equations, like the one of the oscillating mass, there are solving methods you can use to find the function \(y(t)\). Keep in mind, however, that there is no general recipe for how you can solve an arbitrary differential equation. For some differential equations there is not even an analytic solution! Here the expression 'not analytic' means that you cannot write down a concrete equation for the function \(y(t)\):

The only possibility in this case is to solve the differential equation on the computer numerically. Then the computer does not spit out a concrete formula, but data points, which you can represent in a diagram and then analyze the behavior of the differential equation.

How to identify a differential equation?

Once you encounter a differential equation, the first thing you need to figure out is

  • which one is the function you are looking for

  • and which variables it depends on.

In our differential equation 5 of the oscillating mass, the function we are looking for is called \(y\) and it depends on the variable \(t\):

As another example, look at the wave equation that describes the electric field of an electromagnetic wave propagating at the speed of light \(c\):

What is the function you are looking for in this differential equation? It is the function \(E\), because its derivatives occur here. On which variables does the function \(E\) depend? The dependence is not explicitly given here but from the derivatives you can immediately see that \(E\) must depend on \(x\), \(y\), \(z\) and on \(t\). That is, on a total of four variables: \(E(t,x,y,z)\).

Let's look at a slightly more complex example. This system of differential equations describes how a mass moves in a three dimensional gravitational field:

Here you have a coupled differential equation system. In this case a single differential equation is not sufficient to describe the motion of a mass in the gravitational field. In fact, three functions are unknown here, namely the trajectories \(x(t)\), \(y(t)\) and \(z(t)\), which determine a position of the mass in three-dimensional space. Each function describes the motion in one of the three spatial directions. And all three trajectories depend only on the time \(t\).

What does it even mean, if we have coupled differential equations? The word 'coupled' means that, for example, in the first differential equation for the function \(x\), there is also the function \(y\). So we cannot simply solve the first differential equation independently of the second one, because the second equation tells us how \(y\) behaves in the first equation. In all three differential equations, all of the unknown functions \(x\), \(y\) and \(z\) occur, which means that we have to solve all three differential equations simultaneously.

Classification: Which DEQ types are there?

There are various types of differential equations out there. However, if you look closely, you will notice that some differential equations have similarities between them.

Differential equations - different types
Different types of differential equations.

After you have found out what function you are searching for and which variables it depends on, you should answer some more basic questions to get to know the differential equation better:

  • Is the differential equation ordinary or partial?
    Partial differential equations describe multidimensional problems and are significantly more complex.

  • Of which order is the differential equation?
    1st order differential equations are usually easy to solve and describe, for example, exponential behavior such as radioactive decay or the cooling of a liquid. Differential equations of 2nd order, on the other hand, are somewhat more complex and also often occur in nature. Maxwell's equations of electrodynamics, Schrödinger's equation of quantum mechanics - these are all 2nd order differential equations. Only starting from the 2nd order a differential equation can describe an oscillation. And only starting from the third order a differential equation can describe chaos.

  • Is the differential equation linear or non-linear?
    The superposition principle applies to linear differential equations, which is incredibly useful, for example, in the description of electromagnetic phenomena. Non-linear differential equations are much more complex and occur, for example, in non-linear electronics in the description of superconducting currents. Moreover, chaos can only occur in non-linear differential equations of third order and higher. When you encounter such an equation sometimes the only thing you can do is throw away your pen and paper and solve the equation numerically on the computer. Many non-linear differential equations cannot even be solved analytically!

  • Is the linear differential equation homogeneous or inhomogeneous?
    Homogeneous linear differential equations are simpler than the inhomogeneous ones and describe, for example, an undisturbed oscillation, while inhomogeneous differential equations are also able to describe externally disturbed oscillations.

After you have classified a differential equation, you can then specifically apply an appropriate method to solve the equation. Even if there is no specific solving method, you will know how complex a differential equation is based on the classification.

Is a differential equation ordinary or partial?

Our equation for the oscillating mass:

is an ordinary differential equation. Ordinary means that the function \(y(t)\) we are looking for only depends on one variable. In this case on the time \(t\).

What is an ordinary differential equation?

In this type of differential equation, the function you are looking for depends on a single variable.

The wave equation, on the other hand:

is a partial differential equation. 'Partial' means that the searched function \(E\) depends on at least two variables and derivatives with respect to these variables occur in the equation. In this case \(E\) depends on four variables: \(t\), \(x\), \(y\) and \(z\). And in the differential equation also derivatives with respect to these variables appear.

What is a partial differential equation?

In this type of differential equation the searched function depends on at least two variables and derivatives of the function with respect to at least two of these variables occur.

Of which order is a differential equation?

Furthermore our equation for the oscillating mass is a differential equation of 2nd order. The order of a differential equation is the highest occurring derivative of the searched function:

Since in our equation the second derivative of \(y\) is the highest one, this is therefore the 2nd order differential equation.

Convert higher order DEQ's into 1st order DEQ's
It is always possible to convert a higher order differential equation into a system of 1st order differential equations. Sometimes this procedure is helpful in solving the differential equations. For example, we can convert this 2nd order differential equation into two coupled 1st order differential equations. For this we just have to introduce a new function, let's call it \(v\) and define it as the first time derivative of \(y\):

This is already one of the two 1st order DEQ. Now we only have to express the second derivative in the original DEQ with the derivative of \(v\). Then we get the second DEQ of 1st order:

The two equations are coupled differential equations, which we must solve simultaneously. They are coupled because both \(y\) and \(v\) occur in the first DEQ as well as in the second DEQ. You can use this procedure whenever you want to reduce the order of a differential equation. The price you have to pay is additional coupled differential equations.

The differential equation for the radioactive decay law,

on the other hand, is a first-order differential equation because the highest occurring derivative of the searched function \(N(t)\) is the first derivative.

What is an nth order differential equation?

A differential equation is called of n-th order, if the n-th derivative is the highest that occurs in the DEQ.

Is a differential equation linear or non-linear?

Moreover, our equation for the oscillating mass is linear:

Linear means that the searched function and its derivatives contain only powers of 1 and there occur no products of derivatives with the function, like \(y^2\) or \(y \, \frac{\text{d}^2y}{\text{d}t^2} \). There also occur no composed functions, such as \(\sin(y(t))\) or square root of \(y(t)\).

do not confuse 'to the power of two'!

Note that 'to the power of two' in the second derivative in the Leibniz notation \( \frac{ \text{d}^2 y }{ \text{d}t^2} \) is not a power of the derivative, but merely a notation that it is the second derivative.

The radioactive decay law is also linear:

What about the wave equation? It is also linear:

What is a linear differential equation?

A differential equation is linear if the searched function and its derivatives appear only with the power 1 and there are no products of the searched function with its derivatives and also no compositions with the searched function.

The coupled differential equation system for the motion of a mass in the gravitational field, on the other hand, is non-linear:

Here the unknown functions \(x(t)\), \(y(t)\) and \(z(t)\) occur in quadratic form.

Is a linear differential equation homogeneous or inhomogeneous?

In the next types of differential equations the coefficients multiplied by the searched function and its derivatives are important. In some solving methods it is important to distinguish between...

  • constant coefficients - do NOT depend on the variables on which the searched function also depends.

  • non-constant coefficients - do DEPEND on the variables on which the searched function depends.

A coefficient must not necessarily be multiplied with the searched function or its derivative. It can also stand alone! In this case we call the single coefficient a perturbation function.

In our differential equation for the oscillating mass there is an interesting coefficient which is multiplied by the searched function \(y\), namely \(D/m\). Strictly speaking, there is also a coefficient in front of the second derivative, namely 1, and the single coefficient, i.e. the perturbation function, is 0 here. So it does not exist:

What is a homogeneous linear differential equation?

If the perturbation function is zero, then we call the linear differential equation homogeneous.

The wave equation is also homogeneous:

Because here there is also no single coefficient, the perturbation function is zero.

The differential equation for a forced oscillation, on the other hand, is inhomogeneous:

Here the external force \(F(t)\) corresponds to the perturbation function. As you can see, it stands alone without being multiplied by the function \(y(t)\) or its derivatives. Moreover, the perturbation function \(F(t)\) is time dependent, so it is a non-constant coefficient.

Constraints: Boundary and initial conditions

A differential equation alone, is not sufficient to describe a physical system uniquely. The solution of a differential equation describes quite a few possible systems that have a certain behavior. For example, the solution of the radioactive decay law describes an exponential behavior. However, the knowledge about an exponential behavior is not sufficient to be able to say concretely how many atomic nuclei have decayed after 10 seconds.

This is exactly why for every differential equation there are usually given constraints. These are additional information, which must be given to a differential equation, in order to specify the solution of the equation. The number of necessary constraints depends on the \textit{order} of the differential equation.

For a 1st order differential equation, a single constraint is necessary, namely

  • a function value of the unknown function \(y(t)\).

For the radioactive decay law, for example, it should be stated how many not yet decayed atomic nuclei \(N\) were present at the time \(t = 0 \). For example one 1000 atomic nuclei: \(N(0) = 1000 \).

For a 2nd order differential equation two constraints are necessary:

  • a function value of the unknown function \(y(t)\) and

  • for example a function value of the first derivative \(y'(t)\)

For an oscillating mass, the function value could be \( y(0) = 1\), which sets the initial displacement, and the function value of the first derivative could be \(y'(0) = 0\), which sets the initial velocity of the mass.

For a 3rd order differential equation then three constraints would be necessary to describe a system uniquely:

  • a function value of the unknown function \(y(t)\)

  • a function value for example of its first derivative \(y'(t)\) and

  • a function value for example of its second derivative \(y''(t)\)

For a 4th order differential equation then four constraints would be necessary and so on...

How can 'a typical' DEQ be uniquely defined?

In order to uniquely define the solution of an \(n\)-th order differential equation, at least \(n\) constraints are necessary.

Most of the time you will come across initial conditions and boundary conditions. These are also just names for constraints that tell you what kind of information you have about the system.

Difference between initial and boundary conditions
Difference between boundary conditions and initial conditions.

Sometimes, for example, you know in which state the system was at a certain time. This could be the initial time at which you displaced and released a mass on a spring. In such a case we speak of initial conditions. You specify at one certain point in time, for example at time \(t=0\), wich value the displacement \(y(0)\) had. And since we need two constraints, you also specify which value the derivative \(y'(0)\) (that is the velocity) had at that same point in time \(t = 0\).

What is an initial value problem?

We call a differential equation together with initial conditions an initial value problem. If we solve the initial value problem, we can use the solution to predict the future behavior of the system.

Sometimes you are unlucky and do not know the velocity of the oscillating mass at a certain initial time \(t = 0\). So you don't know the derivative of \(y'(0)\) at the time \(t = 0\), at which you also know the displacement \(y(0\). But you really need two constraints, otherwise you can't calculate concrete numbers... But maybe you know that for example after \( t = 6 \, \text{s}\) the oscillating mass was in the maximum displaced state. So you know the displacement \(y(6)\).

If you have constraints, such as \(y(t_1)\) and \(y(t_2)\), given to describe the system at two \textit{different} points in time \(t_1\) and \(t_2\), then we call them boundary conditions.

What is a boundary value problem?

We call a differential equation together with two or more boundary conditions a boundary conditions. If we solve the boundary value problem, we can use the solution to predict how the system behaves within these boundaries.

The 'function values at two different points in time' was of course just an example. Instead of time, it could be any variable that fixes the system at the boundaries. At different times, at different positions, at different angles and so on.

So, now you have learned all the necessary basics about differential equations. In the next lesson, we will take a look at how we can solve differential equations using different methods.