next up previous index
Next: Integrating Factors Up: Methods for Solving ODEs Previous: Graphical Solutions: Phase Plane   Index

Click for printer friendely version of this HowTo

Separation of Variables

How do we solve Equation 2.4.1? That is, how do we determine what Equation 2.4.1 is the derivative of? First, we note that we can separate the two variables, $ y$ and $ t$, by multiplication. That is,

$\displaystyle \frac{\textrm{d}y}{y} = -b\textrm{d}t.$    

Integrating both sides produces

$\displaystyle \ln(y) = -bt + K,$ (2.10.4)

where $ K$ is the combination of the two integration constants. Using each side as an exponent, we have

$\displaystyle e^{\ln(y)}$ $\displaystyle = e^{-bt + K}\nonumber$    
$\displaystyle y$ $\displaystyle = e^{K}e^{-bt}\nonumber$    
  $\displaystyle = Ce^{-bt},$    

where $ C = e^K$.

This method can be used to solve both linear as well as nonlinear ordinary differential equations. Example 2.10.2.1 gives an example of a solution to a quadratic nonlinear ODE and Appendix D.2 shows how to use separation of variables to solve a cubic nonlinear ODE.

Quadratic ODEno_title

Example 2.10.2.2 (Quadratic ODE)  

We will begin with a quadratic ODE that is often used to model population growth (birth and immigration) and decay (death and emigration).

$\displaystyle \frac{\textrm{d}y}{\textrm{d}t} = y(k-y)$ (2.10.5)

Equation 2.10.5 can be solved using the method of seperation of variables. We begin by separating $ y$ from $ t$ by multiplcation. That is,

$\displaystyle \frac{\textrm{d}y}{\textrm{d}t}$ $\displaystyle = y(k-y)$    
$\displaystyle \frac{\textrm{d}y}{y(k-y)}$ $\displaystyle = \textrm{d}t$    
$\displaystyle \int \frac{\textrm{d}y}{y(k-y)}$ $\displaystyle = \int \textrm{d}t$ (2.10.6)

The integral on the right-hand side can be easily solved once it is broken down into simpler components. This can be done using the method of partial fraction decomposition. That is,

$\displaystyle \frac{1}{y(k-y)}$ $\displaystyle = \frac{A}{y} + \frac{B}{k-y}$    
$\displaystyle 1$ $\displaystyle = \frac{Ay(k-y)}{y} + \frac{By(k-y)}{k-y}$    
$\displaystyle 1$ $\displaystyle = A(k-y) + By$    
$\displaystyle 1$ $\displaystyle = Ak + y(B-A)$    

and $ A = \frac{1}{k}$ and $ B = \frac{1}{k}$, thus,

$\displaystyle \frac{1}{y(k-y)}$ $\displaystyle = \frac{1}{ky} + \frac{1}{k(k-y)}$    
$\displaystyle \frac{1}{y(k-y)}$ $\displaystyle = \frac{1}{k} \left(\frac{1}{y} + \frac{1}{k-y}\right)$ (2.10.7)

Substituting Equation 2.10.7 for the fraction in on the left side of Equation 2.10.6 gives us the following:

$\displaystyle \frac{1}{k} \int \left( \frac{1}{y} + \frac{1}{k-y} \right) \textrm{d}y$ $\displaystyle = t + C$    
$\displaystyle \frac{1}{k}\left( \log \vert y\vert - \log \vert k-y\vert \right)$ $\displaystyle = t + c$    
$\displaystyle \log \left( \frac{\vert y\vert}{\vert k-y\vert} \right)$ $\displaystyle = kt + C$    
$\displaystyle \frac{\vert y\vert}{\vert k-y\vert}$ $\displaystyle = e^{kt + C} = e^{kt}e^{C} = Ce^{kt}$    
$\displaystyle \frac{\vert k-y\vert}{\vert y\vert}$ $\displaystyle = Ce^{-kt}$    
$\displaystyle \frac{k}{y} - 1$ $\displaystyle = Ce^{-kt}$    
$\displaystyle \frac{k}{y}$ $\displaystyle = 1 + Ce^{-kt}$    
$\displaystyle y$ $\displaystyle = \frac{k}{1 + Ce^{-kt}}$    

$ \vert\boldsymbol{\vert}$


next up previous index
Next: Integrating Factors Up: Methods for Solving ODEs Previous: Graphical Solutions: Phase Plane   Index

Click for printer friendely version of this HowTo

Frank Starmer 2004-05-19
>