Holt.Blue
Back To Class Notes Menu
Separable Differential Equations

A separable differential equation is an equation that can be written in the form $$\frac{dy}{dx}=f(x)g(y).$$



































Example

$y'=e^yx^2$

First we write the equation in differential form to separate variables. $$ \frac{dy}{dx}=e^yx^2 $$ Then $$ e^{-y}\,dy=x^2\,dx $$ Integrating both sides $$ \int e^{-y}\,dy=\int x^2\,dx $$ Then $$ \begin{array}{lll} &\displaystyle -e^{-y}+C_1=\frac{1}{3}x^3+C_2&\\ \implies &\displaystyle -e^{-y}=\frac{1}{3}x^3+C_2-C_1&\\ \implies &\displaystyle -e^{-y}=\frac{1}{3}x^3+C_3&\mbox{ renaming the constant}\\ \implies &\displaystyle e^{-y}=-\frac{1}{3}x^3-C_3&\mbox{}\\ \implies &\displaystyle e^{-y}=-\frac{1}{3}x^3+C_4&\mbox{renaming the constant again}\\ \implies &\displaystyle -y=\ln\left(-\frac{1}{3}x^3+C_4\right)&\mbox{}\\ \implies &\displaystyle y=-\ln\left(-\frac{1}{3}x^3+C_4\right)&\mbox{}\\ \end{array} $$ We could also write the above in other forms $$ y=\ln\left(\frac{1}{-\frac{1}{3}x^3+C_4}\right)=\ln\left(\frac{3}{C-x^3}\right) $$ renaming the constant one last time.

We now verify that the above is indeed the general solution of the differential equation. $$ \begin{array}{lll} \displaystyle \frac{dy}{dx} &=\displaystyle \frac{d}{dx}\ln\left(\frac{3}{C-x^3}\right)&\mbox{}\\ &=\displaystyle \frac{1}{\frac{3}{C-x^3}}\frac{d}{dx}\frac{3}{C-x^3}&\mbox{}\\ &=\displaystyle \frac{C-x^3}{3}\frac{d}{dx}\left(3(C-x^3)^{-1}\right)&\mbox{}\\ &=\displaystyle \frac{C-x^3}{3}\left(-3(C-x^3)^{-2}\right)\frac{d}{dx}(C-x^3)&\mbox{}\\ &=\displaystyle -\frac{1}{C-x^3}(-3x^2)&\mbox{}\\ &=\displaystyle \frac{3}{C-x^3}x^2&\mbox{}\\ &=\displaystyle e^{\ln\left(\frac{3}{C-x^3}\right)}x^2&\mbox{}\\ &=\displaystyle e^{y}x^2&\mbox{}\\ \end{array} $$


























Example

$(1 + x)y' = (x + 2)(y - 1)$

Rewriting the equation in differential form, $$(1 + x)\frac{dy}{dx} = (x + 2)(y - 1)$$ Then $$ \frac{dy}{y-1}=\frac{x+2}{x+1}\,dx $$ Integrating, we get $$ \int \frac{dy}{y-1}=\int \frac{x+2}{x+1}\,dx $$ Using polynomial long division we rewrite the integrand $\displaystyle \frac{x+2}{x+1}$ as $\displaystyle 1+\frac{1}{x+1}.$ Then the above becomes

$$ \int \frac{dy}{y-1}=\int 1+\frac{1}{x+1}\,dx $$ and we have $$ \ln|y-1|=x+\ln|x+1|+C $$ Public Service Announcement: This time, instead of all that $C_1,$ $C_2,$ and "constant-renaming" business, we're going to let $C$ stand for THE constant, even if it does feel a little strange algebraically. The thing to keep in mind is that when we write $+C,$ we're talking about an entire family of curves. For example, $y=f(x)+3C$ is the same solution set as $y=f(x)+C.$ We say the $3$ is "absorbed into the constant."

The above then becomes $$ |y-1|=e^{x+\ln|x+1|+C} $$ or, $$ |y-1|=e^{x+\ln|x+1|}e^C $$ Then, $$ |y-1|=Ce^{x+\ln|x+1|} $$ rewriting $e^C$ as $C$ since it is a constant. The above gives $$ y-1=\pm Ce^{x+\ln|x+1|} $$ so that $$ y-1=Ce^{x+\ln|x+1|} $$ absorbing the $\pm$ into the constant. Finally, $$ y=Ce^{x+\ln|x+1|}+1 $$ Verifying our solution, we start at the left-hand side and work our way to the right-hand side. $$ \begin{array}{lll} \displaystyle (1+x)y' &=\displaystyle (1+x)\frac{dy}{dx}\\ &=\displaystyle (1+x)\frac{d}{dx}\left(Ce^{x+\ln|x+1|}+1\right)&\mbox{}\\ &=\displaystyle (1+x)\left(Ce^{x+\ln|x+1|}\right)\frac{d}{dx}\left(x+\ln|x+1|\right)&\mbox{}\\ &=\displaystyle (1+x)\left(Ce^{x+\ln|x+1|}\right)\left(1+\frac{1}{x+1}\right)&\mbox{}\\ &=\displaystyle (1+x)\left(1+\frac{1}{x+1}\right)\left(Ce^{x+\ln|x+1|}\right)&\mbox{}\\ &=\displaystyle \left(1+x+1\right)\left(Ce^{x+\ln|x+1|}+1-1\right)&\mbox{}\\ &=\displaystyle \left(x+2\right)\left(y-1\right)&\mbox{}\\ \end{array} $$ Special Note: We could have simplified out solution even further: $$ \begin{array}{lll} y&=Ce^{x+\ln|x+1|}+1\\ &=Ce^{x}e^{\ln|x+1|}+1\\ &=Ce^{x}|x+1|+1\\ \end{array} $$ However, verifying the simpler-looking solution is a little bit trickier.


































Example

Solve the initial value problem $$ y'=e^yx^2\\ y(0)=1. $$

From our first example, the general solution is $$ y=\ln\left(\frac{3}{C-x^3}\right) $$ Imposing the initial condition $y(0)=1$ gives $$ \begin{array}{lrll} &\displaystyle y(0)&=1 &\mbox{}\\ \implies &\displaystyle \ln\left(\frac{3}{C-0^3}\right)&=\displaystyle 1&\mbox{}\\ \implies &\displaystyle \ln\left(\frac{3}{C}\right)&=\displaystyle 1&\mbox{}\\ \implies &\displaystyle \frac{3}{C}&=\displaystyle e^1=e&\mbox{}\\ \implies &\displaystyle C&=\displaystyle \frac{3}{e}\approx 1.103638324&\mbox{}\\ \end{array} $$ Thus, $$ y=\ln\left(\frac{3}{\frac{3}{e}-x^3}\right) $$ solves the initial value problem.
































Application: Newton's Law of Cooling

You have a fresh, piping hot $300$ ml cup of coffee at temperature $100^{\circ}$C that you put outside, where the ambient temperature is $20^{\circ}$C. Assuming a cooling constant $k=-0.0447,$

What will the temperature of the coffee be after $10$ minutes?

After how many minutes will the temperature be $60$ degrees Celsius?



Newton's law of cooling is $\displaystyle \frac{dT}{dt}=k(T-T_a),$ where $T_a$ is the ambient temperature.

The problem statement gives us the initial temperature, $T(0)=100,$ the ambient temperature of $T=20,$ and the cooling constant $k=-0.0447.$

Thus, the initial value problem to solve is $$ \frac{dT}{dt}=-0.0447(T-20)\\ T(0)=100 $$ To find the general solution, we separate variables. $$ \begin{array}{ll} &\displaystyle \frac{dT}{T-20}=-0.0447\,dt\\ \implies &\displaystyle \int \frac{dT}{T-20}=-0.0447\int \,dt\\ \implies & \ln|T-20|=-0.0447t+C\\ \implies & |T-20|=e^{-0.0447t+C}\\ \implies & |T-20|=e^{-0.0447t}e^{C}\\ \implies & |T-20|=Ce^{-0.0447t}\\ \end{array} $$ Since the temperature is greater than the ambient temperature, $T-20=Ce^{-0.0447t}$ so that our general solution is $$ T=Ce^{-0.0447t}+20 $$ We now satisfy the initial condition to find $C.$ Since $T(0)=100,$ $$ \begin{array}{ll} &T(0)=Ce^{-0.0447\cdot 0}+20\\ \implies &100=C+20\\ \implies &C=80\\ \end{array} $$ Thus, our particular solution is $$ T=80e^{-0.0447t}+20 $$ To answer the first question, $$T(10)=80e^{-0.0447\cdot 10}+20\approx 71.16351266$$ That is, the temperature of the coffee after $10$ minutes will be approximately $71.2$ degrees Celsius.

To answer the second question, we set $T=60$ and solve for $t.$ $$ \begin{array}{ll} & T=60\\ \implies & \displaystyle 80e^{-0.0447t}+20=60\\ \implies & \displaystyle 80e^{-0.0447t}=40\\ \implies & \displaystyle e^{-0.0447t}=\frac{1}{2}\\ \implies & \displaystyle -0.0447t=\ln\left(\frac{1}{2}\right)\\ \implies & \displaystyle t=-\frac{\ln\left(\frac{1}{2}\right)}{0.0447}\approx 15.50664833\\ \end{array} $$ That is, the temperature of the coffee will be $60$ degrees Celsius after approximately $15.5$ minutes.

Below is a graph of some temperature and time data for a $300 \mbox{ mL}$ beaker of water under the same conditions as our coffee.







































Application: Mixture Problem

A tank contains $50 \mbox{ kg}$ of salt dissolved in $5000 \mbox{ L}$ of water. A salt solution of $0.02 \mbox{ kg}$ salt per liter is pumped into the tank at a rate of $125$ liters per minute and is drained at the same rate.

Solve for the amount of salt in the tank at time $t.$ Assume the tank is always being stirred and is well mixed.



Let $A(t)$ be the amount of salt in the tank at time $t.$

The overall rate at which the salt is changing can be determined by the rate at which salt is entering the tank and the rate at which it is leaving the tank. That is, $$ \frac{dA}{dt}=\mbox{Rate Salt Enters Tank}-\mbox{Rate Salt Leaves Tank}. $$ Rate Salt Enters Tank: The solution enters the tank at a rate of $125 \frac{\mbox{L}}{\mbox{min}},$ and since the concentration is $0.02 \frac{\mbox{kg}}{\mbox{L}},$ the rate at which the salt is entering the tank is $$ \mbox{Rate Salt Enters Tank}=\color{magenta}{\mbox{Rate Volume In}}\cdot\color{blue}{\mbox{Concentration}} =\color{magenta}{125 \frac{\mbox{L}}{\mbox{min}}} \cdot \color{blue}{0.02 \frac{\mbox{kg}}{\mbox{L}}}=2.5 \frac{\mbox{kg}}{\mbox{min}} $$ Rate Salt Leaves Tank: The solution is also draining at a rate of $125 \frac{\mbox{L}}{\mbox{min}}.$ Since the total amount salt in the tank $A(t)$ is changing at every moment $t,$ the concentration of salt in the tank also depends on time. The concentration at time $t$ is $\displaystyle \frac{A(t) \mbox{ kg}}{5000 \mbox{ L}}.$ $$ \mbox{Rate Salt Leaves Tank}=\color{magenta}{\mbox{Rate Volume Out}}\cdot\color{blue}{\mbox{Concentration}}=\color{magenta}{125 \frac{\mbox{L}}{\mbox{min}}} \cdot \color{blue}{\frac{A(t) \mbox{ kg}}{5000 \mbox{ L}}}=0.025A(t)\frac{\mbox{kg}}{\mbox{min}} $$ Thus, the differential equation which $A(t)$ satisfies is $$ \frac{dA}{dt}=2.5-0.025A $$ For the general solution we separate variables. $$ \begin{array}{ll} &\displaystyle \frac{dA}{2.5-0.025A}=\,dt\\ \implies &\displaystyle 40\frac{dA}{100-A}=\,dt\\ \implies &\displaystyle 40\int \frac{dA}{100-A}=\int \,dt\\ \implies &\displaystyle -40\ln|100-A|=t+C\\ \implies &\displaystyle \ln|100-A|=-\frac{t}{40}+C\\ \implies &\displaystyle |100-A|=e^{-\frac{t}{40}+C}\\ \implies &\displaystyle |100-A|=e^{-\frac{t}{40}}e^{C}\\ \implies &\displaystyle |100-A|=Ce^{-\frac{t}{40}}\\ \implies &\displaystyle 100-A=\pm Ce^{-\frac{t}{40}}\\ \implies &\displaystyle A-100=Ce^{-\frac{t}{40}}\\ \implies &\displaystyle A=Ce^{-\frac{t}{40}}+100\\ \end{array} $$ Since there are $50 \mbox{ kg}$ of salt to start with in the tank, our initial condition is $A(0)=50.$ Thus, $$ \begin{array}{ll} &A(0)=Ce^{-\frac{0}{40}}+100\\ \implies &50=C+100\\ \implies &C=-50\\ \end{array} $$ The particular solution is then $$ A(t)=-50e^{-\frac{t}{40}}+100 $$ A graph of this solution is given below.











































Mixture Problem Redux

A trauma patient losing blood at a rate of $125 \frac{\mbox{mL}}{\mbox{hr}}$ has just arrived at the hospital. Paramedics inform the emergency room staff that the patient presently has $50 \mbox{ mg}$ of a life-saving drug in the bloodstream and they have maintained $5000 \mbox{ mL}$ of blood (a typical volume of blood in the human body).

To replace the lost blood, the emergency staff begin a blood transfusion of $125 \frac{\mbox{mL}}{\mbox{hr}}$ along with an IV drip of the life-saving drug at a concentration of $0.02 \mbox{ mg}$ per milliliter.

If the patient continues losing blood at the same rate, solve for the amount of the drug in the patient's blood stream at time $t.$

$$ A(t)=-50e^{-\frac{t}{40}}+100 $$ Look no further than the previous example!


































Some Other Examples of Mixture Problems

Pollution level of a lake with polluted water entering and draining via rivers.

Population level with individuals entering the population (birth) and leaving the population (death).

Cash flow into an out of a financial institution.































Example: Implicit Solutions

Find a general solution to the equation $$ y'=\frac{xy}{y^2+1} $$ and then satisfy the initial condition $y(1)=1.$

$$ \begin{array}{lll} &\displaystyle y'=\frac{xy}{y^2+1} &\mbox{}\\ \implies &\displaystyle \frac{dy}{dx}=\frac{xy}{y^2+1} &\mbox{}\\ \implies &\displaystyle dy=\frac{y}{y^2+1} x \, dx &\mbox{}\\ \implies &\displaystyle \frac{y^2+1}{y}\,dy= x \, dx &\mbox{}\\ \implies &\displaystyle \left(y+\frac{1}{y}\right)\,dy= x \, dx &\mbox{}\\ \implies &\displaystyle \frac{1}{2}y^2+\ln y= \frac{1}{2}x^2+C &\mbox{}\\ \end{array} $$ From here, we cannot solve for $y$ in terms of $x$ in general, so often we simply leave the solution in this form.

However, we can still satisfy the initial condition $y(1)=1.$ $$ \begin{array}{lll} &\displaystyle y(1)=1&\mbox{}\\ \implies &\displaystyle \frac{1}{2}(1)^2+\ln (1)= \frac{1}{2}(1)^2+C &\mbox{}\\ \implies &\displaystyle \frac{1}{2}+0= \frac{1}{2}+C &\mbox{}\\ \implies &\displaystyle C=0 &\mbox{}\\ \end{array} $$ Thus, our particular solution is $$ \frac{1}{2}y^2+\ln y= \frac{1}{2}x^2 $$ which gives $$ y^2+\ln(y^2)=x^2 $$ Although solving for $y$ is not possible here in general, we can solve for $x.$ $$ \color{blue}{x=-\sqrt{y^2+\ln(y^2)}} \mbox{ or } \color{red}{x=\sqrt{y^2+\ln(y^2)}} $$ and the graph is given below.




































Other Models Involving Separable Differential Equations

$\displaystyle \frac{dP}{dt}=kP,$ uninhibited population growth (Malthusian growth)

$\displaystyle \frac{dP}{dt}=kP\left(1-\frac{P}{K}\right),$ limited population growth (logistic growth)

$\displaystyle \frac{dP}{dt}=k(M-P),$ a model for learning where $P$ is a learning curve.

$\displaystyle \frac{dp}{dS}=\frac{k}{S},$ Weber-Fechner law: perceived sensation is proportional to logarithm of the actual intensity





























Bonus Content!
































Example: Terminal Velocity

The weight of a penny is $2.5$ grams. Since the penny is a small and relatively smooth object, air resistance acting on the penny is actually quite small. We assume the air resistance is numerically equal to $0.0025v.$ Furthermore, suppose the penny is dropped with no initial velocity imparted to it. $$\displaystyle m\frac{dv}{dt}=-kv-mg.$$ (a) Set up an initial-value problem that represents the falling penny using the model for a free-falling object with air resistance.

(b) Solve the initial value problem.

(c) What is the terminal velocity of the penny? (Hint: calculate the limit of the velocity as $t\rightarrow \infty.$)

(a) The problem gives $k=0.0025,$ and the mass of the penny in kilograms is $m=0.0025$ grams. Taking $g=9.8 \mbox{ m/s}^2,$ we have $$ 0.0025\frac{dv}{dt}=-0.0025v-0.0025\cdot 9.8 $$ which becomes $$ \frac{dv}{dt}=-v-9.8 $$ Also, since the penny is dropped with no initial velocity, $v(0)=0.$ Thus, our initial value problem is $$ \frac{dv}{dt}=-v-9.8\\ v(0)=0 $$


(b) Solve the initial value problem.

First, we separate variables and find the general solution. $$ \begin{array}{lrl} & \displaystyle \frac{dv}{dt}&=-v-9.8\\ \implies & \displaystyle \frac{dv}{-v-9.8}&=dt\\ \implies & \displaystyle \frac{dv}{v+9.8}&=-dt\\ \implies & \displaystyle \int \frac{dv}{v+9.8}&=\displaystyle -\int \, dt\\ \implies & \displaystyle \ln(v+9.8)&=\displaystyle -t+C\\ \implies & \displaystyle v+9.8&=\displaystyle e^{-t+C}\\ \implies & \displaystyle v+9.8&=\displaystyle e^{-t}e^C\\ \implies & \displaystyle v+9.8&=\displaystyle Ce^{-t}\\ \implies & \displaystyle v(t)&=\displaystyle Ce^{-t}-9.8\\ \end{array} $$ Satisfying the initial condition, $$ \begin{array}{ll} & v(0)=0\\ \implies & Ce^{-0}-9.8=0\\ \implies & C-9.8=0\\ \implies & C=9.8\\ \end{array} $$ Our solution is then $$ v(t)=9.8e^{-t}-9.8=9.8(e^{-t}-1) $$


(c) What is the terminal velocity of the penny? (Hint: calculate the limit of the velocity as $t\rightarrow \infty.$)

The terminal velocity is the limit of $v(t)$ as $t\rightarrow \infty.$ $$ \begin{array}{lll} \displaystyle \lim_{t\rightarrow \infty} v(t) &=\displaystyle \lim_{t\rightarrow \infty} 9.8(e^{-t}-1)&\mbox{}\\ &=9.8(-1)&\mbox{}\\ &=-9.8&\mbox{}\\ \end{array} $$ Thus, the terminal velocity of the penny is $-9.8$ meters per second, which is about $-21.9$ miles per hour.






























Application: Chemistry

A first-order reaction of depends on the concentration $[A]$ of a single reactant and obeys the differential equation $$ -\frac{d[A]}{dt}=k[A] $$ where $k$ is the rate constant of the reaction.

Sulfuryl chloride, $\mbox{SO}_2\mbox{Cl}_2$ decomposes into sulfur dioxide and chlorine gas according to the first-order reaction $$\mbox{SO}_2\mbox{Cl}_2\rightarrow \mbox{SO}_2 + \mbox{Cl}_2.$$ At $320^{\circ}\mbox{C}$ the rate constant is $0.000022$ $\mbox{s}^{-1}.$

If the initial concentration of sulfuryl chloride is $0.008 \mbox{ M},$ what is the concentration after $1$ hour?

Letting $[A]$ represent the concentration of $\mbox{SO}_2\mbox{Cl}_2$ in $\mbox{M},$ the problem we want to solve is nothing more than an initial value problem. $$ -\frac{d[A]}{dt}=0.000022[A]\\ [A](0)=0.008 $$ First we find the general solution to $\displaystyle -\frac{d[A]}{dt}=k[A].$ $$ \begin{array}{llll} &\displaystyle -\frac{d[A]}{dt}=0.000022[A]&\displaystyle &\mbox{}\\ \implies &\displaystyle \frac{d[A]}{[A]}=-0.000022\,dt&\displaystyle &\mbox{separating variables}\\ \implies &\displaystyle \int \frac{d[A]}{[A]}=-0.000022\int \,dt&\displaystyle &\mbox{integrating both sides}\\ \implies &\displaystyle \ln [A]=-0.000022t+C&\displaystyle &\mbox{}\\ \implies &\displaystyle [A]=e^{-0.000022t+C}&\displaystyle &\mbox{}\\ \implies &\displaystyle [A]=e^{-0.000022t}e^{C}&\displaystyle &\mbox{}\\ \implies &\displaystyle [A]=Ce^{-0.000022t}&\displaystyle &\mbox{$e^C$ is just a constant}\\ \end{array} $$ Imposing the initial condition, we get a particular solution. $$ \begin{array}{llll} &\displaystyle [A](0)&=0.008 &\mbox{}\\ \implies &\displaystyle Ce^{-0.000022\cdot 0}&=\displaystyle 0.008&\mbox{}\\ \implies &\displaystyle Ce^{0}&=\displaystyle 0.008&\mbox{}\\ \implies &\displaystyle C&=\displaystyle 0.008&\mbox{}\\ \end{array} $$ Thus, $$ [A](t)=0.008e^{-0.000022t}. $$ So, after $1$ hour, or $3600$ seconds, the concentration of sulfuryl chloride will be $[A](3600)=e^{-0.000022 \cdot 3600}\approx 0.00739$ $\mbox{M}.$