# Separation of Variables

You might have wondered so far how the study of differential equations is of any use outside the pure realm you have studied it in. Well, it has surprising amounts of applications in the real world, from Newton's law of cooling to how the fuel in a rocket affects the motion, pretty neat, isn't it?

#### Create learning materials about Separation of Variables with our free learning app!

• Flashcards, notes, mock-exams and more
• Everything you need to ace your exams

Everything in the real-world changes and hence there is a need for derivatives, in turn giving rise to Differential Equations. Let's explore a particular class of ordinary differential equations and look at some of its applications.

## Separation of Variables Meaning

As the name suggests, these are the types of Differential Equations when the variables can be separated explicitly, such a class of Differential equations are very easy to deal with.

In fact, you can simply plan down an algorithm to solve such differential equations. Then, you shall only be dealing with Ordinary Differential Equations of first order.

It has to be said that most of the applications of differential equations are mostly in the realm of Partial Differential Equations, which, for now, remains out of the scope of this article.

## Separation of Variables differential equations

A separable differential equation of the $$n^{\text {th }}$$ order can be written in the form:

$$\frac{\mathrm{d}^n y}{\mathrm{d} x^n}=f(x) g(y)$$

where $$y$$ is differentiable and, therefore, continuous on the appropriately defined domain of the function.

Also note that $$y$$ is a function of $$x$$, i.e., $$y=f(x)$$, which implies that $$x$$ is the independent variable here. The equation above might look a bit scary at first since you have a differential equation of order $$n$$ where $$n \in \mathbb{N}$$. But you are only going to deal with cases where $$n=1$$, is the first-order separable differential equation.

## Methods of separation of variables

You shall only be looking at DEs of the first order, i.e. when $$n=1$$.

The Ordinary Differential Equation you will deal with, is:

$$\frac{\mathrm{d} y}{\mathrm{d} x}=f(x) g(y)$$

Remember that $$f(x) h(y) \neq g(x, y)$$, i.e. $$f(x) h(y)$$ in not a composite function $$g(x, y)$$.

To solve this ODE, you will separate the two variables, having like variables on each side, i.e. having $$\mathrm{d} y$$, $$h(y)$$ on one side and $$\mathrm{d} x, f(x)$$ on the other. You get:

$$\frac{\mathrm{d} y}{h(y)}=f(x) \, \mathrm{d} x$$

Now, the variables are separated successfully. The reason for doing it, is to have functions on both sides, which can be integrated easily.

Integrating on both sides:

$$\int \frac{\mathrm{d} y}{h(y)}=\int f(x) \, \mathrm{d}x$$

And there you have it! The differential equation $$y'=f(x)h(y)$$ has been solved, you have an explicit solution to the given separable differential equation.

## Separation of Variables Examples

Solve the following ODE:

$$\frac{\mathrm{d}y}{\mathrm{d}x}=\ln x +x^2$$

Solution:

Step 1: It can be seen that the given differential equation is of separable form, and so you have to separate the variables in order to find the solution:

$$\, \mathrm{d}y=(\ln x +x^2)\, \mathrm{d}x$$

Step 2: Now you just have to integrate carefully:

\begin{aligned} \int \, \mathrm{d}y &=\int \ln x \, \mathrm{d}x +\int x^2 \, \mathrm{d}x \\ \implies \ \int \, \mathrm{d}y &=\int \ln x \, \mathrm{d}x +\int x^2 \, \mathrm{d}x \\ \implies \ y &=x\ln x-\int x\frac{1}{x} \, \mathrm{d}x +\frac{x^3}{3} +c \\ \implies \ y &=x\ln x -x+\frac{x^3}{3}+c \end{aligned}

where $$c$$ is the constant of integration.

Hence, the differential equation has been solved.

Notice that the solution is of the form $$y^n=g(x)$$, which will always be the case for a separable ordinary differential equation.

Let's look at another example, just slightly different:

Find the general solution of the following differential equation:

$$x^2 \frac{\mathrm{d}y}{\mathrm{d}x}=e^{-2y}$$

Solution:

Step 1: Observing that the equation is of the form $$y^{\prime}=f(x) g(y)$$, separate the variables on each side:

$$e^{2 y} \, \mathrm{d}y=\frac{\mathrm{d} x}{x^2}$$

Note that you are NOT treating $$\frac{\mathrm{d}y}{\mathrm{d}x}$$ as an algebraic fraction, it is the property of derivatives and differentials that allows you to separate $$\mathrm{d}y$$ and $$\mathrm{d}x$$ (as done above).

Step 2: Integrating on both sides:

\begin{aligned} &\int e^{2 y} \, \mathrm{d} y=\int \frac{\mathrm{d} x}{x^2} \\ \implies &\quad \frac{e^{2 y}}{2}=\frac{x^{-2+1}}{-2+1}+c \\ \implies &\quad e^{2 y}=\frac{-2}{x}+2 c \end{aligned}

One can also simplify the expression to get $$y=g(x)$$ in the following way:

\begin{aligned} 2 y &=\ln \left(\frac{-2}{x}+k\right) \\ \implies y &=\frac{1}{2} \ln \left(\frac{-2}{x}+k\right) \end{aligned}

It is not necessary to get this form, it is only required when the problem specifically asks for it.

## Application of Separation of Variables

These ordinary differential equations are not here as just pure mathematical objects that you play with, as discussed firsthand. There is a very solid reason these differential equations and their solutions exist. There is a wide range of stuff to which one can apply these differential equations to. You will look at some of these applications which involve separable variables. The most common of these problems are growth problems of populations, decay rates, Newton's law of cooling, etc.

### Model of Exponential Population Growth

An essential application of first-order differential equations of separable form is using it to model the population growth of different groups such as bacteria or the growth rate of rabbits.

Such models are not exactly accurate and often ignore certain outside factors to keep the differential equations simple enough to deal with.

Let's start with a population group of $$P_0$$, which is the initial population at the time $$t=0$$. And let the population be $$P$$ at some arbitrary time $$t=t$$.

And suppose that the population is increasing at a constant rate $$k$$, and assume that there are no external factors that are reducing the population (for simplicity).

You want to form an ordinary differential equation to model this situation, note that the growth rate at any certain point is proportional to the population at that time:$$\frac{\mathrm{d} P}{\mathrm{d} t}=kP$$

where $$k$$ is the rate of population growth. Now, since the equation is of separable form, you get:

$$\frac{\mathrm{d} P}{P}=k \, \mathrm{d} t$$

Integrating on both sides:

$$\int_{P_0}^P \frac{\mathrm{d} P}{P}=\int_0^t k \, \mathrm{d} t$$

The limits of integration are from $$P=P_0$$ to $$P=P$$, which the population grows to. And the time goes from $$t=0$$ to $$t=t$$. Integrating definitely:

\begin{aligned} & \left.\ln P\right|_{P_0} ^P=\left.k t\right|_0 ^t \\ \implies & \ln P-\ln P_0=k t \\ \implies & \ln \left(\frac{P}{P_0}\right)=k t \end{aligned}

Taking exponential9 on both sides:

\begin{aligned} &\frac{P}{P_0}=e^{k t} \\ \implies \ &P=P_0 e^{kt} \end{aligned}

Now, you can model the population of the given group at a time $$t$$.

A field has 30 ants. Their population is increasing at a rate of 2 ants per month, how many rabbits will be there after four months? (Ignore external factors and assume that the ants are not dying out in this time period, and assume the growth is continuous)

Solution:

Let $$P$$ be with a number of ants at some arbitrary time $$t$$ (in months), and since the growth rate is proportional to the existing population:

\begin{aligned} & \frac{\mathrm{d} P}{\mathrm{d} t}=kP \\ \implies \ & \frac{\mathrm{d} P}{P}=k\, \mathrm{d} t \end{aligned}

You want to know the population at $$t=4$$ months, so take the limits of integration from $$t=0$$ to $$t=4$$:

$$\int_{P_0}^P \frac{\mathrm{d} P}{P}=k\int_0^4 \, \mathrm{d}t$$

The initial population is $$P_0=30$$, and let $$P=P_4$$ at $$t=4$$:

\begin{aligned} & \int_{30}^{P_4} \frac{\mathrm{d} P}{P} = 2 \int_0^4 \, \mathrm{d} t \\ \implies \ & \ln \left( \frac{P_4}{30} \right) =2 \times 4 \\ \implies \ & \frac{P_0}{30}=e^8 \\ \implies \ & P_4=30e^8 \approx 89430 \end{aligned}

So, there will be 89430 ants at the end of four months. Well, of course, it is not realistic because the model is an exponential growth model, so the population shoots up drastically. In the real world, there are other variables to which the growth is proportional, which will be much more complicated to deal with (and out of the scope of this article).

Radioactive is one of the most useful applications of separable differential equations. Suppose you have $$N_0$$ amount of radioactive material at the time $$t=0$$ and you want to model the radioactivity of the material as time goes by.

The rate at which the amount of radioactive material changes is directly proportional to the amount present at that time:

$$\frac{\mathrm{d} N}{\mathrm{d} t}=-\lambda N$$

where $$\lambda >0$$ and is known as the decay constant, the reason there is a negative sign is that the amount of radioactive material is decreasing over time. Since the equation is of separable form, you get:

\begin{aligned} & \frac{\mathrm{d} N}{N}=-\lambda t \\ \implies \ & \int_{N_0}^N \frac{\mathrm{d} N}{N} = - \lambda \int_0^t \mathrm{d} t \\ \implies \ & \ln \left( \frac{N}{N_0} \right) = -\lambda t \\ \implies \ & N=N_0 e^{-\lambda t} \end{aligned}

Thus, you have a solution to the ordinary differential equation. One can deduce from the solution that the amount of radioactive material decreases exponentially over time. The graph of this equation can be plotted as below:

Figure 1.- Graph modelling the radioactive decay of a material

A very particular observation one can make is that the radioactive material nearly vanishes out over a very, very long period of time. You can let the physicists figure out the reasons behind that. In mathematical terms, one can observe that as $$t \rightarrow \infty$$, $$N \rightarrow 0$$. Let's look at an example regarding radioactive decay.

The half-life of a radioactive element is 20 years. The radioactive decay constant for the element is $$\lambda=10 years^{-1}$$. Find the time it will take the element to be a quarter of its original amount.

(Hint: Half-life is the time it takes for the radioactive element to be half of its original amount)

Solution:

Let $$N_0$$ be the initial amount of radioactive material, after half-life, half of the original amount is left: $$N_{1/2}=\frac{N_0}{2}$$. Using the equation for radioactive decay:

$$N=N_0 e^{-\lambda t}$$

Plugging in $$N=N_{1/2}$$ and $$t=20$$, which is the half life of the element:

\begin{aligned} & N=N_0 e^{-\lambda t} \\ \implies \ &N_{1/2}=N_0 e^{-20 \lambda} \\ \implies \ &\frac{N_0}{2}=N_0 e^{-20 \lambda} \\ \implies \ &-\ln 2=-20 \lambda \\ \implies \ & \lambda=\frac{\ln 2}{20} \end{aligned}

Now that you have found out the value of the decay constant, you can proceed to find out how much time it will take the element to be a quarter of its original amount. Let $$N_{1/4}$$ be the amount left, which is $$N_{1/4}=\frac{N_0}{4}$$.

Then you have:

\begin{aligned} &N=N_0 e^{-\lambda t} \\ \implies \ & \frac{N_0}{4}=N_0 e^{\frac{-t \ln 2}{20}} \\ \implies \ & -\ln 4 = -\frac{t \ln 2}{20} \\ \implies \ & t = \frac{20 \times 2 \times \ln 2}{\ln 2} \\ \implies \ & t= 40 \end{aligned}

Hence, it will take 40 years for the element to be a quarter of its original amount.

### Newton's law of Cooling

A widely known application of several variable differential equations is in the physics of heat transfer. It models how an object loses its heat, which is known as Newton's law of cooling:

The rate of heat lost by an object to the surroundings is directly proportional to the difference in temperature between the object and the surroundings.

Let $$T$$ be the temperature of the object at some arbitrary time $$t$$ and $$T_s$$ be the temperature of the surroundings. It should be noted that $$T>T_s$$ at all times, since the body will not lose any heat if the surrounding is at a higher temperature. The flow of heat from the object will come to a stop when $$T=T_s$$.

According to the law:

$$\frac{\mathrm{d} T}{\mathrm{d} t}= -k(T-T_s)$$

Notice that you have the constant of proportionality as $$-k$$ where $$k>0$$ because the object is losing heat, and so the rate of change of it will be negative.

Separating the variables, you have:

\begin{aligned} & \int \frac{\mathrm{d} T}{T-T_s}= \int -k \, \mathrm{d} t \\ \implies \ & \ln |c(T-T_s)|=-kt \\ \implies \ &c(T-T_s)=e^{-kt} \\ \implies \ &T=T_s+Ce^{-kt} \end{aligned}

where $$c=1/C$$ for the sake of convenience.

You can determine $$C$$ by substituting $$t=0$$:

\begin{aligned} &T_0=T_s+C \\ \implies \ &C=T_0-T_s \end{aligned}

where $$T_0$$ is the temperature of the object at the time $$t=0$$.

$$T=T_s+(T_0-T_s)e^{-kt}$$

where $$k$$ is a constant that depends on the surface area and the material of the object.

An object has a temperature of $$30^{\circ} \ \mathrm{C}$$, surrounded by a room of constant temperature of $$15^{\circ} \ \mathrm{C}$$. It is seen that the temperature of the object falls to $$25^{\circ} \ \mathrm{C}$$ in 10 minutes. Calculate how much more time will it take for it to drop to $$20^{\circ} \ \mathrm{C}$$?

Solution:

From Newton's law of Cooling:

$$T=T_s+\left(T_0-T_s\right) e^{-k t}$$

where $$T_s=15^{\circ} \ \mathrm{C}, T_0=30^{\circ} \ \mathrm{C}$$ so you get:

\begin{aligned} T &=15+(30-15) e^{-k t} \\ \implies T &=15+15 e^{-k t} \end{aligned}

After $$t=10 \ \mathrm{min}$$, the temperature falls

\begin{aligned} T_{10}&=25^{\circ} \ \mathrm{C} \\ T_{10}&=25=15+15 e^{-10 k} \\ \implies \ 5&=3+3 e^{-10 k} \\\implies \ \frac{2}{3}&=e^{-10 k} \\\implies \ -10 k&= \displaystyle \ln \left(\frac{2}{3}\right) \\\implies \ -10 k& \approx -0.405 \\ \implies \ k&=0.0405 \end{aligned}

Hence, the value of $$k$$ is $$0.0405$$ per min. You can plug this back into the equation:

$$T=15\left(1+e^{-0.0405 t}\right)$$

Thus, you have a solution that has no unknown constants, and now you can plug in whatever value of $$t$$ to get the temperature at that time.

You need $$T=20^{\circ} \ \mathrm{C}$$:

\begin{aligned} 20 &=15\left(1+e^{-0.0405 t}\right) \\ \implies \ \frac{4}{3}-1 &=e^{-0.0405 t} \\ \implies \ -\ln 3 &=-\frac{1}{10} \ln \left(\frac{2}{3}\right) t \\ \implies \ t&=-\frac{\ln 3}{-0.0405} \\ \implies \ t &\approx 27.126 \ \mathrm{~min} \end{aligned}

Hence, after 27 or so minutes from the start, the temperature of the object will drop to $$20^{\circ} \ \mathrm{C}$$.

But this is not the correct answer, you are asked the time it takes from the $$25^{\circ} \mathrm{C}$$ mark.

It took $$10 \ \mathrm{~min}$$ to drop to $$25^{\circ} \ \mathrm{C}$$, $$27 \ \mathrm{~min}$$ to drop to $$20^{\circ} \ \mathrm{C}$$, which implies it took $$17 \ \mathrm{~min}$$ from the $$25^{\circ} \ \mathrm{C}$$ to $$20^{\circ} \ \mathrm{C}$$.

## Separation of Variables - Key takeaways

• There is a certain class of ordinary differential equations which can be easily solved, by separating the variables explicitly, known as the Separation of Variables differential equations.
• The differential equations which are of the form $$\frac{\mathrm{d}^n x }{\mathrm{d} x^n}=f(x)h(y)$$ are known as the differential equations of separable form.
• The first order separable differential equation $$\frac{\mathrm{d} y}{\mathrm{d} x} =f(x)h(y)$$ can be solved as follows: $$\int \frac{\mathrm{d} y}{g(y)}=\int f(x) \mathrm{d} x$$.
• Application of Separable ordinary differential equations includes the widely used Newton's Law of Cooling, population growth models, radioactive decay, etc.

#### Flashcards in Separation of Variables 15

###### Learn with 15 Separation of Variables flashcards in the free StudySmarter app

We have 14,000 flashcards about Dynamic Landscapes.

What is meant by separation of variables?

Separation of Variables essentially means separating variables in an equation to get like variables on each side.

How do you separate variables?

To separate variables, isolate one variable on one side and bring all the like terms there, doing the same on the other side.

When can you use separation of variables?

The method of separation of variables can only be used when the equation is of the form y'(x)=f(x)g(y), which is known as the separable form.

Why do we separate variables?

We separate variables in order to get integrals which can be solved easily.

What is the applications of separation of variable?

Applications include Newton's Law of Cooling, growth models of populations, etc.

## Test your knowledge with multiple choice flashcards

Which of the following differential equations is separable?

Is the differential equation $$y'=5(x^2+6)y^2$$ separable?

True or False:  The differential equation  $$y'=\sin^2 x$$ is NOT separable.

StudySmarter is a globally recognized educational technology company, offering a holistic learning platform designed for students of all ages and educational levels. Our platform provides learning support for a wide range of subjects, including STEM, Social Sciences, and Languages and also helps students to successfully master various tests and exams worldwide, such as GCSE, A Level, SAT, ACT, Abitur, and more. We offer an extensive library of learning materials, including interactive flashcards, comprehensive textbook solutions, and detailed explanations. The cutting-edge technology and tools we provide help students create their own learning materials. StudySmarter’s content is not only expert-verified but also regularly updated to ensure accuracy and relevance.

##### StudySmarter Editorial Team

Team Math Teachers

• Checked by StudySmarter Editorial Team