Unit 2, lesson 7

Separable Equations

How to solve y' = a(t)b(y) by separation of variables, why the chain rule justifies it, how to keep the equilibria lost by division, and how to read an implicit solution and its solution interval.

  • Video 7
  • Separable and Linear Equations

Let tt be the independent variable and write y′=dy/dty' = dy/dt. Suppose a quantity changes at a rate that is the product of a factor depending only on time and a factor depending only on the current state, as in y′=2tyy' = 2ty. Then each variable can be gathered on its own side of the equation and integrated. This lesson explains why that step is legitimate, which solutions the division step can lose, when a relation between the variables is the natural answer, and how to find the interval on which a solution is valid.

Key terms

Separable equation

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

y′=a(t) b(y),y' = a(t)\,b(y),

where aa is continuous on an open interval II and bb is continuous on an open interval JJ. The right side is a product of a function of tt alone and a function of yy alone. An autonomous equation y′=f(y)y' = f(y) with ff continuous is the special case a(t)=1a(t) = 1.

In plain words Time and state affect the rate through separate factors that are multiplied together. Neither factor contains the other variable.

Example In y′=2tyy' = 2ty the time factor is a(t)=2ta(t) = 2t and the state factor is b(y)=yb(y) = y. The equation y′=et+yy' = e^{t + y} is separable too, because et+y=eteye^{t + y} = e^t e^y. The equation y′=t+yy' = t + y is not. If t+y=a(t)b(y)t + y = a(t)b(y) held on a rectangle, then for two fixed times t1≠t2t_1 \ne t_2 the ratio (t1+y)/(t2+y)(t_1 + y)/(t_2 + y) would equal the constant a(t1)/a(t2)a(t_1)/a(t_2) wherever t2+y≠0t_2 + y \ne 0. But that ratio is 1+(t1−t2)/(t2+y)1 + (t_1 - t_2)/(t_2 + y), which changes with yy.

Separation of variables

Definition Let y′=a(t)b(y)y' = a(t)b(y) be separable as above, and let J0⊆JJ_0 \subseteq J be an open interval on which b(y)≠0b(y) \ne 0. Let AA be an antiderivative of aa on II and HH an antiderivative of 1/b1/b on J0J_0. A differentiable function yy on an interval contained in II, with values in J0J_0, is a solution if and only if

H(y(t))=A(t)+CH\bigl(y(t)\bigr) = A(t) + C

for some constant CC. The reason is the chain rule,

ddtH(y(t))=y′(t)b(y(t)),\frac{d}{dt}H\bigl(y(t)\bigr) = \frac{y'(t)}{b\bigl(y(t)\bigr)},

which equals a(t)a(t) at every point exactly when yy solves the equation, and two functions with the same derivative on an interval differ by a constant. The usual shorthand for this relation is

∫dyb(y)=∫a(t) dt.\int \frac{dy}{b(y)} = \int a(t)\,dt.

In plain words Divide by the state factor where it is not zero, then integrate each side with respect to its own variable. Writing dydy and dtdt on separate sides is a compact record of the chain rule argument, not a separate rule.

Example Solve y′=2tyy' = 2ty on a branch where y≠0y \ne 0. The function 1/b(y)=1/y1/b(y) = 1/y has the antiderivative ln⁡∣y∣\ln\lvert y \rvert on each of the intervals y>0y > 0 and y<0y < 0, so

ln⁡∣y∣=t2+C0.\ln\lvert y \rvert = t^2 + C_0.

On the branch y>0y > 0 this gives y=eC0et2y = e^{C_0}e^{t^2}, and on the branch y<0y < 0 it gives y=−eC0et2y = -e^{C_0}e^{t^2}. Both are of the form y=Cet2y = Ce^{t^2} with C≠0C \ne 0, where the sign of CC is the sign of the branch.

Equilibria lost by division

Definition If b(c)=0b(c) = 0 for some cc in JJ, the constant function y(t)=cy(t) = c solves y′=a(t)b(y)y' = a(t)b(y) on all of II, because both sides are zero. Such a constant solution is an equilibrium. Separation divides by b(y)b(y), so it only produces solutions that avoid the zeros of bb, and the equilibria have to be found before dividing and checked on their own. If in addition bb is continuously differentiable on JJ, the uniqueness theorem applies to f(t,y)=a(t)b(y)f(t, y) = a(t)b(y), so a solution that equals cc at one time equals cc at every time. Every solution is then either an equilibrium or never reaches one, and in the second case its values stay inside a single interval J0J_0 where separation applies. Without that hypothesis a solution can reach an equilibrium in finite time, as y=t3y = t^3 does for y′=3y2/3y' = 3y^{2/3} at t=0t = 0.

In plain words Before dividing by b(y)b(y), list every value cc with b(c)=0b(c) = 0. Each one is a constant solution, and the division may have removed it from the family that separation produces.

Example For y′=2tyy' = 2ty the zero of b(y)=yb(y) = y gives the equilibrium y=0y = 0, which does solve the equation, since both sides are 00. The separated family y=Cet2y = Ce^{t^2} with C≠0C \ne 0 happens to recover it at C=0C = 0, and b(y)=yb(y) = y is continuously differentiable, so every solution is y=Cet2y = Ce^{t^2} for some real CC. That last step was checked in the original equation, and it does not always work. For y′=2ty2y' = 2ty^2, separation gives

−1y=t2+C,y=−1t2+C,\begin{gathered} -\frac{1}{y} = t^2 + C, \\[0.4em] y = -\frac{1}{t^2 + C}, \end{gathered}

and no value of CC produces the equilibrium y=0y = 0, because the fraction is never zero.

Implicit solution

Definition A relation F(t,y)=CF(t, y) = C is an implicit solution on an open interval if it defines there a differentiable function y=φ(t)y = \varphi(t) that solves the equation and satisfies F(t,φ(t))=CF\bigl(t, \varphi(t)\bigr) = C for every tt in the interval. By the implicit function theorem, if FF has continuous first partial derivatives near a point (t0,y0)(t_0, y_0) of the relation and Fy(t0,y0)≠0F_y(t_0, y_0) \ne 0, then on some open interval around t0t_0 the part of the relation near (t0,y0)(t_0, y_0) is the graph of a differentiable function φ\varphi with φ(t0)=y0\varphi(t_0) = y_0, and

φ′(t)=−Ft(t,φ(t))Fy(t,φ(t)).\varphi'(t) = -\frac{F_t\bigl(t, \varphi(t)\bigr)}{F_y\bigl(t, \varphi(t)\bigr)}.

The separated relation H(y)−A(t)=CH(y) - A(t) = C has Fy=1/b(y)F_y = 1/b(y), which is never zero on J0J_0, so it always defines yy locally there.

In plain words Separation often ends with an equation that links the two variables rather than a formula for yy. That equation is a valid answer wherever it defines yy as a differentiable function, and the initial value picks out the piece of its graph that the solution follows.

Example Take y′=−x/yy' = -x/y with y(0)=2y(0) = 2, where now xx is the independent variable and y′=dy/dxy' = dy/dx. The equation itself requires y≠0y \ne 0, so multiplying by yy loses nothing and gives yy′=−xyy' = -x. The left side is the derivative of 12y2\tfrac{1}{2}y^2, so 12y2=−12x2+C0\tfrac{1}{2}y^2 = -\tfrac{1}{2}x^2 + C_0, and the initial point gives C0=2C_0 = 2, that is

x2+y2=4.x^2 + y^2 = 4.

The whole circle is not the graph of one function. The initial value y(0)=2>0y(0) = 2 > 0 selects the upper half,

y=4−x2,y = \sqrt{4 - x^2},

and differentiating gives y′=−x/4−x2=−x/yy' = -x/\sqrt{4 - x^2} = -x/y, as required.

Solution interval

Definition A solution of an initial-value problem is a function on an open interval containing the initial time that takes the initial value, is differentiable and satisfies the equation at every point of that interval. The solution interval is the largest such interval for the selected solution, its maximal interval of existence. A formula can be defined on a larger set than the solution interval, or on a set that is not an interval, so the interval has to be read off separately. For a separated formula, look for the times where tt leaves II, where yy becomes unbounded, and where the values y(t)y(t) approach an end of J0J_0, such as a point where bb is zero or undefined. In the last case the separated formula stops, and whether the solution can be continued needs a separate check in the original equation.

In plain words After finding a formula, ask how far it can be followed from the initial time in each direction while it stays differentiable and keeps satisfying the equation.

Example The function y=3et2y = 3e^{t^2} solves y′=2tyy' = 2ty with y(0)=3y(0) = 3, since y′=6tet2=2t⋅3et2y' = 6te^{t^2} = 2t \cdot 3e^{t^2} for every real tt, so its solution interval is the whole line. Its derivative is negative for t<0t < 0 and positive for t>0t > 0, so it falls to its minimum value 33 at t=0t = 0 and rises afterward. For y′=2ty2y' = 2ty^2 with y(0)=1y(0) = 1, the family above gives C=−1C = -1 and

y=11−t2.y = \frac{1}{1 - t^2}.

This formula is defined for every t≠±1t \ne \pm 1, but the solution interval is (−1,1)(-1, 1), the interval containing 00, because yy becomes unbounded at both ends. The upper half circle y=4−x2y = \sqrt{4 - x^2} has solution interval (−2,2)(-2, 2). Its formula is defined on [−2,2][-2, 2], but at x=±2x = \pm 2 the value y=0y = 0 makes the right side −x/y-x/y undefined.

Check yourself

  1. Decide which of the equations y′=ty+ty' = ty + t, y′=et−yy' = e^{t - y} and y′=t+y2y' = t + y^2 are separable, and name the two factors when they are.
Show the answer

The first is separable, since ty+t=t(y+1)ty + t = t(y + 1) with a(t)=ta(t) = t and b(y)=y+1b(y) = y + 1, and it has the equilibrium y=−1y = -1. The second is separable, since et−y=ete−ye^{t - y} = e^t e^{-y}, and it has no equilibrium because e−ye^{-y} is never zero. The third is not separable. If t+y2=a(t)b(y)t + y^2 = a(t)b(y) held on a rectangle, then for two fixed times t1≠t2t_1 \ne t_2 the ratio (t1+y2)/(t2+y2)(t_1 + y^2)/(t_2 + y^2) would equal the constant a(t1)/a(t2)a(t_1)/a(t_2) wherever t2+y2≠0t_2 + y^2 \ne 0. But the ratio is 1+(t1−t2)/(t2+y2)1 + (t_1 - t_2)/(t_2 + y^2), which changes as y2y^2 changes.

  1. Solve the problem below, leaving the answer as a relation between tt and yy, and explain why that relation defines yy as a differentiable function of tt for every real tt.
y′=2t3y2+1,y(0)=1\begin{gathered} y' = \frac{2t}{3y^2 + 1}, \\[0.4em] y(0) = 1 \end{gathered}
Show the answer

The state factor 1/(3y2+1)1/(3y^2 + 1) is never zero, so there are no equilibria to set aside. Separating the variables gives

∫(3y2+1) dy=∫2t dt,\int (3y^2 + 1)\,dy = \int 2t\,dt,

so y3+y=t2+Cy^3 + y = t^2 + C, and y(0)=1y(0) = 1 gives C=2C = 2. The solution satisfies

y3+y=t2+2.y^3 + y = t^2 + 2.

The function g(y)=y3+yg(y) = y^3 + y has g′(y)=3y2+1>0g'(y) = 3y^2 + 1 > 0 and takes every real value, so for each tt there is exactly one yy with g(y)=t2+2g(y) = t^2 + 2. The derivative of the relation in yy, which is 3y2+13y^2 + 1, is never zero, so by the implicit function theorem this yy is a differentiable function of tt. Differentiating the relation gives back (3y2+1)y′=2t(3y^2 + 1)y' = 2t. The solution interval is the whole line, and for example y(1)y(1) is the real root of y3+y=3y^3 + y = 3, about 1.21341.2134.

  1. Solve y′=(y−2)2cos⁡ty' = (y - 2)^2\cos t with y(0)=1y(0) = 1 and give the solution interval. Which solution has y(0)=2y(0) = 2, and why does the separated formula not show it?
Show the answer

The zero of (y−2)2(y - 2)^2 gives the equilibrium y=2y = 2. For y≠2y \ne 2, separating the variables gives

−1y−2=sin⁡t+C.-\frac{1}{y - 2} = \sin t + C.

The initial value gives 1=0+C1 = 0 + C, so C=1C = 1 and

y=2−11+sin⁡t.y = 2 - \frac{1}{1 + \sin t}.

As a check, y′=cos⁡t/(1+sin⁡t)2y' = \cos t/(1 + \sin t)^2, which equals (y−2)2cos⁡t(y - 2)^2\cos t. The denominator vanishes where sin⁡t=−1\sin t = -1, and the zeros nearest to 00 are t=−π/2t = -\pi/2 and t=3π/2t = 3\pi/2, where y→−∞y \to -\infty. The solution interval is (−π/2,3π/2)(-\pi/2, 3\pi/2).

The problem with y(0)=2y(0) = 2 is solved by the equilibrium y=2y = 2, and since (y−2)2(y - 2)^2 is continuously differentiable it is the only solution. No value of CC in 2−1/(sin⁡t+C)2 - 1/(\sin t + C) gives the constant 22, because the fraction is never zero. The equilibrium was lost when the equation was divided by (y−2)2(y - 2)^2.

How this lesson connects