Skip to content

First order ode formulas reference

Separable

Requirements
- able to write the equation in the form where all of one variable times all of the other variable is equal to the original equation.

Form

\[\frac{dy}{dx} = P(x)G(y)\]

General Solution

\[H(y) = \frac{1}{G(y)}\]
\[H(y)\,dx\left[\frac{dy}{dx} = P(x)G(y)\right]\]
\[\begin{align*} H(y)\,dy = P(x)dx && \Rightarrow && \int H(y)\,dy = \int P(x)\,dx \end{align*}\]
\[\text{OR}\]
\[\begin{align*}\frac{dy}{G(y)} = P(x)\,dx && \Rightarrow && \int \frac{dy}{G(y)} = \int P(x)\,dx\end{align*}\]

Linear

Requirements
- The dependent variable and all its derivatives are a power of 1
- All the coefficients of the differential equation and the function that it equals are constants or depend only on the independent variable

Form

\[y^{\prime}+P(x)y = Q(x)\]

General Solution

\[I(x) = e^{\int P(x)dx}\]
\[y=\frac{1}{I(x)}\left(\int I(x)Q(x) dx +c\right)\]

Bernoulli

Form

\[y^{\prime}+P(x)y = Q(x)y^n\]

General Solution

\[I(x) = e^{\int (1-n)P(x)dx}\]
\[y^{1-n}= \frac{1}{I(x)}\left(\int (1-n) Q(x)I(x)dx +c\right)\]

Linear is just a bernoulli with n = 0

Homogeneous

Requirements
- All degrees have to be the same
- all variables are in the form of y/x

Form

\[\frac{dy}{dx} = F(\frac{y}{x})\]

General Solution

\[\begin{align*} v = \frac{y}{x} && \Rightarrow && y=vx\end{align*}\]
\[\begin{align*} \frac{d}{dx}(y=vx) && \Rightarrow && \frac{dy}{dx}= x \frac{dv}{dx}+v \end{align*}\]
\[x \frac{dv}{dx}+v = F(v)\]
\[\begin{align*} \frac{dv}{F(v)-v}=\frac{dx}{x} && \Rightarrow && \int\frac{dv}{F(v)-v}=\int\frac{dx}{x}\end{align*}\]
  • Substitute back in \(\large \frac{y}{x}\) for all the v's

G(ax+by)

Form

\[\frac{dy}{dx}= G(ax+by)\]

General Solution

\[\begin{align*} \frac{d}{dx}(v=ax+by) && \Rightarrow && \frac{dv}{dx}= a+b \frac{dy}{dx} && \Rightarrow && \frac{dy}{dx}= \frac{1}{b}\left(\frac{dv}{dx}-a\right)\end{align*}\]
\[\begin{align*} \frac{1}{b}\left({\frac{dv}{dx}}-a\right) = G(v) && \Rightarrow && \frac{dv}{dx}= b\,G(v)+a \end{align*}\]
\[\begin{align*} \frac{dv}{b\,G(v)+a}= dx && \Rightarrow &&\int\frac{dv}{b\,G(v)+a}= \int dx \end{align*}\]

Exact

Form

\[M(x,y)\,dx + N(x,y)\,dy = 0\]

General Solution
1.
Check if it is exact

\[\begin{align*} F_{x}=\frac{\partial F}{\partial x}=M(x,y) && \Rightarrow && F_{xy}= M_y \end{align*}\]
\[\begin{align*} F_{y}= \frac{\partial F}{\partial y} = N(x,y) && \Rightarrow && F_{yx}= N_x \end{align*}\]
  • if \(F_{xy}= F_{yx}\) equation is exact
  • if not exact, try to find a function that when multiplied into the equation will make it exact

for x's

  • \(\begin{align*} \frac{M_y-N_x}{N} \end{align*}\) if only x's remain
\[\mu (x,y) = e\large^{\int \frac{M_y-N_x}{N}dx}\]

for y's

  • \(\begin{align*} \frac{N_x-M_y}{M} \end{align*}\) if only y's remain
\[\mu (x,y) = e\large^{\int \frac{N_x-M_y}{M}dy}\]

Multiply this integrating factor into the original equation

\[\mu(x,y)[M(x,y)\,dx +N(x,y)\,dy = 0]\]
\[\mu M\,dx + \mu N \,dy = 0\]

Your new \(M\) and \(N\) is this equation

2.

\[\begin{align*}M = \frac{\partial F}{\partial x} && \Rightarrow && F(x,y) = \left(\int M\,dx\right)+g(y) \\ \\ && \text{OR} \\ \\ N=\frac{\partial F}{\partial y} && \Rightarrow && F(x,y) = \left( \int N \, dy\right)+h(x)\end{align*}\]

Take the partial derivative with respect to the other variable of this new equation

\[\begin{align*} \frac{\partial F}{\partial y} \left[ \left(\int M\, dx\right)+g(y)\right] && = && \frac{\partial F}{\partial y} \left(\int M\, dx\right)+g^{\prime}(y) \end{align*}\]
\[\begin{align*} \frac{\partial F}{\partial y} = N && \Rightarrow && N = \frac{\partial F}{\partial y} \left(\int M\, dx\right)+g^{\prime}(y)\end{align*}\]
\[\text{OR}\]
\[\begin{align*} \frac{\partial F}{\partial x} \left[ \left(\int N\, dy\right)+h(x)\right] && = && \frac{\partial F}{\partial x} \left(\int N\, dy\right)+h^{\prime}(x) \end{align*}\]
\[\begin{align*} \frac{\partial F}{\partial x} = M && \Rightarrow && M = \frac{\partial F}{\partial x} \left(\int N\, dy\right)+h^{\prime}(x)\end{align*}\]

3.

A lot will cancel leaving you with

\[\begin{align*} g^{\prime}(y) = \text{Some Stuff} && \Rightarrow && \int g^{\prime}(y)\,dx = \int\text{(Some Stuff)}\,dx \end{align*}\]
\[g(y) = \int\text{(Some Stuff)}\,dx\]
\[\text{OR}\]
\[\begin{align*} h^{\prime}(x) = \text{Some Stuff} && \Rightarrow && \int h^{\prime}(x)\,dy = \int\text{(Some Stuff)}\,dy \end{align*}\]
\[h(x) = \int\text{(Some Stuff)}\,dy\]

substitute \(g(y)\) or \(f(x)\) back into the equation from step 2
replace \(F(x,y)\) with \(c\)

Brine/Mixing problems

Will give volume and concentration going in and volume and concentration going out
The general set up is

\[\frac{dA}{dt}= (\text{Rate in} - \text{Rate out)}\]
\[\frac{dA}{dt}= F_{i} \cdot C_{i} - \frac{F_{o}C_o}{V+t(F_{i}-F_{o})}\]

\(F_{i}\) = Flow rate in
\(F_{o}\) = Flow Rate out
\(C_{i}\) = Concentration in
\(C_{o}\) = Concentration out
\(V\) = total volume of container
\(t\) = time

this should be able to be simplified into either a linear or separable differential equation

Newtons law of Cooling

\[\begin{align*} \frac{dT}{dt}= -k(T_{a}-T) && \Rightarrow && \frac{dT}{(T_{a}-T)} = -k\,dt \\ \ln|T_{a}-T| = -kt + c && \Rightarrow && |T_{a}-T| = ce^{-kt} \\ \\ \end{align*}\]
\[T \ge T_{a} \quad \Rightarrow\quad T(t)=ce^{-kt}+T_a\]
\[T < T_{a} \quad \Rightarrow \quad T(t)= T_{a}-ce^{-kt}\]

Newtonian mechanics

Net force is equal to the total forces supporting minus the total forces resisting ( \(+F_\text{res}\) because this is set up for resistance being negative)

\[\begin{align*} F_{\text{net}} = F_g+F_{\text{res}} && \Rightarrow && m \vec a = mg - vb \end{align*}\]
\[\begin{align*} m \frac{dv}{dt}= mg-vb && \Rightarrow && \frac{dv}{mg-vb}= \frac{dt}{m}\end{align*}\]
\[\begin{align*} -\frac{1}{b} \ln|mg-vb| = \frac{t}{m} + c && \Rightarrow && mg-vb = ce^{\frac{-tb}{m}}\end{align*}\]
\[v= ce^{-\frac{tb}{m}} + \frac{mg}{b}\]
\[\begin{align*} \text{assuming that } v = 0 \text{ at } t = 0 \end{align*}\]
\[\begin{align*} 0 = c + \frac{mg}{b} && \Rightarrow && c = - \frac{mg}{b} && \Rightarrow && v = - \frac{mg}{b}e^{- \frac{bt}{m}} + \frac{mg}{b} \end{align*}\]
\[\begin{align*} \int v \,dt = \int \left(- \frac{mg}{b}e^{- \frac{bt}{m}} + \frac{mg}{b}\right)\,dt \end{align*}\]
\[\begin{align*} x = \frac{m^{2}g}{b^{2}}e^{- \frac{bt}{m}} + \frac{mg}{b}t + c \end{align*}\]
\[\begin{align*} \text{assuming that } x=0 \text{ and } t=0 \end{align*}\]
\[\begin{align*} 0 = \frac{m^{2}g}{b^{2}}+c && \Rightarrow && c = -\frac{m^{2}g}{b^{2}} \end{align*}\]
\[x = \frac{m^{2}g}{b^{2}}e^{- \frac{bt}{m}} + \frac{mg}{b}t - \frac{m^{2}g}{b^{2}}\]

resistance is proportional to a square
- in this example an object is shot upwards with an initial velocity with k being an air resistance constant and being proportional to \(v^2\)

velocity with respect to time

\[\begin{align*} m \frac{dv}{dt}= -mg - kv^{2} && \Rightarrow && \frac{m\,dv}{mg+kv^{2}} =-dt&& \Rightarrow && \int \frac{m}{k} \frac{dv}{\frac{mg}{k}+v^{2}}= \int -dt\end{align*}\]
\[\begin{align*} \frac{m}{k} \frac{1}{\sqrt{\frac{mg}{k}}}\arctan\left(\frac{v}{\sqrt{\frac{mg}{k}}}\right) = -t+c \end{align*}\]
\[\begin{align*} \text{At time }t=0 \text{, velocity } v=v_{i}\text{ (initial velocity)}\end{align*}\]
\[\begin{align*} c = \frac{m\arctan\left(\frac{v_{i}}{\sqrt{\frac{mg}{k}}}\right)}{k\sqrt{\frac{mg}{k}}}\end{align*}\]
\[\begin{align*} -\frac{m\arctan\left(\frac{v}{\sqrt{\frac{mg}{k}}}\right)}{k\sqrt{\frac{mg}{k}}} + \frac{m\arctan\left(\frac{v_{i}}{\sqrt{\frac{mg}{k}}}\right)}{k\sqrt{\frac{mg}{k}}} = t\end{align*}\]

velocity with respect to position

\[\begin{align*} \frac{dv}{dx}\, mv = -mg-kv^{2} && \Rightarrow && \frac{mv\,dv}{mg+kv^{2}}= -dx\end{align*}\]
\[\int \frac{mv\,dv}{mg+kv^{2}} = \int -dx \qquad \boxed{u = mg+kv^{2} \qquad du = 2kv\,dv}\]
\[\begin{align*}\frac{m}{2k}\int \frac{du}{u}= -\int dx &&\Rightarrow && \frac{m\,\ln|mg+kv^{2}|}{2k} = -x+c \end{align*}\]
\[\begin{align*} \text{At position } x = 0 \text{, velocity }v=v_{i}\text{ (initial velocity)} \end{align*}\]
\[\begin{align*} c = \frac{m\,\ln|mg+kv_{i}^{2}|}{2k} \end{align*}\]
\[\begin{align*} -\frac{m\,\ln|mg+kv^{2}|}{2k}+\frac{m\,\ln|mg+kv_{i}^{2}|}{2k} = x\end{align*}\]

Alternative way to solve these types of problems using limits of integration

Lets assume its the same problem above where an object is being shot up and the air resistance \(k\) is proportional to \(v^{2}\) and want to find how long the object is in the air when it reaches its peak.

\[k \propto v^{2}\]
\[\begin{align*}\text{m} = 3\text{kg} && v_{i}= 500 \frac{\text{m}}{\text{sec}} \\ k=.1 && g = 9.81 \frac{\text{m}}{\text{sec}^{2}} \end{align*}\]

Everything is the same until we get to the part where we want to integrate. Rather than finding the indefinite version and solving for the constants with the given values, we can just use the limits of integration

\[\int_{v_{i}}^{v_{f}} \frac{m}{k} \frac{dv}{-\frac{mg}{k}-v^{2}}= \int_{t_{i}}^{t_{f}} dt\]
\[\int_{500}^{0} \frac{3}{.1} \left(\frac{1}{- \frac{(3)(9.81)}{.1}-v^{2}}\right)\,dv = \int_{0}^{t_\text{final}}dt\]
\[\begin{align*} t_\text{final} = 2.6869...\text{sec} \end{align*}\]
\[\begin{align*} \end{align*}\]

Both will give the same answer but this method can save some time, especially when using a calculator to numerically solve the integral.
Note: if you were to solve the generalized integral with the \(v_{f},v_{f}, t_{i},\) and \(t_{f}\) limits, you will get the same \(\arctan\) equation as above.