Skip to content

Constructing differential equation models

import { Aside } from ‘@astrojs/starlight/components’;

A differential equation connects an unknown quantity to one or more of its rates of change. At A level, constructing a model usually means translating a sentence such as “the population grows at a rate proportional to its size” into an equation such as

dPdt=kP.\frac{dP}{dt}=kP.

This lesson is about building and interpreting such equations. Methods for finding their solutions are covered in separable differential equations.

You should be able to:

  • interpret dydx\dfrac{dy}{dx} as the rate at which yy changes with xx;
  • distinguish positive, negative and zero gradients;
  • rearrange formulae;
  • use units to check an equation;
  • understand direct proportion.

If QQ depends on time tt, then

dQdt=instantaneous rate of change of Q.\frac{dQ}{dt}=\text{instantaneous rate of change of }Q.

The words after “rate” determine the right-hand side.

StatementDifferential equation
QQ increases at a constant rate aadQdt=a\dfrac{dQ}{dt}=a
QQ decreases at a constant rate aadQdt=a\dfrac{dQ}{dt}=-a
The rate of increase of QQ is proportional to QQdQdt=kQ\dfrac{dQ}{dt}=kQ, k>0k>0
The rate of decrease of QQ is proportional to QQdQdt=kQ\dfrac{dQ}{dt}=-kQ, k>0k>0
The rate of change of QQ is proportional to MQM-QdQdt=k(MQ)\dfrac{dQ}{dt}=k(M-Q)
The rate of change of QQ is proportional to Q(MQ)Q(M-Q)dQdt=kQ(MQ)\dfrac{dQ}{dt}=kQ(M-Q)

The constant of proportionality is not optional. “Proportional to QQ” means “equal to kQkQ for some constant kk”.

Water enters a tank at 1212 litres per minute. Let VV be the volume of water, in litres, after tt minutes.

The described rate is the rate of change of volume with time, so

dVdt=12.\frac{dV}{dt}=12.

If the tank initially contains 3535 litres, the complete initial value model is

dVdt=12,V(0)=35.\frac{dV}{dt}=12, \qquad V(0)=35.

The units agree:

[dVdt]=litresminute=[12].\left[\frac{dV}{dt}\right] =\frac{\text{litres}}{\text{minute}} =[12].

Notice that V(0)=35V(0)=35 is not another differential equation. It selects the particular situation that begins with 3535 litres.

Suppose the rate of change of PP is proportional to PP. Direct proportion gives

dPdt=kP.\frac{dP}{dt}=kP.

If PP is increasing and P>0P>0, then k>0k>0. For decay, either write k<0k<0, or more clearly write

dPdt=kP,k>0.\frac{dP}{dt}=-kP, \qquad k>0.

Both conventions are valid, but the meaning of kk must be stated.

A bacterial population grows at a rate proportional to its current population. Initially there are 800800 bacteria. After two hours, the instantaneous growth rate is 240240 bacteria per hour.

Let P(t)P(t) be the number of bacteria after tt hours. The verbal statement gives

dPdt=kP,P(0)=800.\frac{dP}{dt}=kP, \qquad P(0)=800.

At t=2t=2, the extra information says

P(2)=240.P'(2)=240.

It does not yet determine kk, because the value of P(2)P(2) is unknown. If the question also stated that P(2)=1200P(2)=1200, then

240=k(1200)k=0.2 hour1.240=k(1200) \quad\Longrightarrow\quad k=0.2\text{ hour}^{-1}.

Thus the model would be

dPdt=0.2P,P(0)=800.\frac{dP}{dt}=0.2P, \qquad P(0)=800.

The unit of kk follows from dimensional consistency:

bacteriahour=[k]×bacteria[k]=hour1.\frac{\text{bacteria}}{\text{hour}} =[k]\times\text{bacteria} \quad\Longrightarrow\quad [k]=\text{hour}^{-1}.

The mass mm of a radioactive substance decreases at a rate proportional to the mass remaining. At time t=0t=0, the mass is 5050 mg.

Using λ>0\lambda>0 for the decay constant,

dmdt=λm,m(0)=50.\frac{dm}{dt}=-\lambda m, \qquad m(0)=50.

The negative sign matters. When m>0m>0, the equation guarantees that dmdt<0\dfrac{dm}{dt}<0, so the mass decreases.

Not all growth remains proportional to the amount already present. Sometimes the rate is controlled by the gap between the current value and a limiting value.

If TT approaches a surrounding temperature AA, a simple model is

dTdt=k(AT),k>0.\frac{dT}{dt}=k(A-T), \qquad k>0.
  • If T<AT<A, then AT>0A-T>0, so TT increases.
  • If T>AT>A, then AT<0A-T<0, so TT decreases.
  • If T=AT=A, then dTdt=0\dfrac{dT}{dt}=0, so there is no further change.

This sign analysis is a powerful way to test a proposed model without solving it.

A simplified battery model assumes that the rate of increase of charge QQ is proportional to the unused capacity. The maximum charge is 100100 units and the initial charge is 2020 units.

Unused capacity is 100Q100-Q, so

dQdt=k(100Q),Q(0)=20,k>0.\frac{dQ}{dt}=k(100-Q), \qquad Q(0)=20, \qquad k>0.

A common incorrect model is dQdt=kQ\dfrac{dQ}{dt}=kQ. That predicts faster charging as the battery becomes fuller. The stated context says the opposite: charging slows because 100Q100-Q becomes smaller.

Unrestricted proportional growth, P=kPP'=kP, assumes that resources never become scarce. A simple model with a carrying capacity KK is

dPdt=rP(1PK),r>0.\frac{dP}{dt}=rP\left(1-\frac{P}{K}\right), \qquad r>0.

Equivalently,

dPdt=rKP(KP).\frac{dP}{dt}=\frac{r}{K}P(K-P).

The factors have clear roles:

  • PP makes growth slow when the population is very small;
  • KPK-P represents the remaining capacity;
  • P=0P'=0 at P=0P=0 and P=KP=K;
  • P>0P'>0 for 0<P<K0<P<K;
  • P<0P'<0 for P>KP>K.

A lake supports at most 50005000 fish. A model assumes that the growth rate is proportional both to the current population and to the unused capacity. Initially there are 12001200 fish.

Let PP be the population after tt years. Then

dPdt=kP(5000P),P(0)=1200,k>0.\frac{dP}{dt}=kP(5000-P), \qquad P(0)=1200, \qquad k>0.

If P=4500P=4500, then P>0P'>0, but the factor 5000P5000-P is relatively small. The population is still growing, but resource pressure has slowed its growth.

In one-dimensional motion,

v=dxdt,a=dvdt=d2xdt2.v=\frac{dx}{dt}, \qquad a=\frac{dv}{dt}=\frac{d^2x}{dt^2}.

A rule for acceleration is therefore a differential equation for velocity, position, or both.

Example 6: acceleration depending on velocity

Section titled “Example 6: acceleration depending on velocity”

A cyclist’s acceleration is modelled as proportional to the difference between a limiting speed of 12 m s112\text{ m s}^{-1} and the current speed vv. The cyclist starts from rest.

The difference is 12v12-v, so

dvdt=k(12v),v(0)=0,k>0.\frac{dv}{dt}=k(12-v), \qquad v(0)=0, \qquad k>0.

Check the behaviour:

  • at v=0v=0, acceleration is positive;
  • as vv approaches 1212, acceleration approaches 00;
  • if the model were used with v>12v>12, acceleration would be negative.

The model therefore makes 12 m s112\text{ m s}^{-1} an equilibrium speed.

Example 7: resistance proportional to velocity

Section titled “Example 7: resistance proportional to velocity”

A particle of mass mm falls vertically. Take downward as positive. Its weight is mgmg downward, while resistance of magnitude kvkv acts upward when v>0v>0.

Newton’s second law gives

mdvdt=mgkv.m\frac{dv}{dt}=mg-kv.

Hence

dvdt=gkmv.\frac{dv}{dt}=g-\frac{k}{m}v.

At terminal speed, acceleration is zero:

0=gkmvv=mgk.0=g-\frac{k}{m}v \quad\Longrightarrow\quad v=\frac{mg}{k}.

This conclusion comes from interpreting the differential equation. No full solution is needed.

Differential equations can model how a price changes in response to excess demand. Let

  • p(t)p(t) be price;
  • D(p)D(p) be demand at price pp;
  • S(p)S(p) be supply at price pp.

A basic adjustment assumption is

dpdt=k(D(p)S(p)),k>0.\frac{dp}{dt}=k\bigl(D(p)-S(p)\bigr), \qquad k>0.

If demand exceeds supply, then p>0p'>0 and price rises. If supply exceeds demand, then p<0p'<0 and price falls.

Suppose

D(p)=1404p,S(p)=20+2p,D(p)=140-4p, \qquad S(p)=20+2p,

and price changes at a rate proportional to excess demand. Then

dpdt=k((1404p)(20+2p))=k(1206p).\frac{dp}{dt} =k\bigl((140-4p)-(20+2p)\bigr) =k(120-6p).

The equilibrium price occurs when p=0p'=0:

1206p=0p=20.120-6p=0 \quad\Longrightarrow\quad p=20.

For p<20p<20, p>0p'>0. For p>20p>20, p<0p'<0. The model therefore predicts adjustment towards a price of 2020.

A differential equation describes a family of possible histories. An initial condition provides the value of the dependent variable at a specified starting point:

y(0)=y0.y(0)=y_0.

Do not confuse these three kinds of information:

y=kymodel structure,y(0)=200initial condition,k=0.04parameter value.\underbrace{y'=ky}_{\text{model structure}}, \qquad \underbrace{y(0)=200}_{\text{initial condition}}, \qquad \underbrace{k=0.04}_{\text{parameter value}}.

Parameters such as kk, rr and KK describe how the system behaves. Variables such as tt, PP and vv change within the model.

A mathematical model is a deliberate simplification. Strong answers make its assumptions visible. Depending on context, assumptions might include:

  • time is treated as continuous;
  • a population is large enough to be represented by a continuous variable;
  • environmental conditions remain unchanged;
  • the proportionality constant does not vary with time;
  • no migration, harvesting or sudden external event occurs;
  • forces included in the equation are the only significant forces;
  • supply and demand respond instantly to price;
  • measurements and initial values are exact enough for the purpose.

An equation can be manipulated perfectly and still be a poor model if its assumptions are unreasonable.

For an equation of the form

dydt=f(y),\frac{dy}{dt}=f(y),

ask the following questions.

If the context says yy is increasing, the model should give f(y)>0f(y)>0 in the relevant range.

Equilibrium values satisfy

f(y)=0.f(y)=0.

At such a value, the model predicts no instantaneous change.

If yy represents mass or population, can the model predict y<0y<0? If it does, the model may only be valid for a restricted interval.

Every term added or subtracted must have the same units. In

dPdt=rP(1PK),\frac{dP}{dt}=rP\left(1-\frac{P}{K}\right),

P/KP/K is dimensionless, so rr must have units of inverse time.

Incorrect:

dPdt=P.\frac{dP}{dt}=P.

Correct general model:

dPdt=kP.\frac{dP}{dt}=kP.

The incorrect equation silently fixes k=1k=1 in the chosen units.

Attaching the derivative to the wrong variable

Section titled “Attaching the derivative to the wrong variable”

If population changes with time, write dPdt\dfrac{dP}{dt}, not dtdP\dfrac{dt}{dP} and not dPdx\dfrac{dP}{dx}.

“Decreases at a rate proportional to mm” requires either

dmdt=km,k>0,\frac{dm}{dt}=-km, \qquad k>0,

or m=kmm'=km with an explicit statement that k<0k<0.

Using a total change as an instantaneous rate

Section titled “Using a total change as an instantaneous rate”

P(3)P(0)P(3)-P(0) is a change over three time units. P(3)P'(3) is the instantaneous rate at t=3t=3. They are different quantities and usually have different units.

If a question asks you to formulate a differential equation, stop once the variables, equation, conditions and assumptions have been stated. Solving an unnecessary equation wastes time and can introduce errors.

The rate at which a medicine leaves the bloodstream is proportional to the amount MM present. Initially, 8080 mg is present. Construct a model using a positive constant kk.

Answer

Because the amount decreases,

dMdt=kM,M(0)=80,k>0.\frac{dM}{dt}=-kM, \qquad M(0)=80, \qquad k>0.

A rumour spreads through a school of 900900 students. The rate of spread is proportional both to the number RR who know the rumour and the number who do not. Initially 1515 students know it. Construct a model.

Answer

The number who do not know the rumour is 900R900-R. Therefore

dRdt=kR(900R),R(0)=15,k>0.\frac{dR}{dt}=kR(900-R), \qquad R(0)=15, \qquad k>0.

A car’s acceleration is 0.30.3 times the difference between its current speed vv and a target speed of 25 m s125\text{ m s}^{-1}. The car begins at 10 m s110\text{ m s}^{-1}. Correct the wording if necessary, then give the physically sensible model.

Answer

For the car to accelerate towards the target from below, the relevant difference must be target minus current speed. Thus

dvdt=0.3(25v),v(0)=10.\frac{dv}{dt}=0.3(25-v), \qquad v(0)=10.

Writing 0.3(v25)0.3(v-25) would make the initial acceleration negative and move the car away from the target.

Demand and supply are D(p)=902pD(p)=90-2p and S(p)=15+pS(p)=15+p. Price changes at twice the excess demand per week. Construct the equation and find the equilibrium price without solving the differential equation.

Answer dpdt=2(DS)=2((902p)(15+p))=1506p.\frac{dp}{dt} =2(D-S) =2\bigl((90-2p)-(15+p)\bigr) =150-6p.

At equilibrium, p=0p'=0, so

1506p=0p=25.150-6p=0 \quad\Longrightarrow\quad p=25.

The essential skill is translation: define the quantities, identify what controls the rate, select the sign, add the initial condition, then test whether the model behaves sensibly.