Calculus 2First Differential Equations

Separable Equations

Move each variable to its own side and integrate.

Not started Jump to practice

Some differential equations can be solved exactly by integrating. The simplest family is the separable equations, where the right side splits into a factor with only $x$ and a factor with only $y$: $\frac{dy}{dx} = g(x)\,h(y)$. You will use integrals that give logarithms often.

Why it works

Divide by $h(y)$ (where it is not 0): $\frac{1}{h(y)}\frac{dy}{dx} = g(x)$. Integrate both sides with respect to $x$. On the left, the substitution rule turns $\int \frac{1}{h(y)}\frac{dy}{dx}\,dx$ into $\int \frac{dy}{h(y)}$. So $$\int \frac{dy}{h(y)} = \int g(x)\,dx.$$ Writing "$\frac{dy}{h(y)} = g(x)\,dx$" is shorthand for exactly this use of the chain rule.

Key idea

(1) Separate: all $y$'s with $dy$, all $x$'s with $dx$. (2) Integrate both sides and add one constant right away. (3) Solve for $y$ if you can. (4) Use the initial condition. (5) Check any constant solutions you divided away.

Worked example: Exponential growth

Solve $\frac{dy}{dx} = 2xy$, $y(0) = 3$.
  1. Separate: $\frac{dy}{y} = 2x\,dx$.
  2. Integrate: $\ln|y| = x^{2} + C$.
  3. Exponentiate: $|y| = e^{C}e^{x^{2}}$, so $y = Ke^{x^{2}}$ with $K = \pm e^{C}$; $K = 0$ gives $y = 0$, which is also a solution.
  4. $y(0) = 3$ gives $K = 3$: $y = 3e^{x^{2}}$.

Answer: $y = 3e^{x^{2}}$

Common mistake

Adding the constant at the end instead of right after integrating. For $\frac{dy}{dx} = xy^{2}$: integrating gives $-\frac{1}{y} = \frac{x^{2}}{2} + C$, so $y = \frac{-1}{x^{2}/2 + C}$. If you solve $-\frac{1}{y} = \frac{x^{2}}{2}$ first and then write $y = -\frac{2}{x^{2}} + C$, you get a family that does not satisfy the equation. Also watch for lost solutions: dividing by $y^{2}$ assumed $y \ne 0$, but $y = 0$ is a solution too. Check by substituting into the original equation.

Worked example: A square root

Solve $\frac{dy}{dx} = \frac{x}{y}$, $y(0) = 2$.
  1. Separate: $y\,dy = x\,dx$.
  2. Integrate: $\frac{y^{2}}{2} = \frac{x^{2}}{2} + C$, so $y^{2} = x^{2} + 2C$.
  3. At $x = 0$: $4 = 2C$. So $y^{2} = x^{2} + 4$.
  4. $y(0) = 2 > 0$, so take the positive root: $y = \sqrt{x^{2} + 4}$.

Answer: $y = \sqrt{x^{2} + 4}$

The slope field of $y' = \frac{x}{y}$. The solution through $(0, 2)$ is the upper branch of the hyperbola $y^{2} - x^{2} = 4$. Drag the starting point to see other solutions.

Worked example: Newton's law of cooling

Coffee at $90^\circ$C cools in a $20^\circ$C room by $\frac{dT}{dt} = -0.1(T - 20)$, with $t$ in minutes. Find $T(t)$.
  1. Separate: $\frac{dT}{T - 20} = -0.1\,dt$.
  2. Integrate: $\ln|T - 20| = -0.1t + C$, so $T - 20 = Ke^{-0.1t}$.
  3. At $t = 0$: $K = 90 - 20 = 70$. So $T = 20 + 70e^{-0.1t}$.

Answer: $T(t) = 20 + 70e^{-0.1t}$; after 10 minutes, about $45.8^\circ$C.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Also used in other ladders:

Sources and further reading

  • OpenStax Calculus Volume 2, Section 4.3: Separable Equations
  • Paul’s Online Math Notes (Lamar University), Calculus II: Separable Differential Equations
@teddyrookbook GitHub