Skip to main content
Search IntMath

Separating Variables in Differential Equations

By Kathleen Cantor, 07 Oct 2020

Separation of Variables, widely known as the Fourier Method, refers to any method used to solve ordinary and partial differential equations. To apply the separation of variables in solving differential equations, you must move each variable to the equation's other side.

Get to Understand How to Separate Variables in Differential Equations

As indicated in the introduction, Separation of Variables in Differential Equations can only be applicable when all the y terms, including dy, can be moved to one side of the equation. All the other x terms, including dx, are taken to the other side of the equation. Kindly follow these steps in Separating Variables involving Differential Equations.

Step One: Move all the y terms, including dy, to one side of the equation

Step Two: Move all the x terms, including dx, to the other side of the equation

Step Three: Integrate the y side.

Step Four: Integrate the x side. Kindly note that "+C" is the constant of the integration.

Step Four: Simply the equation.


Task: Assuming that k is constant, solve the following differential equation.

dy/dx = ky


Move all the y terms to one side of the equation and the x terms to the other side of the equation.


dy/dx = ky

dy = ky × dx ( You are simply multiplying both sides by dx)

You should then divide both sides of the equation by y.

y:dy/y = k dx

Now integrate both sides of the equation. Kindly note that the integration should be done separately.


∫ dy/y = ∫ k dx ( note the placement of the integration sign)

Now integrate the left side of the equation:

(y) + C = ∫ k dx

Then integrate the right side of the equation:

(y) + C = kx + D

Remember that "C" is the constant of integration and that D is used for the other. Therefore it is a different constant.

You can now simplify the equation. To simplify, roll the two constants into one.


(a=D−C): ln(y) = kx + a

e(ln(y)) = y

It would help if you now took the exponents on both sides


y = ekx + a

And ekx + a = ekx ea


y = ekx ea

Assuming that you have keenly followed these steps and the example given, you can now use the formula and the procedure to solve real-life examples. It is prudent to state here that though we used y and x in our example, you are at liberty to use other variable names.

Other illustrations

Take rhinos, for example. The more rhinos you have, the more baby rhinos you will have. When these baby rhinos grow, they automatically sire babies. Therefore there is an increase in population.

This information can translate into a differential equation.

Please let:

(N) population any time be t;


the growth rate be r and;

the rate of change in population is dNdt.

Please note that the rate of change at any given time is equal to the growth rate times the population. Simply put:dN dt = rN.

If you note keenly, the resulting equation is the same as the previous one we solved, in example (1) above. The only difference is that this time, different letters have been used. That is:

N instead of y

t instead of x

r instead of k

Therefore N = cert

Further Illustration

Solve this differential equation by separating the variables:

dy/dx = 1y


First, separate the y and x variables. Then you will have to move all the y variables to one side of the equation. Then move all the x terms to the other side of the equation.


Multiply both sides by dx:

dy = (1/y) dx

Multiply both sides by y:

y dy = dx

It would be best if you then integrated both sides of the equation separately. Please be keen to put the integral sign (∫ ) in front of the equation.


∫ y dy = ∫ dx

Now integrate each side:


(y2)/2 = x + C

You have now integrated both sides of the equation in one line.

Next, simplify the equation:

Multiply both sides by 2

y2 = 2(x + C)

Find the square root of both sides:

y = ±√(2(x + C))

Note that y = ±√(2(x + C)) is not the same as y = √(2x) + C. The difference is as a result of the addition of C before finding the square root. You realize that this is common in many differential equations. C is not just added at the end of the process. You should add the C only when integrating.


y = ±√{2(x + C)}

Complex Examples Involving Solving Differential Equations by Separating Variables

Task solve :dydx = 2xy1+x2


First, learn how to separate the Variables.

Multiply both sides by dx, then divide both sides by y:


1y dy = 2x1+x2dx

Next, integrate the two sides of the equation separately.


∫1y dy = ∫2x1+x2dx

Note that while the left side is a simple logarithm, the right side can be integrated by the substitution method.

Let u = 1 + x2, so du = 2x dx:∫1y dy = ∫1udu

You can then integrate(y) = ln(u) + C

Then make C = ln(k):ln(y) = ln(u) + ln(k)

Therefore you get:

y = uk

Lastly please put u = 1 + x2 back again.


y = k(1 + x2)

Lastly, simplify the equation.

Therefore y = k(1 + x2)

Verhulst Logistics Equation

The previous example on growth Differential Equation (dNdt = rN) is closely related overhaul Logistics Equation. The equation also referred to as the Verhult's model was introduced in 1838 and works with the assumption that growth may not last forever because the population will soon run of food.

Now solve the Verhaust's Equation using Differential Equation by Separating the Variables

dNdt = rN(1−N/k)

First, separate the two variables by multiplying both sides of the equation by dt, then divide again by N.


dN = rN(1−N/k) dt

N(1-N/k):1N(1−N/k)dN = r dt

Next, please integrate the resulting expression.


∫1N(1−N/k)dN = ∫ r dt

You realize that the left side of the equation seems difficult to integrate. You don't have to worry, though. With a little knowledge of Partial Fractions, you don't have to spend a whole day looking for a solution. Kindly rearrange the equation like this:

It would help if you began with:1N(1−N/k) then multiply both top and bottom by k:kN(k−N). You should then add N and -N to the top.



You should then split the expression into two fractions.


NN(k−N) + k−NN(k−N)

You can then simplify each fraction

1k−N + 1N.

You can now quickly solve the problem. Go ahead and separate each term separately.


∫1k−NdN + ∫1NdN = ∫ r dt

Then, Integrate:−ln(k−N) + ln(N) = rt + C

Simplify the equation:

In(k−N) − ln(N) = −rt − C

Combine ln():ln((k−N)/N) = −rt − C

Then, take exponents on both sides:(k−N)/N = e−rt−C

Now, separate the powers of e:(k−N)/N = e−rt e−C

Remember that e−C is constant. You should therefore replace it with A:(k−N)/N = Ae−rt.

You are now close to the answer. With a little more algebra, you are assured of getting N on its own. To do this:

Separate the fraction terms:(k/N)−1 = Ae−rt

Then add 1 to both sides:k/N = 1 + Ae−rt

Next,divide both by k:1/N = (1 + Ae−rt)/k

Find the reciprocal of both sides: N = k/(1 + Ae−rt)

Therefore the solution is N = k1 + Ae−rt

Final Thoughts

Separating Variables in Differential Equations, though often understood by a few people and widely feared by many, can be a straightforward concept to grasp if you adhere to the procedures discussed in this article.

Be the first to comment below.

Leave a comment

Comment Preview

HTML: You can use simple tags like <b>, <a href="...">, etc.

To enter math, you can can either:

  1. Use simple calculator-like input in the following format (surround your math in backticks, or qq on tablet or phone):
    `a^2 = sqrt(b^2 + c^2)`
    (See more on ASCIIMath syntax); or
  2. Use simple LaTeX in the following format. Surround your math with \( and \).
    \( \int g dx = \sqrt{\frac{a}{b}} \)
    (This is standard simple LaTeX.)

NOTE: You can mix both types of math entry in your comment.


Tips, tricks, lessons, and tutoring to help reduce test anxiety and move to the top of the class.