
Consider the firstorder ODE $$ y'=f(t,y) $$ describing the evolution of $y$ as a function of $t$. If we know initial conditions $y(t_{0})=y_{0}$, two questions immediately come to mind:
The first question is easily addressed:
The second question is much more difficult, and often we need to resort to numerical methods. However, in this tutorial we review four of the most commonlyused analytic solution methods for firstorder ODES.
Separating the VariablesIf an ODE can be written in the form $$ \frac{\partial y}{\partial t}=\frac{g(t)}{h(y)}, $$ then the ODE is said to be separable. In this case, a simple solution technique can be derived as follows: Suppose $y=f(t)$ solves the ODE. Rewriting the ODE as $h(y)y'=g(t)$,
Upon integrating, we have our implicitlydefined general solution of the ODE, which we can often solve explicitly for $y(t)$.
ExampleLet's solve the separable ODE $y' = \frac{4y}{t}$. Separating the variables and integrating,
The general solution, $y=Ct^4$, defines a family of solution cuves corresponding to various initial conditions.
Using an Integrating Factor to solve a Linear ODEIf a firstorder ODE can be written in the normal linear form $$ y'+p(t)y= q(t), $$ the ODE can be solved using an integrating factor $\mu (t)= e^{\int p(t)dt}$:
Dividing through by $\mu (t)$, we have the general solution of the linear ODE.
ExampleWe can solve the linear ODE $y'2ty=t$ using an integrating facter. Here, $p(t)=2t$ and $q(t)=1$, so $$ \mu (t) = e^{\int 2t dt}=e^{t^{2}} $$ Multiplying both sides of the ODE by $\mu (t)$,
So the general solution of $y'2ty=t$ is $y(t)=Ce^{t^{2}}\frac{1}{2}$. For practice, solve $y' = \frac{4y}{t}$ by putting it in normal linear form and using an integrating factor. Verify that you get the same result as we did by separating the variables.
Using a Change of VariablesOften, a firstorder ODE that is neither separable nor linear can be simplified to one of these types by making a change of variables. Here are some important examples:
When using a change of variables, solve the transformed ODE and then return to the original variables to obtain the general solution of the original ODE. Often, you will have to leave your solution in implicit form.
ExampleLet's solve the ODE $\frac{dy}{dx}=\frac{yx}{x4y}$. To see that it is homogeneous of order 0, note that $$ f(kx,ky)= \frac{kykx}{kx4ky}=\frac{yx}{x4y}=f(x,y). $$ Let $z=\frac{y}{x}$. Then $y=xz$, so $\frac{dy}{dx}=x\frac{dz}{dx}+z$. The ODE becomes \begin{eqnarray*} x\frac{dz}{dx}+z &= & \frac{xzx}{x4xz} \\ x\frac{dz}{dx}+z &= & \frac{z1}{14z}\\ x\frac{dz}{dx} & = & \frac{4z^{2}1}{14z}, \end{eqnarray*} which is separable. Separating the variables and integrating,
The general solution, $(2y+x)^{3}(2yx) = C$, is written implicitly.
Finding an Integral for an Exact EquationAn ODE $N(x,y)y' + M(x,y) = 0$ is an exact equation if $\frac{\partial N}{\partial x} = \frac{\partial M}{\partial y}$ in a region of the $xy$plane. If we can find a function $H(x,y)$ for which $\frac{\partial H}{\partial x}= M$ and $\frac{\partial H}{\partial y}= N$, then $H(x,y)$ is called an integral of the ODE and $H(x,y) = C$ is the general solution of the original ODE. To find $H(x,y)$, note that $$ H(x,y) = \int M(x,y)dx + g(y) $$ for some $g(y)$ since $\frac{\partial H}{\partial x}= M(x,y)$. To find $g(y)$, calculate $$ \frac{\partial H}{\partial y}=\frac{\partial}{\partial y} \left[ \int M(x,y)dx \right] + g'(y) $$ and set it equal to $N(x,y)$. Solve for $g'(y)$ (which will be independent of $x$) and integrate with respect to $y$ to obtain $g(y)$, and so $H(x,y)$, explicitly. Notice that our solution $H(x,y) = C$ is written in implicit form. (Alternatively, we can start with $H(x,y) = \int N(x,y)dy + h(x)$ for some $h(x)$ and proceed accordingly.)
ExampleThe ODE $\left( 2yx^{2} + 4 \right) \frac{dy}{dx} + \left( 2y^{2}x 3 \right) = 0$ is exact, since for $N(x,y) = 2yx^{2} + 4$ and $M(x,y) = 2y^{2}x 3$, $$ \frac{\partial N}{\partial x}=4xy=\frac{\partial M}{\partial y}. $$ Thus, there exists an integral $H(x,y)$ for which $$ \frac{\partial H}{\partial x}= 2y^{2}x3 \mathrm{~and~} \frac{\partial H}{\partial y}= 2yx^{2}+4. $$ From the first of these, \begin{eqnarray*} H(x,y) &= & \int \left( 2y^{2}x 3 \right) dx + g(y) \\ H(x,y) &= & y^{2}x^{2}3x+g(y) . \end{eqnarray*} Then $\frac{\partial H}{\partial y}=2yx^{2} + g'(y)=2yx^{2}+4$, so $g'(y)=4$. Integrating, $g(y)= 4y$, so $H(x,y)= y^{2}x^{2}3x+4y$. The general solution is given implicitly by $$ y^{2}x^{2}3x+4y =C. $$
Key Concepts
