Differential equations

Successive positions of a small yellow ball falling and bouncing, photographed against a black background.
Photo by MichaelMaggs; edited by Richard Bartz on Wikimedia Commons (CC BY-SA 3.0; displayed with a 3:2 crop).

A scientific law often tells us how a quantity changes before it tells us the quantity itself. A falling ball accelerates under gravity. Water accumulates in a tank when more flows in than flows out. Neither rule alone tells us the ball's height or the amount of water.

Differential equations express these laws as relationships involving rates of change. To turn a law into a prediction, we need to recover the unknown function and use measurements to determine its constants. The same law can describe motion from different starting heights or water flowing into tanks with different starting amounts. We can use measurements to work out which solution fits the situation.

By the end of this lesson, you should be able to:

  • Interpret a differential equation and verify a proposed solution.
  • Recover velocity and position from acceleration using antiderivatives and initial conditions.
  • Distinguish a family of solutions from a particular solution and identify the interval where a model applies.

In Chapter 1, we began with a formula for a basketball's height and used it to study the ball's motion. However, we seemingly pulled this formula out of thin air. Where did it come from? This time, we'll begin with the physical information and derive the height formula ourselves.

Suppose a ball is thrown straight upward from a height of \( 6\,\text{ft} \) with an initial velocity of \( 40\,\text{ft/s} \). Once it leaves the thrower's hands, assume gravity is the only force acting on it: we'll neglect air resistance and use a constant downward acceleration of \( 32\,\text{ft/s}^2 \) (feet per second per second). When does the ball reach its highest point, and how high does it go?

Let \( y(t) \) be height in feet, with \( t \) measured in seconds after release. Then \( y'(t) \) is vertical velocity in , and \( y''(t) \) is vertical acceleration in . A positive velocity means upward motion, while a negative velocity means downward motion. Gravity acts downward even while the ball is rising, so its acceleration has a negative sign. Hence the information becomes

\[y''(t)=-32,\qquad y'(0)=40,\qquad y(0)=6.\]

The equation \( y''(t)=-32 \) tells us how velocity changes, rather than giving velocity itself. Because this rate is constant, the change over any one-second interval is the same. Starting with the release velocity, we can follow the first second: each second, velocity changes by \( \text{ft/s} \). After \( 1\,\text{s} \), the velocity is \( \text{ft/s} \).

To find when the ball reaches its peak, we need velocity as a function of time. A function has a constant rate of change, and adding a constant leaves that derivative unchanged, so we can write the possible velocity functions as:

\[y'(t)=-32t+C_1.\]

At release, \( y'(0)=C_1 \). Since the ball starts with a velocity of \( 40\,\text{ft/s} \), we know \( C_1= \), so

\(\displaystyle y'(t)=\)\(\displaystyle .\)

At its highest point, the ball changes from rising to falling, so \( y'(t)=0 \). Solving \( 40-32t=0 \) gives \( t= \)\( \text{s} \).

The velocity crosses zero at \( 1.25\,\text{s} \). Positive velocity corresponds to rising; negative velocity corresponds to falling.

We know when the ball reaches its peak, but we still need its height at that time. To recover the height, we can antidifferentiate again, now looking for a function whose derivative is \( 40-32t \). Applying the Anti-Power Rule to each term gives

\(\displaystyle y(t)= \)\(\displaystyle {}+C_2.\)

Since the ball starts \( 6\,\text{ft} \) above the ground and \( y(0)=C_2 \), we know \( C_2= \). Thus the height function is

\(\displaystyle y(t)=\)\(\displaystyle .\)

The ball reaches its highest point after \( 1.25\,\text{s} \), at a height of \( \text{ft} \). On the height graph, this is where the slope changes from positive to negative, passing through a horizontal tangent at the top.

The ball reaches its maximum height of \( 31\,\text{ft} \) at \( 1.25\,\text{s} \), then falls. The graph ends at \( 2.5\,\text{s} \), when the ball is back at its release height and still above the ground.

We've recovered the Chapter 1 height formula from the equation \( y''=-32 \). An equation like this, involving an unknown function and its derivatives, is a differential equation. The extra requirements \( y(0)=6 \) and \( y'(0)=40 \) are initial conditions; together with \( y''=-32 \), they form an initial value problem. We used the starting velocity to find \( C_1 \) and the starting height to find \( C_2 \), hence reconstructing the motion of the ball.

Differential equations and solutions

Many scientific laws describe how a quantity changes. We may know an object's acceleration or how quickly water flows into and out of a tank, but still want to know where the object is or how much water the tank holds. To answer those questions, we need to find a function from information about its derivatives.

An algebraic equation often asks for a number that makes two expressions equal. A differential equation asks for a function whose values and derivatives satisfy the stated relationship at every input in an interval.

A differential equation can involve the unknown function itself as well as its derivative. To check a proposed solution, we evaluate both sides using that same function.

Initial value problems

When the derivative depends only on the input, we can solve the equation by antidifferentiating. For example, all the functions \( y(t)=t^3+C \) have derivative \( 3t^2 \). Changing \( C \) changes their values but leaves their rates of change identical. The differential equation therefore gives a family of possible functions.

To find which function fits our situation, we need more information. If we know a value of \( y \) at a particular input, we can substitute it to find \( C \). The rate rule and the measurement together form the problem we want to solve:

“Initial” identifies the input where information is given; it needn't be zero or the earliest input of interest. Once we have an antiderivative, we substitute the measured input and output into its formula to determine the constant. Changing that constant shifts the graph up or down until it passes through the measured point.

Position, velocity, and acceleration

Acceleration describes how velocity changes, while velocity describes how position changes. To recover position from acceleration, we therefore integrate twice. Each time, we introduce a constant, so we need both a starting position and a starting velocity to find the motion.

The order of a differential equation tells us which is the highest derivative that appears. An equation for velocity such as \( s'(t)=6-2t \) is first order; an equation for acceleration such as \( s''(t)=-2 \) is second order. For constant acceleration, those two integrations explain why we need two pieces of initial data.

Let \( s(t) \) be position and \( v(t)=s'(t) \) be velocity. Write \( s_0=s(0) \) for the starting position and \( v_0=v(0)=s'(0) \) for the starting velocity. If acceleration is the constant \( a \), then \( s''(t)=a \). Integrating once, we get

\[v(t)=at+C_1.\]

At \( t=0 \), we have \( v_0=C_1 \), so \( v(t)=v_0+at \). Integrating again, we get

\[s(t)=v_0t+\frac12at^2+C_2.\]

Since \( s(0)=s_0 \), we have \( C_2=s_0 \). We can now write both functions in terms of the starting values:

We can read the position formula in three parts: the object starts at \( s_0 \), moves by \( v_0t \) if it keeps its starting velocity, and moves an additional \( \displaystyle \frac12at^2 \) because it accelerates. When \( a=0 \), this last term is zero, so we have constant-velocity motion.

  1. For each proposed function, compare the two sides of \( \displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}=-\frac{${k}y}{x} \) on \( x>0 \).

    1. Consider \( \displaystyle y=${f_1} \).

      \( \displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}= \) and \( \displaystyle -\frac{${k}y}{x}= \).

      Is it a solution?

      Solution

      We differentiate the proposed function to find the left-hand side:

      \[\frac{\mathrm{d}y}{\mathrm{d}x}=${lhs_1}.\]

      For the right-hand side, we substitute the function for \( \displaystyle y \):

      \[\begin{aligned}-\frac{${k}y}{x}&=-\frac{${k}(${f_1})}{x},\\&=${rhs_1}.\end{aligned}\]

      The two sides ${comparison_1}, so the function ${conclusion_1} a solution on \( \displaystyle x>0 \).

    2. Consider \( \displaystyle y=${f_2} \).

      \( \displaystyle \frac{\mathrm{d}y}{\mathrm{d}x}= \) and \( \displaystyle -\frac{${k}y}{x}= \).

      Is it a solution?

      Solution

      We differentiate the proposed function to find the left-hand side:

      \[\frac{\mathrm{d}y}{\mathrm{d}x}=${lhs_2}.\]

      For the right-hand side, we substitute the function for \( \displaystyle y \):

      \[\begin{aligned}-\frac{${k}y}{x}&=-\frac{${k}(${f_2})}{x},\\&=${rhs_2}.\end{aligned}\]

      The two sides ${comparison_2}, so the function ${conclusion_2} a solution on \( \displaystyle x>0 \).

  2. Consider \( y'=${rate} \) with \( y(${t_0})=${value} \).

    1. The solution is \( y(t)= \).

      Solution

      We antidifferentiate \( \displaystyle ${rate} \) to get \( \displaystyle y=${a}t^2${signed(b)}t+C \). Since \( \displaystyle y(${t_0})=${value} \), we substitute \( \displaystyle t=${t_0} \) and solve for \( \displaystyle C \):

      \[\begin{aligned}${value}&=${base}+C,\\C&=${c}.\end{aligned}\]

      Thus \( \displaystyle y(t)=${f} \).

    2. For this function, \( y'(t)= \) and \( y(${t_0})= \).

      Solution

      Differentiating our function gives \( \displaystyle y'(t)=${rate} \), as required by the differential equation. At the given input, \( \displaystyle y(${t_0})=${base}${signed(c)} \), which is \( \displaystyle ${value} \), so the initial condition holds too.

  3. A cart has acceleration \( ${accel}\,\text{m/s}^2 \), initial velocity \( ${v_0}\,\text{m/s} \), and initial position \( ${s_0}\,\text{m} \).

    1. At \( t=${time}\,\text{s} \), its velocity is \( \text{m/s} \) and position is \( \text{m} \).

      Solution

      Using the constant-acceleration formulas, we get \( \displaystyle v(t)=${v} \) and \( \displaystyle s(t)=${position} \). At \( \displaystyle t=${time}\,\text{s} \), these give \( \displaystyle v(${time})=${velocity}\,\text{m/s} \) and \( \displaystyle s(${time})=${location}\,\text{m} \).

    2. When does it reverse direction, and why isn't it speeding up throughout the whole interval?

      Solution

      Setting \( \displaystyle v(t)=0 \), we find that the cart reverses at \( \displaystyle t=${r}\,\text{s} \). Before then, its velocity is negative and its acceleration is positive, so it slows down. Afterward, it moves in the positive direction and speeds up.

  4. Solve \( y''=${rate} \) with \( y'(0)=${v_0} \) and \( y(0)=${y_0} \).

    \( y(t)= \).

    Solution

    Integrating once, we get \( \displaystyle y'=${first_base}+C_1 \). Since \( \displaystyle y'(0)=${v_0} \), we have \( \displaystyle C_1=${v_0} \), so \( \displaystyle y'=${first} \).

    Integrating again, we get \( \displaystyle y=${position_base}+C_2 \). Using \( \displaystyle y(0)=${y_0} \), we find \( \displaystyle C_2=${y_0} \). Thus \( \displaystyle y(t)=${f} \).

  5. Let \( Q(t) \) be the volume of water in a tank, in liters, \( t \) minutes after filling begins. Before overflow, water flows in at a rate \( Q'(t)=${rate} \) liters per minute. The tank starts with \( ${q_0}\,\text{L} \) and has capacity \( ${capacity}\,\text{L} \).

    1. Before overflow, \( Q(t)= \)\( \text{L} \). It reaches capacity at \( \text{min} \).

      Solution

      Integrating, we get \( \displaystyle Q(t)=${base}+C \). Since the tank starts with \( \displaystyle ${q_0}\,\text{L} \), we have \( \displaystyle Q(t)=${f} \). At capacity,

      \[\begin{aligned}${capacity}&=${q_0}+${base},\\${base}&=${added},\\t^3&=${cube},\\t&=${time}\,\text{min}.\end{aligned}\]

    2. Why shouldn't the same formula be interpreted as stored volume indefinitely?

      Solution

      We assumed all incoming water stays in the tank. Once it fills, water overflows, so we can only use this stored-volume formula through \( \displaystyle ${time}\,\text{min} \).

  6. A ball has constant acceleration \( -32\,\text{ft/s}^2 \). Its height is \( ${h_1}\,\text{ft} \) after \( 1\,\text{s} \) and \( ${h_2}\,\text{ft} \) after \( 2\,\text{s} \). Two integrations give the family \( y(t)=-16t^2+Bt+C \).

    Its initial velocity was \( \text{ft/s} \).

    Solution

    We substitute the two heights and move the known numerical terms to the left:

    \[\begin{aligned}${h_1}&=-16+B+C,\\${h_2}&=-64+2B+C,\\${sum_1}&=B+C,\\${sum_2}&=2B+C.\end{aligned}\]

    Subtracting the first of the last two equations from the second, we find \( \displaystyle B=${velocity} \). Differentiating, we get \( \displaystyle y'(t)=-32t+B \), so the ball's initial velocity was \( \displaystyle y'(0)=${velocity}\,\text{ft/s} \), upward.

  7. Show that every function \( s(t)=${base}+Bt+C \) solves \( s''=${rate} \). Explain why knowing only \( s(0)=${position} \) doesn't determine the motion.

    Solution

    Differentiating, we get \( \displaystyle s'=${first_base}+B \) and \( \displaystyle s''=${rate} \). Using \( \displaystyle s(0)=${position} \), we find \( \displaystyle C=${position} \), but we still don't know \( \displaystyle B \). Since \( \displaystyle s'(0)=B \), we can choose different starting velocities and get different motions from the same starting position.