Unit 9, lesson 117

Separable Differential Equations

How to solve equations of the form y' = g(x)h(y) by separating the variables and integrating, without losing constant solutions, and how to find the interval on which a solution lives.

  • Theory part 233
  • Practice part 234
  • Solution Methods

Some rates of change split neatly into a part that depends only on time and a part that depends only on the current amount. Radioactive decay, simple growth and many cooling laws look like this. For such equations you can put each variable on its own side and integrate, which is the first general method for solving differential equations.

Key terms

Separation of variables

Definition A first order equation is separable if it can be written as

dydx=g(x) h(y),\frac{dy}{dx} = g(x)\,h(y),

with gg continuous on an open interval II and hh continuous on an open interval JJ. Let J0J_0 be a subinterval of JJ on which h(y)≠0h(y) \neq 0, let HH be an antiderivative of 1h\frac{1}{h} on J0J_0 and GG an antiderivative of gg on II. Then a differentiable function yy on a subinterval of II with values in J0J_0 is a solution if and only if

H(y(x))=G(x)+CH\left(y(x)\right) = G(x) + C

for some constant CC. In the usual shorthand this is written

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

In plain words Move everything with yy to the left, everything with xx to the right, and integrate both sides. The chain rule is what makes this legal, since

ddxH(y(x))=y′(x)h(y(x)).\frac{d}{dx}H\left(y(x)\right) = \frac{y'(x)}{h\left(y(x)\right)}.

Example Solve y′=2x(1+y2)y' = 2x\left(1 + y^2\right). Here h(y)=1+y2h(y) = 1 + y^2 is never zero, so

∫dy1+y2=∫2x dx⟹arctan⁡y=x2+C⟹y=tan⁡(x2+C).\int \frac{dy}{1 + y^2} = \int 2x\,dx \quad\Longrightarrow\quad \arctan y = x^2 + C \quad\Longrightarrow\quad y = \tan\left(x^2 + C\right).

Solving for yy is allowed on any interval where x2+Cx^2 + C stays strictly between −π2-\frac{\pi}{2} and π2\frac{\pi}{2}, the range of arctan⁡\arctan.

Explicit and implicit solutions

Definition The relation H(y)=G(x)+CH(y) = G(x) + C is an implicit solution. If it can be solved for yy as a differentiable function y=φ(x)y = \varphi(x) on an interval, that function is an explicit solution there. By the implicit function theorem the relation defines such a φ\varphi near any point (x0,y0)(x_0, y_0) on it with H′(y0)=1h(y0)≠0H'(y_0) = \frac{1}{h(y_0)} \neq 0, even when no formula for φ\varphi exists.

In plain words Often you can stop at an equation linking xx and yy. That equation still defines the solution, even if you cannot write y=…y = \ldots.

Example For y′=xy+eyy' = \frac{x}{y + e^y}, separating gives

∫(y+ey)dy=∫x dx⟹y22+ey=x22+C.\int \left(y + e^y\right)dy = \int x\,dx \quad\Longrightarrow\quad \frac{y^2}{2} + e^y = \frac{x^2}{2} + C.

There is no elementary formula for yy, so this implicit form is the answer. With y(0)=0y(0) = 0 we get 0+1=0+C0 + 1 = 0 + C, so C=1C = 1 and the solution satisfies y2+2ey=x2+2y^2 + 2e^y = x^2 + 2.

Lost equilibrium solutions

Definition If h(c)=0h(c) = 0, the constant function y=cy = c solves y′=g(x)h(y)y' = g(x)h(y) on all of II. Dividing by h(y)h(y) assumes h(y)≠0h(y) \neq 0, so these constant solutions must be checked separately. They may or may not appear in the family obtained by separation.

In plain words Before dividing by h(y)h(y), write down every value where h(y)=0h(y) = 0. Each gives a solution that the division may have thrown away.

Example Solve y′=y2y' = y^2. The constant y=0y = 0 is a solution. For y≠0y \neq 0,

∫y−2 dy=∫dx⟹−1y=x+C⟹y=−1x+C.\int y^{-2}\,dy = \int dx \quad\Longrightarrow\quad -\frac{1}{y} = x + C \quad\Longrightarrow\quad y = -\frac{1}{x + C}.

No value of CC gives y=0y = 0, so the complete answer is the family together with the lost solution y=0y = 0. Compare y′=xyy' = xy, where separation gives y=Aex2/2y = Ae^{x^2/2} with A≠0A \neq 0 and the lost solution y=0y = 0 comes back as A=0A = 0.

Maximal intervals

Definition The maximal interval of a solution of an initial-value problem is the largest open interval containing the initial point x0x_0 on which the solution is defined and satisfies the equation. For a separable problem look for the places where xx reaches an end of II, where yy becomes unbounded, or where y(x)y(x) reaches an end of J0J_0. In the last case the separated formula stops being valid, and whether the solution continues past that point needs a separate look.

In plain words After finding the formula, ask how far you can go left and right from the starting point before something goes wrong.

Example For y′=2x(1+y2)y' = 2x\left(1 + y^2\right), y(0)=0y(0) = 0, the formula above gives arctan⁡0=C\arctan 0 = C, so C=0C = 0 and y=tan⁡(x2)y = \tan\left(x^2\right). This requires x2<π2x^2 < \frac{\pi}{2}, so the maximal interval is

(−π/2, π/2)≈(−1.2533, 1.2533).\left(-\sqrt{\pi/2},\ \sqrt{\pi/2}\right) \approx (-1.2533,\ 1.2533).

At the ends the solution goes to +∞+\infty. Beyond them the formula is defined again in places, but those pieces belong to other solutions.

Orthogonal trajectories

Definition Let a one-parameter family of curves satisfy the differential equation y′=f(x,y)y' = f(x, y), obtained by differentiating and eliminating the parameter. Its orthogonal trajectories are the curves that meet every curve of the family at right angles. Where f(x,y)≠0f(x, y) \neq 0, they are the solution curves of

y′=−1f(x,y).y' = -\frac{1}{f(x, y)}.

In plain words Find the slope of the family at each point, take the negative reciprocal, and solve the new equation.

Example Take the parabolas y=cx2y = cx^2. Then y′=2cxy' = 2cx, and with c=yx2c = \frac{y}{x^2} this is y′=2yxy' = \frac{2y}{x} for x≠0x \neq 0. The orthogonal trajectories satisfy y′=−x2yy' = -\frac{x}{2y}, which is separable, and separating the variables gives

∫2y dy=−∫x dx⟹y2=−x22+K⟹x2+2y2=2K.\int 2y\,dy = -\int x\,dx \quad\Longrightarrow\quad y^2 = -\frac{x^2}{2} + K \quad\Longrightarrow\quad x^2 + 2y^2 = 2K.

So the orthogonal trajectories are the ellipses x2+2y2=kx^2 + 2y^2 = k with k>0k > 0. At (1,1)(1, 1) the parabola y=x2y = x^2 has slope 22 and the ellipse x2+2y2=3x^2 + 2y^2 = 3 has slope −12-\frac{1}{2}, and 2⋅(−12)=−12 \cdot \left(-\frac{1}{2}\right) = -1.

Check yourself

  1. Solve y′=x2yy' = \frac{x^2}{y} with y(0)=2y(0) = 2 and give the maximal interval.
Show the answer

Separating the variables gives

∫y dy=∫x2 dx,soy22=x33+C,\int y\,dy = \int x^2\,dx, \qquad\text{so}\qquad \frac{y^2}{2} = \frac{x^3}{3} + C,

and y(0)=2y(0) = 2 gives C=2C = 2. Since y>0y > 0 at the start,

y=2x33+4.y = \sqrt{\frac{2x^3}{3} + 4}.

This formula needs 2x33+4>0\frac{2x^3}{3} + 4 > 0, so x3>−6x^3 > -6, and the maximal interval is (−63,∞)\left(-\sqrt[3]{6}, \infty\right). At the left end y→0y \to 0 and y′y' blows up.

  1. Find all solutions of y′=ycos⁡xy' = y\cos x.
Show the answer

The constant y=0y = 0 is a solution. For y≠0y \neq 0, separating gives ln⁡∣y∣=sin⁡x+C\ln\lvert y \rvert = \sin x + C, so y=Aesin⁡xy = Ae^{\sin x} with A≠0A \neq 0. Taking A=0A = 0 brings back y=0y = 0, so all solutions are y=Aesin⁡xy = Ae^{\sin x} with AA any real number.

  1. Why is the constant solution y=1y = 1 of y′=x(y−1)2y' = x(y - 1)^2 easy to miss?
Show the answer

Separation divides by (y−1)2(y - 1)^2 and gives −1y−1=x22+C-\frac{1}{y - 1} = \frac{x^2}{2} + C, so

y=1−2x2+2C.y = 1 - \frac{2}{x^2 + 2C}.

No choice of CC gives y=1y = 1, yet y=1y = 1 makes both sides zero.

How this lesson connects