A lot of processes in the real world depend on the rate of their change. Let's take, for example, a group of rabbits on a desert island. If there is enough food, the rabbits will start to breed, and the more rabbits there are, the faster new ones will appear! Another example is a parachutist. After jumping out of the plane, they quickly gain speed and go down to the ground. However, the faster they move, the more air resistance slows them down, forming a complex feedback loop.
To describe such processes mathematically, ordinary differential equations (ODEs) were invented. An ODE is an equation that links a function we are interested in with its own derivatives. This definition may seem frightening, but, in fact, differential equations are not that much different from the conventional ones.
The concept of a differential equation
Let us remember what it means to solve a simple equation, for example, such as . It means to find the set of all numbers that turn it into a true equality. Obviously, in our case, this set consists of a single element .
A differential equation is arranged in a similar way. The only difference is that what you need to find is not a set of numbers but a set of functions that satisfy the equation.
An ODE generally contains:
1) an independent variable ;
2) a dependent variable (this is the function we are looking for);
3) derivatives of the function sought: , etc.
Order of a differential equation is the order of the highest derivative present in it. In this introductory topic, we will limit ourselves to the first order ODEs, which means that we will not encounter any derivatives of orders greater than one.
Solution of an ODE
Let's have a look at the solutions of an example equation:
What function is equal to its own derivative? Of course, it's the exponential one! So let's look for the solutions which have the form
To make sure our guess is correct, let's take a derivative:
So, the function we guessed really satisfies our differential equation. Note that it is defined with precision up to an arbitrary multiplier C, which can take any value. In other words, there is no single solution to our ODE – all of the functions below are right answers:
This is the hallmark of ODEs, which distinguishes them from conventional equations – the solution is defined with precision up to an arbitrary constant. The solution to an n-th order equation has n arbitrary constants – our equation is of the first order, so we have only one constant.
How to solve an ODE?
We have solved the above equation "intuitively", just by guessing the right function. Now let's learn how to solve an arbitrary ODE. We will consider the following equation:
First, let's rewrite the derivative in the differential form and substitute it into our ODE:
This form of derivative turns out extremely helpful when solving differential equations. We will actively use differentials in our further calculations. Now, let's use a technique called the method of separation of variables. We will reorganize our equation so that each half will contain a single variable ( or ):
The next step is to take the indefinite integral of each part of our equation:
Now, let's perform the integration (it's not too complicated here):
Having two arbitrary constants and is not convenient. Instead, we will set a new constant :
Next, we convert this equation to get an explicit answer for :
Having replaced a strictly positive by a constant with an arbitrary sign , we can remove the absolute value symbol. In practice, we usually simply write the same instead of , keeping in mind that both are just names for some constant.
So, our solution is
\(y = Ce^{-x^2/2}; \\C = const \tag {1}\)
Great! Let's do a check (it's not a mandatory step, but it's very useful at the first stages of learning ODEs). Remember that our is a complex function of .
Cool! We have found a family of functions that satisfy our equation.
Using initial conditions
Sometimes we need to know not just the family of solutions but a specific function. In this case, we need to select a single solution using initial conditions.
Initial conditions contain additional information that we use to single out one curve among many possible answers. For example, imagine we want to get a solution of the above equation such that :
We may use this extra information to find the exact value of our constant by substituting into our solution:
So, our solution finally becomes
\(y(x) = 2e^{-x^2/2} \tag {2}\)
The following plot visualizes curves for different initial conditions:
The solution (1) is called the general solution of an ODE, while (2) is called a particular solution. As you can see, the general solution may produce an infinite number of particular ones, depending on the set initial conditions.
Conclusion
In this topic, we have learned the concept of a differential equation. ODE is an equations that connects a function with its derivatives, and it is a powerful tool to describe complex real-world processes. Each ODE has a general solution, which contains some arbitrarily chosen constants, and an infinite number of particular solutions, which satisfy certain initial conditions.