Separable Differential Equations

In this section, we'd like to show you an application of the method of Change of Variables by introducing you to separable differential equations.

Last term in Math 100, we spent a bit of time studying differential equations. In case you've forgotten, we'll remind what a differential equation is and why they are so useful in mathematics. Then we'll show you how the Change of Variables techniques gives us a convenient way to solve many differential equations.

What is a differential equation?

Up to this point in your mathematical training, you have probably considered lots of algebraic equations like $  x^2 = 2  $ . Such an equation describes some unknown real numbers, and in fact we know how to explicitly describe these real numbers---namely, $ 
x = \pm \sqrt{2}  $ .

Instead of describing an unknown real number, a differential equation will describe an unknown function by giving us information about its derivative. Let's consider an example:

As a simple model for how populations grow, we could assume that the rate of growth of a population is proportional to the population itself. This seems to make good sense: if there are only a few people in our population, we expect that the rate of growth will be rather small. However, if there are 6 billion people in our population, we expect it to be much larger.

If we denote the population we are considering by $  y(t) 
 $ , then the rate of change of the population is $ 
\frac{dy}{dt}  $ . To say that the rate of change is proportional to the population is just saying that there is a constant of proportionality k such that

\[  \frac{dy}{dt} = ky  \]

This is a good example of a differential equation: it describes some function $  y(t)  $ which we do not know by giving us information about its derivative.

As we will see, differential equations generally have many solutions. However, they are all distinguished by their initial values. For instance, if we know the population at time t = 0, the differential equation will tell us how the population changes from that point on. We can then expect to find a unique solution to the equation with that initial value. Let's see how this works in an example.

Using the Change of Variables formula

Let's solve the initial value problem

\frac{dy}{dt} & = & ky \\ 
y(0) & = & y_0 

Here we are given a differential equation and an initial value (we usually call these two pieces of information an initial value problem ). To solve it, we would like to find a function $  y(t) 
 $ which satisfies both of these conditions.

The trick is to put everything involving y over onto one side of the equation. To that end, we will divide by y to obtain

\frac 1y \frac{dy}{dt} = k 

Now we will integrate both sides with respect to t over the interval $  [0,T] $ . Notice how the Change of Variables formula is used below.

\int_0^T \frac 1y \frac{dy}{dt}~dt & = & \int_0^T k ~dt \\ \\ 
\int_{y_0}^{y(T)} \frac 1y ~dy & = & kT \\ \\ 
\ln |y|~|_{y_0}^{y(T)} & = & kT \\ \\ 
\ln | \frac{y(T)}{y_0} | & = & kT \\ \\ 
\frac{y(T)}{y_0} & = & e^{kT} \\ \\ 
y(T) & = & y_0 e^{kT} 

So we arrive at the solution $  y(t) = y_0e^{kt}  $ . One can easily check that this does indeed satisfy the two conditions that we originally asked for.

Notice that the solution depends on the initial value $  y_0 
 $ and that there is precisely one solution for each initial value. The following demonstration shows how the solution changes as you vary the initial value.

The skydiver equation

Now we will consider another example. When a person jumps out of an airplane, they will certainly feel the effects of gravity and so will be accelerated downwards. However, they will also feel wind resistance which tends to slow them down the faster they fall. Eventually, we expect that a skydiver will reach some constant velocity. If $  v(t)  $ represents the vertical velocity, a good model for this situation is

\frac{dv}{dt} = g - kv 

Here, g is constant describing acceleration due to gravity and k is a positive constant. Notice that when the velocity v is zero, then the acceleration $  \frac{dv}{dt} = g  $ . However, as the velocity increases, the acceleration will decrease. One velocity is particularly interesting: if $  v = \frac gk  $ , then the acceleration is zero and the skydiver will continue at this speed without acceleration.

Let's consider the solutions of this equation using our technique of Change of Variables. We will solve the initial value problem

\frac{dv}{dt} & = & g - kv \\ 
v(0) & = & v_0 

Again, we will put everything involving the dependent variable v on one side, integrate both sides over the time interval $  [0,T] $ and apply the Change of Variables formula.

\frac{1}{g-kv}\frac{dv}{dt} & = & 1 \\ \\ 
\int_0^T \frac{1}{g-kv}\frac{dv}{dt}~dt & = & \int_0^T~dt \\ \\ 
\int_{v_0}^{v(T)} \frac{1}{g-kv}~dv & = & T \\ \\ 
-\frac 1k \ln|g-kv| ~|_{v_0}^{v(T)} & = & T \\ \\ 
\ln|\frac{g-kv(T)}{g-kv_0}| & = & -kT \\ \\ 
\frac{g-kv(T)}{g-kv_0} & = & e^{-kT} 

If we now rearrange this expression algebraically, we can solve for

v(t) = \frac gk - (\frac gk - v_0)e^{-kt} 

This is a pretty interesting expression. First of all, notice that as t becomes very large, the exponential becomes insignificantly small. This means that eventually, $  v(t) 
\approx \frac gk  $ when t is very large. This corresponds with our intuition: we said earlier that we expected the velocity of the skydiver to reach some constant value and we have verified this mathematically. For this reason, we call the quantity $  \frac gk  $ the terminal velocity and we will denote it by $  v_\infty = \frac gk  $ .

Now our solution says that

v(t) = v_\infty - (v_\infty - v_0)e^{-kt} 

In other words, what is decaying exponentially is the difference between the terminal velocity and the initial velocity.

In the demonstration below, you can again vary the initial value and see how the solution changes. Notice that every solution will eventually settle down around the terminal velocity $  v_\infty = 
\frac gk  $ which is represented by the horizontal red line on the graph.

Notice also we see one solution which is constant---namely, the one where the initial velocity is the terminal velocity. Also, solutions still make sense if the initial velocity is larger than the terminal velocity. Can you think of a situation where this might be the case? Perhaps a spacecraft returning to Earth's atmosphere.

Separable Differential Equations

So far, we've seen two examples of differential equations which could be solved by our Change of Variables formula. This is in fact a more general phenomenon: we call a differential equation separable if it can be written in the form:

\[  \frac{dy}{dx} = f(x) g(y) 

where $  f(x)  $ and $  g(y)  $ are just some functions. This kind of equation can always be solved by the method we have demonstrated on this page:

\frac{dy}{dx} & = & f(x) g(y) \\ \\ 
\frac {1}{g(y)}\frac{dy}{dx} & = & f(x) \\ \\ 
\int \frac{1}{g(y)} ~dy & = & \int f(x)~dx 

Orthogonal Trajectories

Here is one more example. Sometimes we are presented with a family of curves in the plane and we would like to know the trajectory of a point which is always moving orthogonally to the curves.

For example, if you look at a topographical map, you will see a lot of curves each of which pass through points of the same elevation. If you imagine a river on this landscape, it will try to flow downhill along the steepest possible path. It does this by always flowing orthogonally to the curves of constant elevation.

The following demonstration shows you a family of curves---namely, circles centered at the origin---which you may think of as curves of constant elevation on a topographical map. As you drag the point around in the plane, you will also see the circle passing through that point together with a curve passing through that point which is orthogonal to every circle is passes through. You may think of this curve as the path taken by a river flowing through that point.

In the same way, you may be familiar with electric potentials from your physics class. Remember that the electric force always acts orthogonally to the lines of constant potential. Consequently, you may wish to find a curve which is always orthogonal to the lines of constant potential (these lines are called equipotentials ).

Before we begin, let's remember a simple fact: if two lines are orthogonal, then the slope of one line is the negative reciprocal of the other. That is, if $  m_1  $ and $  m_2  $ are the slopes of the two lines, then $  m_1 m_2 = -1  $ .

Let's start with a simple example: consider the family of all concentric circles centered at the origin. This forms a family of curves and we will find the paths which are always orthogonal to this family of curves. It should be no surprise to you that a straight radial line from the origin has this property. You can see this in the demonstration above.

Any circle which is centered at the origin can be expressed as

x^2 + y^2 = k^2 

Suppose we are sitting at the point $  (x,y)  $ . We would like to find the curve which passes through this point and which is orthogonal to the circle. To find the slope of this curve, let's first find the slope of the circle at this point. Then the slope of the curve we want will be given by the negative reciprocal.

We can find the slope of the circle by implicitly differentiating the defining relationship:

x^2 + y^2 & = & k^2 \\ \\ 
2x + 2y\frac{dy}{dx} & = & 0 \\ \\ 
\frac{dy}{dx} & = & -\frac xy 

Now the curve passing through this point which is orthogonal will have slope equal to

\[  \frac{dy}{dx} = -1/(-\frac xy) = \frac yx 

This gives us a separable differential equation which we can solve.

\frac{dy}{dx} & = & \frac yx \\ \\ 
\int \frac 1y \frac{dy}{dx}~dx & = & \int \frac 1x~dx \\ \\ 
\int \frac 1y~dy & = & \frac 1x ~dx \\ \\ 
\ln |y| & = & \ln |x| + C \\ \\ 
\ln |\frac yx| & = & C \\ \\ 
\frac yx & = & m \\ \\ 
y & = & mx 

Our intuition is verified: the curves which are everywhere orthogonal to the family of circles centered at the origin are just the radial lines through the origin.

Now we will consider another example. Instead of looking at circles centered at the origin, we will consider ellipses centered at the origin. In particular, the family of ellipses we will consider are defined by

\frac{x^2}{a} + y^2 = k^2 

where a is some positive constant. In the demonstration below, you can see this family of curves and the curves which are orthogonal to all of them.

We can find these curves again using a separable differential equation. Let's find the slope of the ellipse passing through the point $  (x,y)  $ by implicit differentiation.

\frac{x^2} {a} + y^2 & = & k^2 \\ \\ 
\frac{2x}{a} + 2y\frac{dy}{dx} & = & 0 \\ \\ 
\frac{dy}{dx} & = & -\frac{x}{ay} 

Now the curve passing through this point which is orthogonal to the ellipse will have a slope which is the negative reciprocal of the slope of the ellipse. This means

\frac{dy}{dx} & = & \frac{ay}{x} \\ \\ 
\int \frac 1y \frac{dy}{dx} ~dx & = & a\int \frac 1x ~dx \\ \\ 
\int \frac 1y ~dy & = & a \int \frac 1x~dx \\ \\ 
\ln |y| & = & a\ln|x| + C \\ \\ 
\ln |y| & = & \ln |x^a| + C \\ \\ 
y & = & Kx^a 

where K is some constant. Here we see that the curves which are orthogonal have the form $  y = Kx^a  $ . The demonstration above shows that case where $  a = 2  $ . You can see that the orthogonal curves in this case are parabolas.