Review / Part I — Explicit & Qualitative Methods / Ch 2

Separable Equations

Ch 2 — Part I — Explicit & Qualitative Methods

A first-order ODE is separable if it can be written \(y' = g(t)\,h(y)\). We "separate" variables and integrate.

Separation recipe

From \(\dfrac{dy}{dt} = g(t) h(y)\):

  1. Away from zeros of \(h\), rewrite as \(\dfrac{dy}{h(y)} = g(t)\,dt\).
  2. Integrate both sides.
  3. Solve for \(y\) (if possible) and use the initial condition.
  4. Check that any equilibrium solutions \(h(y) = 0\) are captured or added separately.

Why this is legitimate

It's the chain rule in reverse: if \(H\) is an antiderivative of \(1/h\), then \(\frac{d}{dt} H(y(t)) = H'(y(t)) y'(t) = y'/h(y) = g(t)\). Integrate in \(t\) on both sides.

Implicit vs explicit solutions

Sometimes you cannot solve the integrated equation for \(y\) explicitly — the answer is an implicit relation in \(t\) and \(y\). That's fine and often sufficient for analysis.

Practice Problems

Problem 1easy
Solve \(y' = t y\) with \(y(0) = 2\).
Hint
Separate: \(dy/y = t\,dt\).
Solution

\(\ln|y| = t^2/2 + C_1\Rightarrow y = C e^{t^2/2}\). Imposing \(y(0)=2\) gives \(C = 2\).

Answer: \(y(t) = 2 e^{t^2/2}\).

Problem 2medium
Solve \(y' = (1 + y^2) \cos t\).
Hint
Separate: \(dy/(1+y^2) = \cos t\,dt\).
Solution

\(\arctan(y) = \sin t + C\Rightarrow y(t) = \tan(\sin t + C)\).

Answer: \(y(t) = \tan(\sin t + C).\)

Problem 3medium
Solve \(y' = -2 t / y,\; y(0) = 3\).
Hint
\(y\,dy = -2t\,dt\).
Solution

\(y^2/2 = -t^2 + C_1\). Using \(y(0) = 3\) gives \(C_1 = 9/2\). So \(y^2 = 9 - 2t^2\), \(y > 0\).

Answer: \(y(t) = \sqrt{9 - 2t^2},\; |t| < 3/\sqrt{2}.\)

Problem 4medium
Solve \(y' = e^{t - y}\) with \(y(0) = 0\).
Hint
\(e^y dy = e^t dt\).
Solution

Integrate: \(e^y = e^t + C\). From \(y(0)=0\), \(1 = 1 + C\Rightarrow C = 0\). So \(y(t) = t\).

Answer: \(y(t) = t.\)

Problem 5hard
What is the solution of \(y' = y(1-y)\) with \(y(0) = 1/2\)? (Logistic.)
Hint
Partial fractions: \(\frac{1}{y(1-y)} = \frac{1}{y} + \frac{1}{1-y}\).
Solution

Integrating: \(\ln|y| - \ln|1-y| = t + C\). Exponentiate: \(y/(1-y) = Ae^t\). Using \(y(0)=1/2\): \(A = 1\). Solve: \(y(t) = e^t/(1+e^t) = 1/(1+e^{-t})\).

Answer: \(y(t) = 1/(1 + e^{-t})\) — the sigmoid.