Articles

2.2: Separable Equations


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

[label{eq:2.2.1} h(y)y'=g(x),]

where the left side is a product of (y') and a function of (y) and the right side is a function of (x). Rewriting a separable differential equation in this form is called separation of variables. In Section 2.1, we used separation of variables to solve homogeneous linear equations. In this section we’ll apply this method to nonlinear equations.

To see how to solve Equation ef{eq:2.2.1}, let’s first assume that (y) is a solution. Let (G(x)) and (H(y)) be antiderivatives of (g(x)) and (h(y)); that is,

[label{eq:2.2.2} H'(y)=h(y) quad ext{and} quad G'(x)=g(x).]

Then, from the chain rule,

[{dover dx}H(y(x))=H'(y(x))y'(x)=h(y)y'(x). onumber ]

Therefore Equation ef{eq:2.2.1} is equivalent to

[{dover dx}H(y(x))={dover dx}G(x). onumber ]

Integrating both sides of this equation and combining the constants of integration yields

[label{eq:2.2.3} H(y(x))=G(x)+c.]

Although we derived this equation on the assumption that (y) is a solution of Equation ef{eq:2.2.1}, we can now view it differently: Any differentiable function (y) that satisfies Equation ef{eq:2.2.3} for some constant (c) is a solution of Equation ef{eq:2.2.1}. To see this, we differentiate both sides of Equation ef{eq:2.2.3}, using the chain rule on the left, to obtain

[H'(y(x))y'(x)=G'(x), onumber ]

which is equivalent to

[h(y(x))y'(x)=g(x) onumber ]

because of Equation ef{eq:2.2.2}.

In conclusion, to solve Equation ef{eq:2.2.1} it suffices to find functions (G=G(x)) and (H=H(y)) that satisfy Equation ef{eq:2.2.2}. Then any differentiable function (y=y(x)) that satisfies Equation ef{eq:2.2.3} is a solution of Equation ef{eq:2.2.1}.

Example (PageIndex{1})

Solve the equation

[y'=x(1+y^2). onumber ]

Solution

Separating variables yields

[{y'over 1+y^2}=x. onumber ]

Integrating yields

[ an^{-1}y={x^2over2}+c onumber ]

Therefore

[y= anleft({x^2over2}+c ight). onumber ]

Example (PageIndex{2})

  1. Solve the equation [label{eq:2.2.4} y'=-{xover y}.]
  2. Solve the initial value problem [label{eq:2.2.5} y'=-{xover y}, quad y(1)=1.]
  3. Solve the initial value problem [label{eq:2.2.6} y'=-{xover y}, quad y(1)=-2.]

Solution a

Separating variables in Equation ef{eq:2.2.4} yields

[yy'=-x. onumber ]

Integrating yields

[{y^2over2}=-{x^2over2}+c, quad ext{or equivalently} quad x^2+y^2=2c. onumber ]

The last equation shows that (c) must be positive if (y) is to be a solution of Equation ef{eq:2.2.4} on an open interval. Therefore we let (2c=a^2) (with (a > 0)) and rewrite the last equation as

[label{eq:2.2.7} x^2+y^2=a^2.]

This equation has two differentiable solutions for (y) in terms of (x):

[label{eq:2.2.8} y=phantom{-} sqrt{a^2-x^2}, quad -a < x < a,]

and

[label{eq:2.2.9} y= - sqrt{a^2-x^2}, quad -a < x < a.]

The solution curves defined by Equation ef{eq:2.2.8} are semicircles above the (x)-axis and those defined by Equation ef{eq:2.2.9} are semicircles below the (x)-axis (Figure (PageIndex{1})).

Solution b

The solution of Equation ef{eq:2.2.5} is positive when (x=1); hence, it is of the form Equation ef{eq:2.2.8}. Substituting (x=1) and (y=1) into Equation ef{eq:2.2.7} to satisfy the initial condition yields (a^2=2); hence, the solution of Equation ef{eq:2.2.5} is

[y=sqrt{2-x^2}, quad - sqrt{2}< x < sqrt{2}. onumber ]

Solution c

The solution of Equation ef{eq:2.2.6} is negative when (x=1) and is therefore of the form Equation ef{eq:2.2.9}. Substituting (x=1) and (y=-2) into Equation ef{eq:2.2.7} to satisfy the initial condition yields (a^2=5). Hence, the solution of Equation ef{eq:2.2.6} is

[y=- sqrt{5-x^2}, quad -sqrt{5} < x < sqrt{5}. onumber ]

Implicit Solutions of Separable Equations

In Examples (PageIndex{1}) and (PageIndex{2}) we were able to solve the equation (H(y)=G(x)+c) to obtain explicit formulas for solutions of the given separable differential equations. As we’ll see in the next example, this isn’t always possible. In this situation we must broaden our definition of a solution of a separable equation. The next theorem provides the basis for this modification. We omit the proof, which requires a result from advanced calculus called as the implicit function theorem.

Theorem (PageIndex{1}): implicit function theorem

Suppose (g=g(x)) is continous on ((a,b)) and (h=h(y)) are continuous on ((c,d).) Let (G) be an antiderivative of (g) on ((a,b)) and let (H) be an antiderivative of (h) on ((c,d).) Let (x_0) be an arbitrary point in ((a,b),) let (y_0) be a point in ((c,d)) such that (h(y_0) e0,) and define

[label{eq:2.2.10} c=H(y_0)-G(x_0).]

Then there’s a function (y=y(x)) defined on some open interval ((a_1,b_1),) where (ale a_1

[label{eq:2.2.11} H(y)=G(x)+c]

for (a_1

[label{eq:2.2.12} h(y)y'=g(x),quad y(x_0)=x_0.]

It’s convenient to say that Equation ef{eq:2.2.11} with (c) arbitrary is an implicit solution of (h(y)y'=g(x)). Curves defined by Equation ef{eq:2.2.11} are integral curves of (h(y)y'=g(x)). If (c) satisfies Equation ef{eq:2.2.10}, we’ll say that Equation ef{eq:2.2.11} is an implicit solution of the initial value problem Equation ef{eq:2.2.12}. However, keep these points in mind:

  • For some choices of (c) there may not be any differentiable functions (y) that satisfy Equation ef{eq:2.2.11}.
  • The function (y) in Equation ef{eq:2.2.11} (not Equation ef{eq:2.2.11} itself) is a solution of (h(y)y'=g(x)).

Example (PageIndex{3})

  1. Find implicit solutions of [label{eq:2.2.13} y'={2x+1over5y^4+1}.]
  2. Find an implicit solution of [label{eq:2.2.14} y'={2x+1over5y^4+1},quad y(2)=1.]

Solution a

Separating variables yields

[(5y^4+1)y'=2x+1. onumber ]

Integrating yields the implicit solution

[label{eq:2.2.15} y^5+y=x^2+x+ c. ]

of Equation ef{eq:2.2.13}.

Solution b

Imposing the initial condition (y(2)=1) in Equation ef{eq:2.2.15} yields (1+1=4+2+c), so (c=-4). Therefore

[y^5+y=x^2+x-4 onumber ]

is an implicit solution of the initial value problem Equation ef{eq:2.2.14}. Although more than one differentiable function (y=y(x)) satisfies Equation ef{eq:2.2.13} near (x=1), it can be shown that there is only one such function that satisfies the initial condition (y(1)=2). Figure (PageIndex{2}) shows a direction field and some integral curves for Equation ef{eq:2.2.13}.

Constant Solutions of Separable Equations

An equation of the form

[y'=g(x)p(y) onumber ]

is separable, since it can be rewritten as

[{1over p(y)}y'=g(x). onumber ]

However, the division by (p(y)) is not legitimate if (p(y)=0) for some values of (y). The next two examples show how to deal with this problem.

Example (PageIndex{4})

Find all solutions of

[label{eq:2.2.16} y'=2xy^2.]

Solution

Here we must divide by (p(y)=y^2) to separate variables. This isn’t legitimate if (y) is a solution of Equation ef{eq:2.2.16} that equals zero for some value of (x). One such solution can be found by inspection: (y equiv 0). Now suppose (y) is a solution of Equation ef{eq:2.2.16} that isn’t identically zero. Since (y) is continuous there must be an interval on which (y) is never zero. Since division by (y^2) is legitimate for (x) in this interval, we can separate variables in Equation ef{eq:2.2.16} to obtain

[{y'over y^2}=2x. onumber ]

Integrating this yields

[-{1over y}=x^2+c, onumber ]

which is equivalent to

[label{eq:2.2.17} y=-{1over x^2+c}.]

We’ve now shown that if (y) is a solution of Equation ef{eq:2.2.16} that is not identically zero, then (y) must be of the form Equation ef{eq:2.2.17}. By substituting Equation ef{eq:2.2.17} into Equation ef{eq:2.2.16}, you can verify that Equation ef{eq:2.2.17} is a solution of Equation ef{eq:2.2.16}. Thus, solutions of Equation ef{eq:2.2.16} are (yequiv0) and the functions of the form Equation ef{eq:2.2.17}. Note that the solution (yequiv0) isn’t of the form Equation ef{eq:2.2.17} for any value of (c).

Figure (PageIndex{3}) shows a direction field and some integral curves for Equation ef{eq:2.2.16}

Example (PageIndex{5})

Find all solutions of

[label{eq:2.2.18} y'={1over2}x(1-y^2). ]

Here we must divide by (p(y)=1-y^2) to separate variables. This isn’t legitimate if (y) is a solution of Equation ef{eq:2.2.18} that equals (pm1) for some value of (x). Two such solutions can be found by inspection: (y equiv 1) and (yequiv-1). Now suppose (y) is a solution of Equation ef{eq:2.2.18} such that (1-y^2) isn’t identically zero. Since (1-y^2) is continuous there must be an interval on which (1-y^2) is never zero. Since division by (1-y^2) is legitimate for (x) in this interval, we can separate variables in Equation ef{eq:2.2.18} to obtain

[{2y'over y^2-1}=-x. onumber ]

A partial fraction expansion on the left yields

[left[{1over y-1}-{1over y+1} ight]y'=-x, onumber ]

and integrating yields

[lnleft|{y-1over y+1} ight|=-{x^2over2}+k; onumber ]

hence,

[left|{y-1over y+1} ight|=e^ke^{-x^2/2}. onumber ]

Since (y(x) epm1) for (x) on the interval under discussion, the quantity ((y-1)/(y+1)) cannot change sign in this interval. Therefore we can rewrite the last equation as

[{y-1over y+1}=ce^{-x^2/2}, onumber ]

where (c=pm e^k), depending upon the sign of ((y-1)/(y+1)) on the interval. Solving for (y) yields

[label{eq:2.2.19} y={1+ce^{-x^2/2}over 1-ce^{-x^2/2}}. ]

We’ve now shown that if (y) is a solution of Equation ef{eq:2.2.18} that is not identically equal to (pm1), then (y) must be as in Equation ef{eq:2.2.19}. By substituting Equation ef{eq:2.2.19} into Equation ef{eq:2.2.18} you can verify that Equation ef{eq:2.2.19} is a solution of Equation ef{eq:2.2.18}. Thus, the solutions of Equation ef{eq:2.2.18} are (yequiv1), (yequiv-1) and the functions of the form Equation ef{eq:2.2.19}. Note that the constant solution (y equiv 1) can be obtained from this formula by taking (c=0); however, the other constant solution, (y equiv -1), cannot be obtained in this way.

Figure (PageIndex{4}) shows a direction field and some integrals for Equation ef{eq:2.2.18}.

Differences Between Linear and Nonlinear Equations

Theorem 2.1.2 states that if (p) and (f) are continuous on ((a,b)) then every solution of

[y'+p(x)y=f(x) onumber ]

on ((a,b)) can be obtained by choosing a value for the constant (c) in the general solution, and if (x_0) is any point in ((a,b)) and (y_0) is arbitrary, then the initial value problem

[y'+p(x)y=f(x),quad y(x_0)=y_0 onumber ]

has a solution on ((a,b)).

The not true for nonlinear equations. First, we saw in Examples (PageIndex{4}) and (PageIndex{5}) that a nonlinear equation may have solutions that cannot be obtained by choosing a specific value of a constant appearing in a one-parameter family of solutions. Second, it is in general impossible to determine the interval of validity of a solution to an initial value problem for a nonlinear equation by simply examining the equation, since the interval of validity may depend on the initial condition. For instance, in Example (PageIndex{2}) we saw that the solution of

[{dyover dx}=-{xover y},quad y(x_0)=y_0 onumber ]

is valid on ((-a,a)), where (a=sqrt{x_0^2+y_0^2}).

Example (PageIndex{6})

Solve the initial value problem

[y'=2xy^2, quad y(0)=y_0 onumber ]

and determine the interval of validity of the solution.

Solution

First suppose (y_0 e0). From Example (PageIndex{4}), we know that (y) must be of the form

[label{eq:2.2.20} y=-{1over x^2+c}.]

Imposing the initial condition shows that (c=-1/y_0). Substituting this into Equation ef{eq:2.2.20} and rearranging terms yields the solution

[y= {y_0over 1-y_0x^2}. onumber ]

This is also the solution if (y_0=0). If (y_0<0), the denominator isn’t zero for any value of (x), so the the solution is valid on ((-infty,infty)). If (y_0>0), the solution is valid only on ((-1/sqrt{y_0},1/sqrt{y_0})).


APEX Calculus

There are specific techniques that can be used to solve specific types of differential equations. This is similar to solving algebraic equations. In algebra, we can use the quadratic formula to solve a quadratic equation, but not a linear or cubic equation. In the same way, techniques that can be used for a specific type of differential equation are often ineffective for a differential equation of a different type. In this section, we describe and practice a technique to solve a class of differential equations called separable equations.

Definition 8.2.2 . Separable Differential Equation.

A is one that can be written in the form

where (n) is a function that depends only on the dependent variable (y ext<,>) and (m) is a function that depends only on the independent variable (x ext<.>)

Below, we show a few examples of separable differential equations, along with similar looking equations that are not separable.

  1. (displaystyle displaystyle frac= x^2y)
  2. (displaystyle displaystyle ysqrt frac- sin(x) cos(x) = 0)
  3. (displaystyle displaystyle frac= frac<(x^2 + 1)e^>)
  1. (displaystyle displaystyle frac= x^2 + y)
  2. (displaystyle displaystyle ysqrt frac- sin(x) cos y = 0)
  3. (displaystyle displaystyle frac= frac<(xy + 1)e^>)

Notice that a separable equation requires that the functions of the dependent and independent variables be multiplied, not added (like item 8.2.4:1 in List 8.2.4). An alternate definition of a separable differential equation states that an equation is separable if it can be written in the form

for some functions (f) and (g ext<.>)

Subsection 8.2.1 Separation of Variables

Let's find a formal solution to the separable equation

Since the functions on the left and right hand sides of the equation are equal, their antiderivatives should be equal up to an arbitrary constant of integration. That is

Though the integral on the left may look a bit strange, recall that (y) itself is a function of (x ext<.>) Consider the substitution (u = y(x) ext<.>) The differential is (du = displaystyle frac,dx ext<.>) Using this substitution, the above equation becomes

Let (N(u)) and (M(x)) be antiderivatives of (n(u)) and (m(x) ext<,>) respectively. Then

This relationship between (y) and (x) is an implicit form of the solution to the differential equation. Sometimes (but not always) it is possible to solve for (y) to find an explicit version of the solution.

Though the technique outlined above is formally correct, what we did essentially amounts to integrating the function (n) with respect to its variable and integrating the function (m) with respect to its variable. The informal way to solve a separable equation is to treat the derivative (displaystyle frac) as if it were a fraction. The separated form of the equation is

To solve, we integrate the left hand side with respect to (y) and the right hand side with respect to (x) and add a constant of integration. As long as we are able to find the antiderivatives, we can find an implicit form for the solution. Sometimes we are able to solve for (y) in the implicit solution to find an explicit form of the solution to the differential equation. We practice the technique by solving the three differential equations listed in the separable column above, and conclude by revisiting and finding the general solution to the logistic differential equation from Section 8.1.

Example 8.2.5 . Solving a Separable Differential Equation.

Find the general solution to the differential equation (yp = x^2y ext<.>)

Using the informal solution method outlined above, we treat (displaystyle frac) as a fraction, and write the separated form of the differential equation as

The indefinite integrals (int frac) and (int x^2, dx) both produce arbitrary constants. Since both constants are arbitrary, we combine them into a single constant of integration.

Integrating the left hand side of the equation with respect to (y) and the right hand side of the equation with respect to (x) yields

This is an implicit form of the solution to the differential equation. Solving for (y) yields an explicit form for the solution. Exponentiating both sides, we have

This solution is a bit problematic. First, the absolute value makes the solution difficult to understand. The second issue comes from our desire to find the general solution. Recall that a general solution includes all possible solutions to the differential equation. In other words, for any given initial condition, the general solution must include the solution to that specific initial value problem. We can often satisfy any given initial condition by choosing an appropriate (C) value. When solving separable equations, though, it is possible to lose solutions that have the form (y = ext< constant> ext<.>) Notice that (y=0) solves the differential equation, but it is not possible to choose a finite (C) to make our solution look like (y=0 ext<.>) Our solution cannot solve the initial value problem (displaystyle frac = x^2y ext<,>) with (y(a) = 0) (where (a) is any value). Thus, we haven't actually found a general solution to the problem. We can clean up the solution and recover the missing solution with a bit of clever thought.

Missing constant solutions can't always be recovered by cleverly redefining the arbitrary constant. The differential equation (yp = y^2 - 1) is an example of this fact. Both (y=1) and (y=-1) are constant solutions to this differential equation. Separation of variables yields a solution where (y=1) can be attained by choosing an appropriate (C) value, but (y=-1) can't. The general solution is the set containing the solution produced by separation of variables and the missing solution (y=-1 ext<.>) We should always be careful to look for missing constant solutions when seeking the general solution to a separable differential equation.

Recall the formal definition of the absolute value: (abs = y) if (y geq 0) and (abs = -y) if (y lt 0 ext<.>) Our solution is either (y = e^C e^<3>>) or (y = - e^C e^<<3>>> ext<.>) Further, note that (C) is constant, so (e^C) is also constant. If we write our solution as (y = Ae^<3>> ext<,>) and allow the constant (A) to take on either positive or negative values, we incorporate both cases of the absolute value. Finally, if we allow (A) to be zero, we recover the missing solution discussed above. The best way to express the general solution to our differential equation is

Example 8.2.6 . Solving a Separable Initial Value Problem.

Solve the initial value problem (displaystyle (ysqrt) yp - sin(x) cos(x) = 0 ext<,>) with (y(0) = -3 ext<.>)

We first put the differential equation in separated form

The indefinite integral (displaystyle int ysqrt,dy) requires the substitution (u = y^2-5 ext<.>) Using this substitute yields the antiderivative (displaystyle frac<1> <3>(y^2-5)^<3/2> ext<.>) The indefinite integral (displaystyle int sin(x) cos(x),dx) requires the substitution (u = sin(x) ext<.>) Using this substitution yields the antiderivative (displaystyle frac<1> <2>sin^2 x ext<.>) Thus, we have an implicit form of the solution to the differential equation given by

The initial condition says that (y) should be (-3) when (x) is (0 ext<,>) or

Evaluating the line above, we find (C = 8/3 ext<,>) yielding the particular solution to the initial value problem

Example 8.2.7 . Solving a Separable Differential Equation.

Find the general solution to the differential equation (displaystyle frac = frac<(x^2 + 1)e^> ext<.>)

We start by observing that there are no constant solutions to this differential equation because there are no constant (y) values that make the right hand side of the equation identically zero. Thus, we need not worry about losing solutions during the separation of variables process. The separated form of the equation is given by

The antiderivative of the left hand side requires Integration by Parts. Evaluating both indefinite integrals yields the implicit solution

Since we cannot solve for (y ext<,>) we cannot find an explicit form of the solution.

Example 8.2.8 . Solving the Logistic Differential Equation.

Solve the logistic differential equation (displaystyle frac

= kyleft( 1 - frac ight))

We looked at a slope field for this equation in Section 8.1 in the specific case of (k = M = 1 ext<.>) Here, we use separation of variables to find an analytic solution to the more general equation. Notice that the independent variable (t) does not explicitly appear in the differential equation. We mentioned that an equation of this type is called autonomous. All autonomous first order differential equations are separable.

We start by making the observation that both (y=0) and (y = M) are constant solutions to the differential equation. We must check that these solutions are not lost during the separation of variables process. The separated form of the equation is

The antiderivative of the left hand side of the equation can be found by making use of partial fractions. Using the techniques discussed in Section 6.5, we write

Then an implicit form of the solution is given by

Similarly to Example 8.2.5, we can write

Letting (A) take on positive values or negative values incorporates both cases of the absolute value. This is another implicit form of the solution. Solving for (y) gives the explicit form

where (b) is an arbitrary constant. Notice that (b=0) recovers the constant solution (y = M ext<.>) The constant solution (y=0) cannot be produced with a finite (b) value, and has been lost. The general solution the logistic differential equation is the set containing (displaystyle y = frac<1 + be^<-kt>>) and (y=0 ext<.>)

Solving for (y) initially yields the explicit solution (displaystyle y = frac<>><1+Ae^> ext<.>) Dividing numerator and denominator by (Ae^) and defining (b = 1/A) yields the commonly presented form of the solution given in Example 8.2.8.

Exercises 8.2.2 Exercises

Problems

In the following exercises, decide whether the differential equation is separable or not separable. If the equation is separable. write it in separated form.

(displaystyle xyp + x^2y = frac)

(displaystyle (y + 3)yp + (ln(x)) yp - xsin y = (y+3)ln(x))

(displaystyle yp -x^2cos y + y = cos y - x^2 y)

In the following exercises, find the general solution to the separable differential equation. Be sure to check for missing constant solutions.

(displaystyle e^xy yp = e^ <-y>+ e^<-2x - y>)

(displaystyle (x^2 + 1) yp = frac)

In the following exercises, find the particular solution to the separable initial value problem.

(displaystyle yp = frac ext<,>) with (y(0) = displaystyle frac<2>)


2.2: Separable Equations

We have seen how one can start with an equation that relates two variables, and implicitly differentiate with respect to one of them to reveal an equation that relates the corresponding derivatives.

Now, consider this process in reverse!

Suppose we have some equation that involves the derivative of some variable. Can we get back to an equation that implicitly defines the variable whose derivative we see?

An example will make this question more concrete. Suppose we know the following:

We ask is it possible to find some $y$ as a (possibly implicitly-defined) function of $x$, that makes the above true?

Given the presence of the derivative, we call equations like the one above a differential equation, and finding the function $y$ (i.e., the variable/function whose derivative appears) -- even if we only define it implicitly -- is referred to as solving the differential equation in question.

Practical applications of differential equations abound, so we are frequently interested in finding their solutions. Some types of differential equations are solved in very straight-forward ways others require more sophisticated techniques. In this first exposure to differential equations, we focus on the former.

In a separable differential equation the equation can be rewritten in terms of differentials where the expressions involving $x$ and $y$ are separated on opposite sides of the equation, respectively.

Specifically, we require a product of $dx$ and a function of $x$ on one side and a product of $dy$ and a function of $y$ on the other. From there, one simply finds antiderivatives of both sides to recover the equation that implicitly defines the variable sought.

The following provides two specific examples of solving separable differential equations. Let us start with the example differential equations we saw above:

Example

Solution:

First, we multiply everything by the differential $dx$ and then subtract $cos x , dx$ from both sides to obtain $3y^2 , dy = -cos x , dx$. From there, we simply integrate both sides

$int 3y^2 , dy = -int cos x , dx$

to obtain the following equation (where $C$ is an arbitrary constant) which implicitly defines $y$ in terms of $x$.

Are you wondering why there is only one arbitrary constant $C$ written on the right, when integrating each side directly tells us $y^3 + C_1 = -sin x + C_2$ for any constants $C_1$ and $C_2$?

Note that, in the interests of simplification and after integrating both sides of an equation, we can always move both constants to one side -- say the right side. Here, that gives us $y^3 = -sin x + (C_2 - C_1)$. Then, note that if $C_2$ and $C_1$ are allowed to be any constants, than $C_2 - C_1$ is effectively just some arbitrary constant too. With this in mind, we write the arbitrary constant this difference represents as $C$.

Now in this particular case, note that we can easily solve for $y$ to obtain an explicit definition for $y$ as a function of $x$, as seen below. $y = sqrt[3]<-sin x + C>$

However, solving for $y$ explicitly will often be difficult when dealing with differential equations, and we are frequently content to describe the variable in question ($y$ here) implicitly. Granted, as shown below, we might clean things up a bit by isolating the constant on one side -- although this is not necessary.

Example

Solution:

Here, separating the $x$ and $y$ variables requires we first factor things.

Now, we can get write things in terms of differentials where the $x$ and $dx$ appear on one side of the equation and $y$ and $dy$ appear on the other, so that we can integrate both sides, as shown below.

We should realize that splitting each fraction allows us to easily integrate via the power rule.

$int (3y^ <-2>+ 1) , dy = int (x^ <-4>+ x^<-2>) , dx$

Then, upon integrating, we arrive at an implicit definition for $y$.

Cleaning this equation up by writing things with positive exponents and isolating the $C$ on one side, we arrive at our solution.

The above two examples demonstrate how to find the general solution to a separable differential equation. However, with additional information we can also find a particular solution to this type of differential equation.

That is to say, we can find the solution with a particular value of $C$ that makes the additional information also true.

Consider the following example.

Example

Find the particular solution to $displaystyle = (sin^2 y)(x^4 + 1)>$ satisfying $displaystyle<4>>$.

Solution:

First, we separate the factors relating to $x$ and $y$ to opposite sides,

Then, we integrate both sides.

Note a $u$-substitution is required on the left. A good choice for this substitution is $u = sin y$, allow us to write

As for the right integral, note that splitting the fraction let's us integrate easily with the power rule.

$int frac dx = int (x^2 + x^<-2>) , dx = frac<1><3>x^3 - frac<1> + C_2 quad extrm < for some constant >C_2$

Putting these last two calculations together tells us the general solution for this differential equation -- that $y$ is implicitly defined by an equation that takes the following form for some constant $C$.

Finally, we use the given additional information that $displaystyle<4>>$ to find the constant $C$.

Substituting this in our general solution above gives the particular solution we hoped to find:


Copy & Paste this embed code into your website’s HTML

Last reply by: Dr. William Murray
Mon Apr 4, 2016 11:44 AM

Post by Shih-Kuan Chen on March 31, 2016

In example 4, why isn't y equal to + or - that whole business?

Last reply by: Dr. William Murray
Mon Jan 4, 2016 12:29 PM

Post by Jonathan Snow on December 22, 2015

I have a quick question about the plus or minus K in example 1, why is it plus or minus? If k=e^c, k can't be a negative number right?

Last reply by: Dr. William Murray
Fri Oct 30, 2015 4:14 PM

Post by Aisha Alkaff on October 29, 2015

Hello Dr. Murray,
Thank you for your clear explanation. It really helped me a lot.

but i have a question in Example 2:
why wouldn't we just simplify y^2 byt taking the square root?

Last reply by: Dr. William Murray
Sun May 3, 2015 7:38 PM

Post by Tsz Hong Chow on April 29, 2015

Hi, have you taught Bernoulli equations? I badly need this lecture

Last reply by: Dr. William Murray
Mon Aug 25, 2014 6:42 PM

Post by Joseph Green on August 24, 2014

will there be any practice problems added to this lecture?

Last reply by: Dr. William Murray
Sat Jul 5, 2014 6:07 PM

Post by Josh Winfield on June 30, 2014

Why do you not write y' and y as functions of x, but you clearly do for the "coefficients" P(x) and Q(x), it bugs me a little. Is it because you want to highlight that y and y' are the variables your solving for, or just to make the equation a tad more clean. I can't help but leave y and y' as functions of x when i do all problems, is this incorrect?

Last reply by: Dr. William Murray
Tue Feb 25, 2014 4:49 PM

Post by Ahmed Obbad on February 24, 2014

Hi professor, could you please explain me why the additive constant does not satisfy the differential equation while the multiplicative constant do? what if we keep it as Y=e^(x/2+ c)is this wrong?

Last reply by: Dr. William Murray
Tue Jan 14, 2014 11:47 AM

Post by cigdem drahman ozkan on January 8, 2014

Hi professor, Could you kindly explain me in second example, why we just ignore 2C? and wrote as new constant K?

Last reply by: Dr. William Murray
Fri Jul 5, 2013 10:19 AM

Post by xueping liu on July 2, 2013

Hi Dr.Murray
Your videos are awesome.They helped so much. But I also want to find some exercises for the related topic without buying those books. Do you have any suggestions?

Last reply by: Dr. William Murray
Tue Apr 16, 2013 8:32 PM

Post by Mohammed Alhumaidi on April 6, 2013

This is an enjoyable experience, at least I do understand something now rather than in class lecturing, why is it the case though Prof, Murray


Example 3

Solve the initial value problem $frac = (1 - 2x)y^2$ where $y(0) = -frac<1><6>$ . Determine the interval of validity for this solution.

This differential equation can be rewritten and solved for as follows:

Now since $y(0) = -frac<1><6>$ we have that $C = 6$ and so:

To prevent the denominator from equalling zero in our solution, we have that $x eq -2$ and $x eq 3$ . Note that $x = 0$ provides out initial value $y(0) = -frac<1><6>$ and so our interval of validity must contain $x = 0$ so $(-2, 3)$ is our interval of validity.


A Vibrating Spring Held Fixed Between Two Points

As discussed in Section 2.1, the solutions to the string example (u(x,t)) for all (x) and (t) would be assumed to be a product of two functions: (X(x)) and (T(t)), where (X(x)) is a function of only (x), not (t) and (T(t)) is a function of (t), but not (x).

Substitute Equation ( ef<2.2.1>) into the one-dimensional wave equation (Equation ( ef<2.1.1>)) gives

Since ( X ) is not a function of (t) and (T) is not a function of (x), Equation ( ef<2.2.2>) can be simplified

Collecting the expressions that depend on (x) on the left side of Equation ( ef<2.2.3>) and of (t) on the right side results in

Equation ( ef<2.2.3a>) is an interesting equation since each side can be set to a fixed constant (K) as that is the only solution that works for all values of (t) and (x). Therefore, the equation can be separated into two ordinary differential equations:

Hence, by substituting the new product solution form (Equation ef<2.2.1>) into the original wave equation (Equation ( ef<2.1.1>)), we converted a partial differential equation of two variables ((x) and (t)) into two ordinary differential equations (differential equation containing a function or functions of one independent variable and its derivatives). Each differential equation involves only one of the independent variables ((x) or (t)).

  • If (K=0), then the solution is the trivial (u(x,y,)=0) solution (i.e., no wave exists).
  • If (K > 0), then the general solution of Equation ( ef<2.2.4b>) is [ X(x) = A e^x> + B e^<-sqrtx> label<2.2.5>]

At this stage, Equation ( ef<2.2.5>) implies that the solution to the two ordinary differential wave equations will be an infinite number of waves with no quantization to limit those that are allowed (i.e., any values of (A) and (B) are possible). Narrowing down the general solution to a specific solution occurs when taking the boundary conditions into account.

The boundary conditions for this problem is that the wave amplitude equal to zero at the ends of the string

Applying the two boundary conditions in Equations ( ef<2.2.6a>) and ( ef<2.2.6b>) into the general solution in Equation ( ef<2.2.5>) results into relationships between (A) and (B):

Ignore the trivial Solution

One solution to this is that (A = B = 0), but this is the trivial solution from (K=0) and one we ignore since it provides no physical solution to the problem other than the knowledge that (0=0), which is not that inspiring of a result.

Both Equations ( ef<2.2.4a>) and ( ef<2.2.4b>) can be generalized into the following equations

where (k) is a real constant (i.e., not complex). Equation ( ef<2.2.8>) is a homogeneous second order linear differential equation. The general solution to these types of differential equations has the form

where (alpha) is a constant to be determined by the constraints of system. Substituting Equation ( ef<2.2.9>) into Equation ( ef<2.2.8>) results in

[ left( alpha^2 - k^2 ight)y(x)=0 label<2.2.10>]

For this equation to be satisfied, either

The later is the trivial solution and is ignored and therefore

Hence, there are two solutions to the general Equation ( ef<2.2.8>), as expected for a second order differential equation (first order differential equations have one solution), which are a result from substituting the (alpha) values from Equation ( ef<2.2.12>) into Equation ( ef<2.2.9>)

The general solution can then be any linear combination of these two equations

Example (PageIndex<1>): General Solution

The strategy is to search for a solution of the form

The reason for this is that long ago some geniuses figured this stuff out and it works. Now calculate derivatives

Substituting into the differential equation gives

[ egin alpha ^2 + 3alpha - 4 &= 0 [4pt] (alpha - 1)(alpha + 4) &= 0 [4pt] alpha &= 1 end]

We can conclude that two solutions are

It is easy to verify that if ( y_1) and (y_2) are solutions to

[ y= c_1y_1 + c_2y_2 onumber]

is also a solution. More specifically we can conclude that

Represents a two dimensional family (vector space) of solutions. Later we will prove that this is the most general description of the solution space.

Example (PageIndex<2>): Boundary Conditions

As before we seek solutions of the form

Now calculate derivatives

Substituting into the differential equation gives

We can conclude that two solutions are

Represents a two dimensional family (a "vector space") of solutions. Now use the initial conditions to find that

Plugging in the initial condition with (y'), gives

This is a system of two equations and two unknowns. We can use linear algebra to arrive at

When (K > 0), the general solutions of Equations ( ef<2.2.4a>) and ( ef<2.2.4b>) are oscillatory in time and space, respectively, as discussed in the following section.


Separable Equations

A first order differential equation (y’ = fleft( ight)) is called a separable equation if the function (fleft( ight)) can be factored into the product of two functions of (x) and (y:)

[fleft( ight) = pleft( x ight)hleft( y ight),]

where (pleft( x ight)) and (hleft( y ight)) are continuous functions.

Considering the derivative () as the ratio of two differentials (><> ormalsize>,) we move (dx) to the right side and divide the equation by (hleft( y ight):)

Of course, we need to make sure that (hleft( y ight) e 0.) If there’s a number () such that (hleft( <> ight) = 0,) then this number will also be a solution of the differential equation. Division by (hleft( y ight)) causes loss of this solution.

By denoting (qleft( y ight) = <> ormalsize>,) we write the equation in the form

[qleft( y ight)dy = pleft( x ight)dx.]

We have separated the variables so now we can integrate this equation:

where (C) is an integration constant.

Calculating the integrals, we get the expression

[Qleft( y ight) = Pleft( x ight) + C,]

representing the general solution of the separable differential equation.


First-order differential equations

Summary

An easy type of first-order ODE to solve is a separable equation , one that can be written in the form d y d x = f ( x ) g ( y ) , where f denotes a function of x alone and g denotes a function of y alone. “Separating the variables” leads to the equation ∫ d y g ( y ) = ∫ f ( x ) d x . It is possible that you cannot carry out one of the integrations in terms of elementary functions or you may wind up with an implicit solution. Furthermore, the process of separation of variables may introduce singular solutions.

Another important type of first-order ODE is a linear equation, one that can be written in the form a 1 ( x ) y ′ + a 0 ( x ) y = f ( x ) , where a 1 ( x ) , a 0 ( x ) , and f ( x ) are functions of the independent variable x alone. The standard form of such an equation is d y d x + P ( x ) y = Q ( x ) . The equation is called homogeneous if Q ( x ) ≡ 0 and nonhomogeneous otherwise. Any homogeneous linear equation is separable.

After writing a first-order linear equation in the standard form d y d x + P ( x ) y = Q ( x ) , we can solve it by the method of variation of parameters or by introducing an integrating factor, μ ( x ) = e ∫ P ( x ) d x .

A typical first-order differential equation can be written in the form d y d x = f ( x , y ) . Graphically, this tells us that at any point ( x , y ) on a solution curve of the equation, the slope of the tangent line is given by the value of the function f at that point. We can outline the solution curves by using possible tangent line segments. Such a collection of tangent line segments is called a direction field or slope field of the equation. The set of points ( x , y ) such that f ( x , y ) = C , a constant, defines an isocline, a curve along which the slopes of the tangent lines are all the same (namely, C). In particular, the nullcline (or zero isocline) is a curve consisting of points at which the slopes of solution curves are zero. A differential equation in which the independent variable does not appear explicitly is called an autonomous equation. If the independent variable does appear, the equation is called nonautonomous. For an autonomous equation the slopes of the tangent line segments that make up the slope field depend only on the values of the dependent variable. Graphically, if we fix the value of the dependent variable, say x, by drawing a horizontal line x = C for any constant C, we see that all the tangent line segments along this line have the same slope, no matter what the value of the independent variable, say t. Another way to look at this is to realize that we can generate infinitely many solutions by taking any one solution and translating (shifting) its graph left or right. Even when we can't solve an equation, an analysis of its slope field can be very instructive. However, such a graphical analysis may miss certain important features of the integral curves, such as vertical asymptotes.

An autonomous first-order equation can be analyzed qualitatively by using a phase line or phase portrait. For an autonomous equation the points x such that d y d x = f ( x ) = 0 are called critical points. We also use the terms equilibrium points, equilibrium solutions, and stationary points to describe these key values. There are three kinds of equilibrium points for an autonomous first-order equation: sinks, sources, and nodes. An equilibrium solution y is a sink (or asymptotically stable solution) if solutions with initial conditions “sufficiently close” to y approach y as the independent variable tends to infinity. On the other hand, if solutions “sufficiently close” to an equilibrium solution y are asymptotic to y as the independent variable tends to negative infinity, then we call y a source (or unstable equilibrium solution). An equilibrium solution that shows any other kind of behavior is called a node (or semistable equilibrium solution). The First Derivative Test is a simple (but not always conclusive) test to determine the nature of equilibrium points.

Suppose that we have an autonomous differential equation with a parameter α. A bifurcation point α 0 is a value of the parameter that causes a change in the nature of the equation's equilibrium solutions as α passes through the value α 0 . There are three main types of bifurcation for a first-order equation: (1) pitchfork bifurcation (2) saddle-node bifurcation and (3) transcritical bifurcation.

When we are trying to solve a differential equation, especially an IVP, it is important to understand whether the problem has a solution and whether any solution is unique. The Existence and Uniqueness Theorem provides simple sufficient conditions that guarantee that there is one and only one solution of an IVP. A standard proof of this result involves successive approximations, or Picard iterations.


APEX Calculus

There are specific techniques that can be used to solve specific types of differential equations. This is similar to solving algebraic equations. In algebra, we can use the quadratic formula to solve a quadratic equation, but not a linear or cubic equation. In the same way, techniques that can be used for a specific type of differential equation are often ineffective for a differential equation of a different type. In this section, we describe and practice a technique to solve a class of differential equations called separable equations.

Figure 8.2.1 . Video introduction to Section 8.2

Definition 8.2.2 . Separable Differential Equation.

A is one that can be written in the form

where (n) is a function that depends only on the dependent variable (y ext<,>) and (m) is a function that depends only on the independent variable (x ext<.>)

Below, we show a few examples of separable differential equations, along with similar looking equations that are not separable.

  1. (displaystyle displaystyle frac= x^2y)
  2. (displaystyle displaystyle ysqrt frac- sin(x) cos(x) = 0)
  3. (displaystyle displaystyle frac= frac<(x^2 + 1)e^>)
  1. (displaystyle displaystyle frac= x^2 + y)
  2. (displaystyle displaystyle ysqrt frac- sin(x) cos y = 0)
  3. (displaystyle displaystyle frac= frac<(xy + 1)e^>)

Notice that a separable equation requires that the functions of the dependent and independent variables be multiplied, not added (like item 8.2.4:1 in List 8.2.4). An alternate definition of a separable differential equation states that an equation is separable if it can be written in the form

for some functions (f) and (g ext<.>)

Subsection 8.2.1 Separation of Variables

Let's find a formal solution to the separable equation

Since the functions on the left and right hand sides of the equation are equal, their antiderivatives should be equal up to an arbitrary constant of integration. That is

Though the integral on the left may look a bit strange, recall that (y) itself is a function of (x ext<.>) Consider the substitution (u = y(x) ext<.>) The differential is (du = displaystyle frac,dx ext<.>) Using this substitution, the above equation becomes

Let (N(u)) and (M(x)) be antiderivatives of (n(u)) and (m(x) ext<,>) respectively. Then

This relationship between (y) and (x) is an implicit form of the solution to the differential equation. Sometimes (but not always) it is possible to solve for (y) to find an explicit version of the solution.

Though the technique outlined above is formally correct, what we did essentially amounts to integrating the function (n) with respect to its variable and integrating the function (m) with respect to its variable. The informal way to solve a separable equation is to treat the derivative (displaystyle frac) as if it were a fraction. The separated form of the equation is

To solve, we integrate the left hand side with respect to (y) and the right hand side with respect to (x) and add a constant of integration. As long as we are able to find the antiderivatives, we can find an implicit form for the solution. Sometimes we are able to solve for (y) in the implicit solution to find an explicit form of the solution to the differential equation. We practice the technique by solving the three differential equations listed in the separable column above, and conclude by revisiting and finding the general solution to the logistic differential equation from Section 8.1.

Example 8.2.5 . Solving a Separable Differential Equation.

Find the general solution to the differential equation (yp = x^2y ext<.>)

Using the informal solution method outlined above, we treat (displaystyle frac) as a fraction, and write the separated form of the differential equation as

The indefinite integrals (int frac) and (int x^2, dx) both produce arbitrary constants. Since both constants are arbitrary, we combine them into a single constant of integration.

Integrating the left hand side of the equation with respect to (y) and the right hand side of the equation with respect to (x) yields

This is an implicit form of the solution to the differential equation. Solving for (y) yields an explicit form for the solution. Exponentiating both sides, we have

This solution is a bit problematic. First, the absolute value makes the solution difficult to understand. The second issue comes from our desire to find the general solution. Recall that a general solution includes all possible solutions to the differential equation. In other words, for any given initial condition, the general solution must include the solution to that specific initial value problem. We can often satisfy any given initial condition by choosing an appropriate (C) value. When solving separable equations, though, it is possible to lose solutions that have the form (y = ext< constant> ext<.>) Notice that (y=0) solves the differential equation, but it is not possible to choose a finite (C) to make our solution look like (y=0 ext<.>) Our solution cannot solve the initial value problem (displaystyle frac = x^2y ext<,>) with (y(a) = 0) (where (a) is any value). Thus, we haven't actually found a general solution to the problem. We can clean up the solution and recover the missing solution with a bit of clever thought.

Missing constant solutions can't always be recovered by cleverly redefining the arbitrary constant. The differential equation (yp = y^2 - 1) is an example of this fact. Both (y=1) and (y=-1) are constant solutions to this differential equation. Separation of variables yields a solution where (y=1) can be attained by choosing an appropriate (C) value, but (y=-1) can't. The general solution is the set containing the solution produced by separation of variables and the missing solution (y=-1 ext<.>) We should always be careful to look for missing constant solutions when seeking the general solution to a separable differential equation.

Recall the formal definition of the absolute value: (abs = y) if (y geq 0) and (abs = -y) if (y lt 0 ext<.>) Our solution is either (y = e^C e^<3>>) or (y = - e^C e^<<3>>> ext<.>) Further, note that (C) is constant, so (e^C) is also constant. If we write our solution as (y = Ae^<3>> ext<,>) and allow the constant (A) to take on either positive or negative values, we incorporate both cases of the absolute value. Finally, if we allow (A) to be zero, we recover the missing solution discussed above. The best way to express the general solution to our differential equation is

Example 8.2.6 . Solving a Separable Initial Value Problem.

Solve the initial value problem (displaystyle (ysqrt) yp - sin(x) cos(x) = 0 ext<,>) with (y(0) = -3 ext<.>)

We first put the differential equation in separated form

The indefinite integral (displaystyle int ysqrt,dy) requires the substitution (u = y^2-5 ext<.>) Using this substitute yields the antiderivative (displaystyle frac<1> <3>(y^2-5)^<3/2> ext<.>) The indefinite integral (displaystyle int sin(x) cos(x),dx) requires the substitution (u = sin(x) ext<.>) Using this substitution yields the antiderivative (displaystyle frac<1> <2>sin^2 x ext<.>) Thus, we have an implicit form of the solution to the differential equation given by

The initial condition says that (y) should be (-3) when (x) is (0 ext<,>) or

Evaluating the line above, we find (C = 8/3 ext<,>) yielding the particular solution to the initial value problem

Example 8.2.7 . Solving a Separable Differential Equation.

Find the general solution to the differential equation (displaystyle frac = frac<(x^2 + 1)e^> ext<.>)

We start by observing that there are no constant solutions to this differential equation because there are no constant (y) values that make the right hand side of the equation identically zero. Thus, we need not worry about losing solutions during the separation of variables process. The separated form of the equation is given by

The antiderivative of the left hand side requires Integration by Parts. Evaluating both indefinite integrals yields the implicit solution

Since we cannot solve for (y ext<,>) we cannot find an explicit form of the solution.

Example 8.2.8 . Solving the Logistic Differential Equation.

Solve the logistic differential equation (displaystyle frac

= kyleft( 1 - frac ight))

We looked at a slope field for this equation in Section 8.1 in the specific case of (k = M = 1 ext<.>) Here, we use separation of variables to find an analytic solution to the more general equation. Notice that the independent variable (t) does not explicitly appear in the differential equation. We mentioned that an equation of this type is called autonomous. All autonomous first order differential equations are separable.

We start by making the observation that both (y=0) and (y = M) are constant solutions to the differential equation. We must check that these solutions are not lost during the separation of variables process. The separated form of the equation is

The antiderivative of the left hand side of the equation can be found by making use of partial fractions. Using the techniques discussed in Section 6.5, we write

Then an implicit form of the solution is given by

Similarly to Example 8.2.5, we can write

Letting (A) take on positive values or negative values incorporates both cases of the absolute value. This is another implicit form of the solution. Solving for (y) gives the explicit form

where (b) is an arbitrary constant. Notice that (b=0) recovers the constant solution (y = M ext<.>) The constant solution (y=0) cannot be produced with a finite (b) value, and has been lost. The general solution the logistic differential equation is the set containing (displaystyle y = frac<1 + be^<-kt>>) and (y=0 ext<.>)

Solving for (y) initially yields the explicit solution (displaystyle y = frac<>><1+Ae^> ext<.>) Dividing numerator and denominator by (Ae^) and defining (b = 1/A) yields the commonly presented form of the solution given in Example 8.2.8.

Exercises 8.2.2 Exercises

In the following exercises, decide whether the differential equation is separable or not separable. If the equation is separable. write it in separated form.


Want to learn more about Differential Equations? I have a step-by-step course for that. :)

Solve the differential equation.

First, we’ll write the equation in Leibniz notation. This makes it easier for us to separate the variables.

Next, we’ll separate the variables, collecting . y. ’s on the left and . x. ’s on the right.

Sometimes in our final answer, we’ll be able to express y explicitly as a function of x, but not always.

With variables separated, and integrating both sides, we get

Note: You can leave out the constant of integration on the left side, because in future steps it would be absorbed into the constant on the right side.

Note: We just multiplied through both sides by . -1. but we didn’t change the sign on . C. because the negative can always be absorbed into the constant.

Sometimes we’ll encounter separable differential equations with initial conditions provided. Using the same method we used in the last example, we can find the general solution, and then plug in the initial condition(s) to find a particular solution to the differential equation.


Watch the video: Math 24 Separable Equations (November 2021).