Skip to main content
Mathovia

Calculus / Calculus 2 · Differential Equations

Separable Differential Equations

A separable differential equation can be split so that every y is on one side and every x is on the other. Then you integrate both sides, and the differential equation becomes an ordinary equation you can solve for y.

Practice Problems
Written by
MPhil in Mathematics, Founder of Mathovia
Published

Mathematics verification: Mathematical formulas, calculations, worked examples and solutions are reviewed for accuracy before publication. How we check our work

Chapter 6 · Lesson 1 of 1Calculus 2 · Differential Equations
  1. 1.Separable Differential Equations
See all calculus chapters →

A separable differential equation is a first-order equation that can be written as

The rate of change is a function of times a function of . Because the two variables can be pulled apart, you can solve the equation by separation of variables: put all the ‘s on one side, all the ‘s on the other, and integrate.

Separable equations model many basic processes, including exponential growth and decay, Newton’s law of cooling and logistic population growth.

How to Tell if a Differential Equation Is Separable

Write the equation as . It’s separable if factors into a part with only and a part with only . Sometimes you need algebra to see the factors.

EquationSeparable?Reason
yes,
yes
yesfactors as
yes
yes,
noa sum, not a product
no and are stuck inside one function
nothe prevents factoring

If depends only on , the equation is , and the solution is just an antiderivative. If it depends only on , it’s called autonomous, and it’s always separable.

How to Solve Separable Differential Equations

  1. Separate the variables. Rewrite as .
  2. Integrate both sides, the left side with respect to and the right side with respect to .
  3. Add one constant , on the side.
  4. Solve for if possible. If not, leave the answer as an implicit equation.
  5. Use the initial condition, if there is one, to find .
  6. Check for constant solutions. Every with gives a solution that step 1 divided away.

In symbols, the method turns the differential equation into an equation between two integrals:

For d y d x equals g of x times h of y, separate and integrate: the integral of d y over h of y equals the integral of g of x d x plus C
Separation of variables

Why Separation of Variables Works

Treating and like separate quantities looks suspicious, but it’s shorthand for a valid step. Start with and integrate both sides with respect to :

On the left, is a function of . By u-substitution with and , the left side becomes . That’s exactly what separating the differentials produces.

You only need one constant. Integrating both sides gives on the left and on the right, and these combine into one constant .

Example 1: Exponential Growth

Solve , where is a constant.

Separate and integrate:

Exponentiate both sides: . Removing the absolute value allows either sign, so . Write the constant as :

Dividing by lost the constant solution , but puts it back. Since , the solution through is . This is the model behind exponential growth and decay: a quantity whose rate of change is proportional to its size.

Example 2: Solving dy/dx = xy

Solve .

Exponentiating as in Example 1 gives

Each value of gives one solution curve. The curve for is the constant solution , and no other curve ever crosses it.

Solution curves y equals A e to the x squared over 2 for several values of A. Curves with positive A are U-shaped above the x-axis, curves with negative A are upside down below it, and the x-axis itself is the solution for A equals 0. The curve through 0 comma 1 is highlighted
The general solution is a family of curves, one for each A

Example 3: An Initial Value Problem

Solve with .

Multiply both sides by and integrate:

Use the initial condition before solving for : at , , so . Multiply by 3 to get , so

Check: .

Example 4: Factoring First

Solve with .

The right side factors as , so the equation is separable:

This gives . At , , so and

The constant solution here is , where .

Example 5: An Exponential Right Side

Solve .

Since , multiply both sides by :

Take the natural log of both sides:

The solution only exists where .

Example 6: An Implicit Solution

Solve .

Multiply by 2 and rename as a new constant:

The solutions are circles centered at the origin. This is an implicit solution: it describes the curves without solving for . Each circle holds two functions, and . You can check the answer with implicit differentiation: gives .

Example 7: Newton’s Law of Cooling

A cup of coffee at 90°C sits in a 20°C room. After 10 minutes, it has cooled to 60°C. When will it reach 30°C?

Newton’s law of cooling says the temperature changes at a rate proportional to the difference from the room:

This is separable:

So . At , , so

Now use : , so and .

To reach 30°C, solve , which gives :

Separable vs Linear Equations

Many first-order equations are separable, linear, both or neither.

EquationSeparableLinearMethod
yesyeseither
yesnoseparation of variables
noyesintegrating factor
noyesintegrating factor
nononumerical methods

Separation of variables is usually faster when it works. When an equation is linear but not separable, use an integrating factor.

Common Mistakes

  • Separating a sum. can’t be written as , so it isn’t separable. Only products separate.
  • Forgetting the constant. Add as soon as you integrate. Adding it after solving for gives the wrong family: isn’t a solution of .
  • Adding a constant on both sides. One constant is enough. Two constants just combine into one.
  • Finding too late. It’s often easier to plug in the initial condition right after integrating, before solving for .
  • Losing constant solutions. Dividing by assumes . Check the values where .
  • Mishandling the constant when exponentiating. From , you get , not . The constant becomes a factor: .

For more examples, see Section 4.3 of the free textbook OpenStax Calculus Volume 2.

Practice Problems

Try each one before opening the answer. The practice set has 12 more with instant checking.

Problem 1. Which of these is separable: or ?

Show answer

factors into an part and a part. is a difference and doesn’t factor.

Answer:

Problem 2. Solve with .

Show answer

Separating gives , so . Then .

Answer:

Problem 3. Solve with , for .

Show answer

gives . At , , so .

Answer:

Problem 4. Find the general solution of .

Show answer

.

Answer:

Problem 5. Solve with .

Show answer

gives . At , , so .

Answer: , for

Problem 6. Find every constant solution of .

Show answer

A constant solution needs for every , so .

Answer: and

Separable equations are the first type most courses solve by hand. When an equation won’t separate but is linear in , the integrating factor method takes over. Both rely on the integration skills from antiderivatives and u-substitution.

Frequently Asked Questions

What is a separable differential equation?+

It's a first-order equation that can be written as , a function of times a function of . Equations like and are separable.

How do you solve a separable differential equation?+

Move all the terms to the side with and all the terms to the side with , so that . Integrate both sides, add one constant , and solve for if you can.

How do you determine whether a differential equation is separable?+

Try to factor the right side of into a function of alone times a function of alone. If you can, it's separable. A sum like can't be factored this way, so isn't separable.

Why do you only add one constant of integration?+

Integrating both sides gives a constant on each side, and . Moving them to one side combines them into a single constant , so one constant is enough.

What is a constant solution of a separable equation?+

If , then the constant function is a solution, because both sides of the equation are 0. Dividing by can lose these solutions, so check for them separately.

Is every first-order differential equation separable?+

No. For example, and aren't separable. Linear equations like these are solved with an integrating factor instead.

Related lessons