First Order DE

• Use analytical methods to solve first order differential equation by direct integration and separation of variables.

Variable Separable Differential Equations:

Bring all y terms on one sides with dy and keep all x terms with dx on the other side.
Integrate to get the final solution. $f_1(x)g_1(y)dx + f_2(x)g_2(y)dy = 0$ $\frac{f_1(x)}{f_2(x)}dx + \frac {g_2(y)}{g_1(y)}dy = 0$ $\int \frac{f_1(x)}{f_2(x)}dx + \int \frac {g_2(y)}{g_1(y)}dy = c$ Let’s see an example of this:
Solve the following first order differential equation using variable separable method: $\dfrac{dy}{dx} = 3x^2y$ First, bring all similar terms on one side. $\dfrac{dy}{y} = 3x^2dx$ Now integrate both sides with respect their respective variables. $\int \dfrac{dy}{y} = \int 3x^2dx + C$ where C is the constant of integration. $ln \ y = x^3 + C$ or in another format, $y = e^{(x^3 + C)}$ Now the exponential can be split as multiplication of two exponents. However, $e^C$ will also be a constant, let’s say c. $y = e^{x^3} .e^ C = e^{x^3}. c$ $y = c.e^{x^3}$ If boundary conditions are given, those can be substituted to eliminate c.
Let’s say if it is given then y(0) = -1, which means at x = 0, y = -1, then substituting, $(-1) = c e^{0^3}$ which means, c = -1, So the final solution will be, $y = - e^{x^3}$

Solved Example:

3-2-01

9 grams of bacteria grows at the rate of $\dfrac{1}{5}$ gram per day per gram. At this rate how long will it take to reach 17 gram?

Solution:
$\dfrac{dm}{dt}=\dfrac{m}{5}$ $5\dfrac{dm}{m}=dt$ $5\int \dfrac{dm}{m}=\int dt+C$ $5\ln m=t+C$ $\ln m=\dfrac{t}{5}+c$ $m=e^{\frac{t}{5}}.e^{c}$ At t=0, m=9 grams $m=9e^{\frac{t}{5}}$ $17=9e^{\frac{t}{5}}$ t=3.18 days

Solved Example:

3-2-02

The population of a country doubles in 50 years. How many years will it be five times as much? Assume that the rate of increase is proportional to the number of inhabitants.

Solution:
\begin{align*} \dfrac{dN}{dt} &\propto N\\ \dfrac{dN}{dt} &= k.N\\ \dfrac{dN}{N} &= k.dt\\ \int \dfrac{dN}{N} &= \int k.dt + c\\ \ln\ N &= kt + c\\ N &= e^{(kt+c)}\\ &= e^{kt}.e^c\\ N &= C e^{kt} \end{align*} where C = $e^c$ $\dfrac{N_2}{N_1} = e^{k.(50)} = 2$ $\ln\ 2 = 50k$ $k = \dfrac{\ln\ 2}{50} = 0.01386$ Now, time to become five times $\dfrac{N_3}{N_1} = 5 = e^{0.01386(t)}$ $\ln\ 5 = 0.01386 t$ $t = \dfrac{\ln\ 5}{0.01386} = 116.09\ \mathrm{years}$

Solved Example:

3-2-03

What is the solution of the first order differential equation y(k+1) = y(k) + 5.

Solution:
\begin{align*} y\left( k+1\right) &=y\left( k\right) +5\\ y\left( k+1\right) -y\left( k\right) &=5\\ y'&=\dfrac {y\left( k+1\right) -y\left( k\right) }{\left( k+1\right) -k}\\ y'&=5\\ \dfrac {dy}{dx}&=5\\ dy &=5\ dx\\ y &=5x+c \end{align*} Where C is a constant.

Solved Example:

3-2-04

Solve xy' (2y - 1) = y (1 - x)

Solution:
\begin{align*} xy' (2y - 1) &= y (1 - x)\\ \dfrac{\dfrac{dy}{dx}(2y-1)}{y} &= \dfrac{(1-x)}{x}\\ \dfrac{dy (2y-1)}{y} &= \dfrac{(1-x)}{x} dx\\ \left(2 - \dfrac{1}{y}\right)dy &= \left( \dfrac{1}{x} - 1\right) dx \end{align*} Integrating, \begin{align*} \int \left(2 - \dfrac{1}{y}\right)dy &= \int \left( \dfrac{1}{x} - 1\right) dx + c\\ 2y - \ln\ y &= \ln\ x -x + c\\ x + 2y &= \ln\ x + \ln\ y + c\\ (x + 2y ) &= \ln (xy) + c \end{align*} Constant of integration can be shifted to the left side , let C = -c. $\ln (xy) = (x + 2y) + C$

Solved Example:

3-2-05

Find the general solution of y' = y $\sec x$.

Solution:
\begin{align*} y' &= y \sec x\\ \dfrac{dy}{dx} &= y \sec x\\ \dfrac{dy}{y} &= \sec x dx \end{align*} Integrating both sides, \begin{align*} \int \dfrac{dy}{y} &= \int \sec x dx + c\\ \ln\ y &= \ln(\sec x+ \tan x) + c \end{align*} rewriting c = $\ln$ C, \begin{align*} \ln\ y &= \ln(\sec x+ \tan x) + \ln\ C\\ y &= C (\sec x+ \tan x) \end{align*}

Solved Example:

3-2-06

Which of the following equations is a variable separable DE?

Solution:
Only equation given in (C) can be rearranged with x terms on one side and y terms on the other as follows. \begin{align*} 2ydx &=\left( x^{2}+1\right) dy\\ 2 \left(\dfrac {dx}{x^{2}+1} \right)&=\dfrac {dy}{y} \end{align*} Such differential equation is called variable separable differential equation.

Solved Example:

3-2-07

Radium decomposes at a rate proportional to the amount present. If half of the original amount disappears after 1000 years, what is the percentage lost in 100 years?

Solution:
\begin{align*} \dfrac {dN}{dt} &\propto N\\ \dfrac {dN}{dt} &=-kN\\ \dfrac {dN}{N} &=-kdt\\ \ln N &=-kt+c \end{align*} $\mathrm{At}\ t=0,N=N_{0}$ $C=\ln N_{0}$ \begin{align*} \ln \left( \dfrac {N}{N_{0}}\right) &=-kt\\ \ln \left( \dfrac {1}{2}\right) &=-k\left( 1000\right)\\ k &=\dfrac {-1}{1000}\ln \left( \dfrac {1}{2}\right)\\ k &=6.93\times 10^{-4} \end{align*} $\mathrm{At}\ t=100,$ \begin{align*} \dfrac {N}{N_{0}} &=e^{-kt}\\ &=e^{-6.93\times 10^{-4}\times 100}\\ &=0.933 \end{align*} $\mathrm{Lost}=1-0.933=0.067=6.7\%$

Solved Example:

3-2-08

According to Newton's law of cooling, the rate at which a substance cools in air is directly proportional to the difference between the temperature of the substance and that of air. If the temperature of the air is 30$^\circ$ and the substance cools from 100$^\circ$ to 70$^\circ$ in 15 minutes, how long will it take to cool 100$^\circ$ to 50$^\circ$?

Solution:
\begin{align*} \dfrac {d\theta }{dt} &\propto \left( \theta -\theta _{0}\right)\\ \dfrac {d\theta }{dt} &=-k\left( \theta -\theta _{0}\right)\\ \dfrac {d\theta }{\theta -\theta _{0}} &=-kdt\\ \ln \left( \theta -\theta _{0}\right) &=-kt+c \end{align*} $At\ t=0,\theta =100$ $\ln \left( \dfrac {100-30}{70-30}\right) =kt$ $k =\dfrac {1}{15}\ln\left[ \dfrac {70}{40}\right] =0.037$ $\ln \left[ \dfrac {100-30}{50-30}\right] =0.037t$ $t =\dfrac {1}{0.037}\ln \left[ \dfrac {70}{20}\right] =33.85\min$

Solved Example:

3-2-09

The solution of the differential equation $\dfrac{dy}{dx} + y^2 = 0$ is:

Solution:
\begin{align*} \dfrac {dy}{dx}+y^{2} &=0\\ \dfrac {dy}{dx} &=-y^{2}\\ -\dfrac {dy}{y^{2}} &=dx \end{align*} Integrating both the sides, we have \begin{align*} -\int \dfrac {dy}{y^{2}} &=\int dx\\ y^{-1} &=x+c\\ y &=\dfrac {1}{x+c} \end{align*}

Consider the differential equation $\dfrac {dy}{dx}=\left( 1+y^{2}\right)x$ The general solution with constant c is:
$\dfrac {dy}{dx}=\left( 1+y^{2}\right) x$ $\left( \dfrac {dy}{1+y^{2}}\right) =xdx$ Integrating both the sides, we get, $\int \dfrac {dy}{1+y^{2}}=\int xdx$ $\tan ^{-1}y=\dfrac {x^{2}}{2}+c$ $y=\tan \left( \dfrac {x^{2}}{2}+c\right)$