Basics of differential equations

A differential equation is an equation that involves derivatives or differentials. You can find them almost everywhere in science and engineering since many scientific principles are naturally formulated as differential equations. In this lecture, we will study the most basic concepts and techniques in differential equations.

Tianran Chen

Department of Mathematics
Auburn University at Montgomery

What is a differential equation?

A differential equation is an equation that involves derivatives or differentials.

You can find them almost everywhere in science and engineering. E.g., Newton's law of motion is stated as \[ F = \frac{d}{dt} \left( m \frac{dy}{dt} \right). \]

Simple harmonic motion (e.g. metronomes) is described by \[ \frac{d^2}{dt^2} y = -\frac{k}{m} y. \]

These are very simple examples. The differential equations we encounter in applications tend to be much more complicated. The idea of differential equation is an integral part of science and engineering, as many "laws" and "principles" are stated in terms of differential equations.

Solving a differential equation

To solve a differential equation means to find such a function that satisfies the equation. This, it turns out is not always possible. Only the simplest differential equations admit solutions that can be written down explicitly. Of course, some differential equations have no solutions at all.

Problem. Can we find a function $y$ of $x$ such that \[ \frac{dy}{dx} = 7 \, ? \] That is, do you know a function $y(x)$ whose derivative is 7?

Problem. Can we find a function $y$ of $x$ such that \[ \frac{dy}{dx} = x \,? \]

The first class of differential equations

One of the simplest class of differential equations are those of the form \[ y' = f(x) \] (or any form that can be rearrange into this form) where the right hand side does not involve $y$.

It is easy to see that \[ y(x) = \int f(x) dx \] will be our answer, as long as the integral on the right hand side is defined. This is how antiderivative works.

A "differential" point of view

Alternatively, we can look at the same procedure from a different viewpoint.

From \[ \frac{dy}{dx} = f(x), \] we can integrate both sides with respect to $x$, and get \begin{align*} \int \frac{dy}{dx} dx = \int f(x) dx \quad &\Rightarrow \quad \int dy = \int f(x) dx \\ &\Rightarrow \quad y = \int f(x) dx. \end{align*}

Keep in mind that the expression $\int f(x) dx$ does not represent a single function. It is a whole family of functions.

Problem. In the above derivation, do you know why we can turn $\frac{dy}{dx} dx$ into $dy$ ? (Hint: it's not not cancellation)

The general result

If $f(x)$ is integrable over an interval, then the solutions to the differential equation \[ y' = f(x) \] are of the form \[ y(x) = \int f(x) dx \] over that interval.

Again, it is important to understand that the indefinite integral on the right hand side represents a whole family of equally good solutions.

In practice, we also have to be careful with the domain and range of the solutions as the original equation or context may imply further restriction of the domain and range.

The second class of differential equations

Can we find a function $y$ of $x$ such that \[ \frac{dy}{dx} = y \, ? \]

Just by guessing, it is not hard to see there are at least two solutions: The constant function $y = 0$ and the exponential function $y = e^x$.

Indeed, $y = Ce^x$ would be a solution for any real number $C$ (including 0). This is a example "separable differential equations".

Can we find a function $y$ of $x$ such that \[ \frac{dy}{dx} = 2xy \, ? \]

Separable differential equations

Definition. A differential equation in $y(x)$ is separable if it is of the form \[ \frac{dy}{dx} = A(y) B(x) \] where $A(y)$ does not involve $x$ and $B(x)$ does not involve $y$.

Under the assumption that $A(y) \ne 0$, it can be turned into \[ \frac{1}{A(y)} \frac{dy}{dx} = B(x). \]

Integrating both sides with respect to $x$, we get \begin{align*} \int \frac{1}{A(y)} \frac{dy}{dx} dt &= \int B(x) dx & &\text{i.e.,} & \int \frac{1}{A(y)} dy &= \int B(x) dx. \end{align*} If we can compute both integrals, we will have an equation in $y$ without derivatives. Then, by solving the resulting equation, we can obtain the explicit solution $y$.

Example. Find the general solution to the differential equation $ \frac{dy}{dx} = y^2. $

Solution. First, we can easily verify that $y(t) = 0$ is a solution. Now we will search for non-zero (never zero) solutions.

Note that this equation is separable as we can write it as \[ \frac{dy}{dx} = y^2 \cdot 1. \]

Since we already imposed the restriction $y(x) \ne 0$, we can rearrange it into

$\displaystyle \frac{1}{y^2} \frac{dy}{dx} = 1$ i.e., $\displaystyle \int \frac{1}{y^2} \frac{dy}{dx} dt = \int 1 dx$ i.e., $\displaystyle \int \frac{1}{y^2} dy = \int 1 dx$

Integrating the two sides separately, we get

$\displaystyle \int \frac{1}{y^2} dy = -\frac{1}{y},$ and $\displaystyle \int 1 \, dx = x + C.$

Here, we only need a single "$+C$" since such constants will appear on both sides of the equation and can be combined into one.

Therefore, the equations turn into

$\displaystyle -\frac{1}{y} = x + C$ and thus $\displaystyle y = - \frac{1}{x+C}$.

Exercises problems

Problem. Solve the differential equation \[ \frac{dy}{dx} = \frac{x}{y}. \] using the same method.

Problem. Solve the differential equation \[ \frac{dy}{dx} = -4y^2 x . \]