First-Order Differential Equations

Interpret equations involving a function and its first derivative.

A first-order differential equation describes a function by describing its first derivative. Instead of immediately telling you y, it tells you how y changes.

Learning objectives

After this lesson you should be able to:

  • recognize a first-order differential equation;
  • identify the independent variable, dependent variable, and derivative;
  • explain what a solution function means;
  • use an initial condition to choose one solution;
  • verify a proposed solution by substitution;
  • interpret simple models with units.

From equations to change rules

Compare these two statements:

y = 3x + 2
dy/dx = 3

The first statement gives y directly. The second statement says the rate of change of y with respect to x is always 3. Many functions differ by a constant but have derivative 3, so the differential equation describes a family of functions.

A common first-order form is

dy/dx = f(x, y)

The right-hand side tells you the slope that a solution should have at each point (x,y).

Vocabulary

  • The independent variable is the input, often x or time t.
  • The dependent variable is the unknown function, often y(x) or y(t).
  • The derivative dy/dx or dy/dt is the rate of change.
  • A solution is a function whose derivative satisfies the rule.
  • An initial condition such as y(0)=5 gives a starting value.

Solution test

To check whether a function solves an ODE:

  1. Differentiate the candidate function.
  2. Substitute the candidate into the right-hand side.
  3. See whether the two expressions match.

Worked example 1: verify a solution

Show that y = 2e^{3x} solves dy/dx = 3y.

Step 1: Differentiate the candidate.

y = 2e^{3x}
y' = 6e^{3x}

Step 2: Compute the right-hand side 3y.

3y = 3(2e^{3x}) = 6e^{3x}

Step 3: Compare.

y' = 6e^{3x} and 3y = 6e^{3x}

They match, so the candidate is a solution.

Worked example 2: use an initial condition

Suppose the family of solutions is

y = Ce^{-2t}

and the initial condition is y(0)=7. Substitute t=0 and y=7:

7 = C e^0
7 = C

So the particular solution is

y = 7e^{-2t}

Worked example 3: interpret a model

Newton’s law of cooling is often written as

dT/dt = -0.4(T - 20)

Here T is temperature and t is time. The expression T - 20 measures how far the object is from the surrounding temperature 20. The negative sign means that if the object is hotter than the room, the temperature decreases. If the object is colder than the room, the temperature increases.

Common first-order patterns

Pattern Example Meaning
Constant rate dy/dt = 4 add the same amount each time unit
Proportional growth dy/dt = 0.2y bigger y grows faster
Proportional decay dy/dt = -0.2y bigger y decays faster
Autonomous dy/dt = y(1-y) rate depends only on current y
Forced dy/dt + 2y = sin(t) outside input affects the motion

Common pitfalls

  • Confusing the differential equation with its solution.
  • Forgetting that a solution is a function, not only one number.
  • Ignoring the initial condition.
  • Forgetting units: if y is meters and t is seconds, dy/dt is meters per second.
  • Substituting into the ODE without differentiating first.

Practice

  1. Is dy/dx = x + y first order? Explain.

  2. Verify that y = 5e^x solves dy/dx = y.

  3. The family y = C e^{4t} satisfies y(0)=3. Find C.

  4. Interpret dP/dt = 0.03P if P is population and t is years.

  1. Yes. It involves the first derivative dy/dx and no higher derivative.
  2. The derivative of 5e^x is 5e^x, which equals y.
  3. 3 = C e^0, so C=3.
  4. The population grows at a rate equal to 3% of the current population per year.

Subtopic guided practice and checkpoints

Use these mini-labs to turn the vocabulary into a repeatable routine. In each lab, guess first, then follow the steps, then try the checkpoint without looking at the worked lines.

Lab 1: identify the pieces of an ODE

Guess first. In dP/dt = 0.04P, what is changing, and with respect to what input?

Guided exercise.

  1. The dependent variable is P; it is the quantity whose value changes.
  2. The independent variable is t; it is usually time.
  3. The derivative dP/dt means “rate of change of P per unit of t.”
  4. The right side 0.04P says the rate is proportional to the current amount.

So a good sentence is: “The quantity P grows at a rate equal to 4% of its current size per unit time.”

Checkpoint. For dT/dt = -0.2(T - 70), identify the dependent variable, independent variable, derivative, and meaning of the negative sign.

Lab 2: verify a candidate solution

Guess first. If y = 4e^{-2x}, should it solve y' = -2y?

Guided exercise.

y = 4e^(-2x)
y' = -8e^(-2x)                 differentiate
-2y = -2(4e^(-2x)) = -8e^(-2x)

Since y' and -2y are the same expression, the candidate solves the ODE.

Checkpoint. Verify that y = 3e^{5x} solves y' = 5y. Show the derivative and the substituted right-hand side.

Lab 3: use an initial condition

Guess first. If the family is y = Ce^{3t} and y(0)=10, what should C be?

Guided exercise.

y = Ce^(3t)
10 = Ce^(3*0)          substitute t=0 and y=10
10 = C e^0
10 = C

So the particular solution is y = 10e^{3t}.

Checkpoint. The family y = C e^{-4t} satisfies y(0)=8. Find the particular solution and explain what happens as t increases.

Lab 4: interpret units and direction

Guess first. If dA/dt = -0.15A and A is grams, what are the units of the right side?

Guided exercise.

The derivative dA/dt has units “grams per time.” Therefore 0.15 must have units “per time,” and the negative sign means A is decreasing. Bigger amounts lose more grams per time because the rate is proportional to A.

Checkpoint. Interpret dM/dt = 12 - 0.5M if M is milligrams of medicine in a body. Which term is input, and which term is removal?

First-order equation checkpoint

Using this lesson with edumath and SymPy

Use SymPy to verify that a candidate solution satisfies an ODE.

import sympy as sp

x = sp.Symbol("x")
y_candidate = 2 * sp.exp(3 * x)
left_side = sp.diff(y_candidate, x)
right_side = 3 * y_candidate
sp.simplify(left_side - right_side)

\(\displaystyle 0\)

A result of 0 means the candidate satisfies the differential equation.

from edumath.differential_equations import validate_solution_satisfies_ode

validate_solution_satisfies_ode("2*exp(3*x)", "3*y").message
'Correct.'