myLearning

Topic 1 of 6

Step 20: Differential equations

Separable and first-order linear equations

Step 20 · Differential equations topics

Solve first-order equations by separating the variables or with an integrating factor, and use them to model growth, cooling and mixing.

Separable equations

A differential equation links an unknown function with its derivatives, and a solution is a function that makes it true. In a separable equation, dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y), move every y to one side and every x to the other, then integrate both sides.

∫dyh(y)=∫g(x) dx\int \frac{dy}{h(y)} = \int g(x)\,dx

Example: Exponential growth

Solve dydt=0.3y\frac{dy}{dt} = 0.3y with y(0) = 50.

  1. Separate: dyy=0.3 dt\frac{dy}{y} = 0.3\,dt.
  2. Integrate: ln⁡∣y∣=0.3t+C\ln|y| = 0.3t + C, so y=Ae0.3ty = Ae^{0.3t}.
  3. y(0) = 50 gives A = 50.

Answery=50e0.3ty = 50e^{0.3t}

Example: A product

Solve dydx=xy2\frac{dy}{dx} = xy^{2} with y(0) = 1.

  1. Separate: y−2 dy=x dxy^{-2}\,dy = x\,dx.
  2. Integrate: −1y=x22+C-\frac{1}{y} = \frac{x^{2}}{2} + C, and y(0) = 1 gives C = −1.
  3. So 1y=1−x22\frac{1}{y} = 1 - \frac{x^{2}}{2}.

Answery=22−x2y = \frac{2}{2 - x^{2}}

Integrating factors

A first-order linear equation has the form y′ + p(x)y = q(x). Multiply through by the integrating factor μ=e∫p dx\mu = e^{\int p\,dx}. The left side becomes the derivative of μy, and one integration finishes the job.

(μy)′=μq(\mu y)' = \mu q

Example: A constant coefficient

Solve y′ + 2y = 6 with y(0) = 1.

  1. μ = e2xe^{2x}, and the equation becomes (e2xy)′=6e2x(e^{2x}y)' = 6e^{2x}.
  2. Integrate: e2xy=3e2x+Ce^{2x}y = 3e^{2x} + C, so y=3+Ce−2xy = 3 + Ce^{-2x}.
  3. y(0) = 1 gives C = −2.

Answery=3−2e−2xy = 3 - 2e^{-2x}

Example: A varying coefficient

Solve y′+1xy=xy' + \frac{1}{x}y = x for x > 0.

  1. μ=eln⁡x=x\mu = e^{\ln x} = x, so (xy)′ = x².
  2. Integrate: xy=x33+Cxy = \frac{x^{3}}{3} + C.

Answery=x23+Cxy = \frac{x^{2}}{3} + \frac{C}{x}

Modeling with first-order equations

SituationEquationBehavior
Growth or decayy′=kyy' = kyExponential
CoolingT′=−k(T−Ts)T' = -k(T - T_{s})Approaches the surroundings
Logistic growthP′=rP(1−PK)P' = rP\left(1 - \frac{P}{K}\right)Levels off at K
Mixing tankRate in minus rate outApproaches a steady level

Example: Cooling coffee

Coffee at 90°C sits in a 20°C room and cools to 60°C in 10 minutes. Find its temperature t minutes in.

  1. T − 20 decays exponentially: T=20+70e−ktT = 20 + 70e^{-kt}.
  2. At t = 10: 70e−10k=4070e^{-10k} = 40, so k=110ln⁡74k = \frac{1}{10}\ln\frac{7}{4}, about 0.056.

AnswerT≈20+70e−0.056tT \approx 20 + 70e^{-0.056t}

Example: A mixing tank

A 100 L tank of pure water has brine with 2 g of salt per liter flowing in at 5 L/min, and the mixture drains at 5 L/min. How much salt is there after a long time?

  1. The salt S changes at S′=10−5S100S' = 10 - \frac{5S}{100}: 10 g a minute in, and 5% of the salt out each minute.
  2. The steady level is where S′ = 0: S = 200.

AnswerClose to 200 g: the tank ends up at 2 g a liter, like the brine

Try it yourself

Work each one on paper first, then open the answer to check.

  1. Solve dydt=−0.5y\frac{dy}{dt} = -0.5y with y(0) = 8.

    Show answer

    y=8e−0.5ty = 8e^{-0.5t}

  2. Solve dydx=xy\frac{dy}{dx} = \frac{x}{y} with y(0) = 2.

    Show answer

    y=x2+4y = \sqrt{x^{2} + 4}

  3. Find the integrating factor for y′ + 3y = x.

    Show answer

    e3xe^{3x}

  4. Solve y′ + y = 4 with y(0) = 0.

    Show answer

    y=4−4e−xy = 4 - 4e^{-x}

  5. A substance has a half-life of 5 years. What is k in y=y0e−kty = y_{0}e^{-kt}?

    Show answer

    ln 2 ÷ 5, about 0.139

  6. In P′=0.2P(1−P500)P' = 0.2P\left(1 - \frac{P}{500}\right), what level does P approach?

    Show answer

    500

What next?