Solving separable differential equations

 
 
 
 
 

Form of a separable differential equation

We saw that first order linear equations are differential equations in the form

dydx+P(x)y=Q(x)\frac{dy}{dx}+P(x)y=Q(x)

In contrast, first order separable differential equations are equations in the form

N(y)dydx=M(x)N(y)\frac{dy}{dx}=M(x)

N(y)y=M(x)N(y)y'=M(x)

Krista King Math.jpg

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 

We call these “separable” equations because we can separate the variables onto opposite sides of the equation. In other words, we can put the xx terms on the right and the yy terms on the left, or vice versa, with no mixing.

Notice that the two previous equations above representing a separable differential equation are identical, except for the derivative term, which is represented by dy/dxdy/dx in the first equation and by yy' in the second equation.

When we’re working with separable differential equations, we usually prefer the dy/dxdy/dx notation (Leibniz notation), because this notation makes it easier to see how to separate variables. Starting with dy/dxdy/dx, we move the dxdx notation to the right, leaving just the dydy notation on the left:

N(y) dy=M(x) dxN(y)\ dy=M(x)\ dx

How to solve separable equations

Most often, we’ll be given equations in the form

N(y)dydx=M(x)N(y)\frac{dy}{dx}=M(x)

Here’s the standard process we’ll follow to find a solution to this separable differential equation. First, we’ll separate variables by moving the dxdx to the right side.

N(y) dy=M(x) dxN(y)\ dy=M(x)\ dx

With variables separated, we’ll integrate both sides of the equation.

N(y) dy=M(x) dx\int N(y)\ dy=\int M(x)\ dx

Normally when we evaluate an indefinite integral, we need to add in a constant of integration. So after integrating, we would expect to have something like

N(y)+C1=M(x)+C2\bold{N}(y)+C_1=\bold{M}(x)+C_2

where N(y)\bold{N}(y) is the integral of N(y)N(y), and M(x)\bold{M}(x) is the integral of M(x)M(x). But when we solve for N(y)\bold{N}(y), we get

N(y)=M(x)+C2C1\bold{N}(y)=\bold{M}(x)+C_2-C_1

What we have to realize here is that, if C2C_2 and C1C_1 are constants, then C2C1C_2-C_1 is also a constant. So we can make a substitution and represent C2C1C_2-C_1 as just one simple constant CC.

N(y)=M(x)+C\bold{N}(y)=\bold{M}(x)+C

For this reason, we don’t need to bother adding constants to both sides of the equation when we integrate. Instead of integrating to N(y)+C1=M(x)+C2\bold{N}(y)+C_1=\bold{M}(x)+C_2, we can always skip these intermediate steps and go straight to N(y)=M(x)+C\bold{N}(y)=\bold{M}(x)+C.

Once we have the equation in this form, the goal will be to express yy explicitly as a function of xx, meaning that our solution equation is solved for yy, like y=f(x)y=f(x). Sometimes we won’t be able to get yy by itself on one side of the equation, and that’s okay. If we can’t, we’ll just settle for an implicit function, which means that yy and xx aren’t separated onto opposite sides of the solution.

In summary, our solution steps will be:

  1.  If necessary, rewrite the equation in Leibniz notation.

  2.  Separate variables with yy terms on the left and xx terms on the right

  3.  Integrate both sides of the equation, adding CC to the right side

  4.  If possible, solve the solution equation specifically for yy.

 
 

Four steps to solve every separable differential equation


 
Krista King Math Signup.png
 
Differential Equations course.png

Take the course

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

 
 

 
 

Finding the solution of a separable differential equation

Let’s work through an example so that we can see these steps in action.

Example

Find the solution of the separable differential equation.

y=y2sinxy'=y^2\sin{x}

Let’s write the equation in Leibniz notation, changing yy' to dy/dxdy/dx.

dydx=y2sinx\frac{dy}{dx}=y^2\sin{x}

Separate the variables, collecting yy terms on the left and xx terms on the right.

dy=y2sinx dxdy=y^2\sin{x}\ dx

1y2 dy=sinx dx\frac{1}{y^2}\ dy=\sin{x}\ dx

Sometimes we won’t be able to get y by itself on one side of the equation, and that’s okay.

With variables separated, and integrating both sides, we get

1y2 dy=sinx dx\int \frac{1}{y^2}\ dy=\int \sin{x}\ dx

y2 dy=sinx dx\int y^{-2}\ dy=\int \sin{x}\ dx

y1=cosx+C-y^{-1}=-\cos{x}+C

1y=cosx+C-\frac{1}{y}=-\cos{x}+C

1y=cosx+C\frac{1}{y}=\cos{x}+C

Notice how we just multiplied through the equation by 1-1, but we didn’t change the sign on CC. That’s because keeping CC is a little simpler than C-C, and we’ll still end up with the same solution equation either way.

Finally, solving for yy gives the solution to the separable differential equation.

1=y(cosx+C)1=y(\cos{x}+C)

y=1cosx+Cy=\frac{1}{\cos{x}+C}


 
Krista King.png
 

Get access to the complete Differential Equations course