First-Order Differential Equations

Consider the first-order ODE, which is when the highest derivative appearing in the equation is a first derivative.

    Does $y’=f(t,y)$, $y(t_)=y_$ have a solution?

The first question is easily addressed:

Existence and Uniqueness Theorem

Suppose that $f(t,y)$ and $\frac<\partial f(t,y)><\partial y>$ are continumous on a closed rectangle $R$ of the $ty$-plane. If $(t_,y_) \in R$, then the IVP, an ODE along with a specified initial condition, $$ y’=f(t,y), \quad y(t_)=y_ $$ has a unique solution $y(t)$ on some $t$-interval containing $t_$.

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 commonly-used analytic solution methods for first-order ODES.

Separating the Variables

If an ODE can be written in the form $$ \frac<\partial y><\partial t>=\frac, $$ 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)$,

$$\begin h(f(t))f'(t) &= &g(t) \\ \int h(f(t))f'(t)dt &= &\int g(t)dt +C \\ \int h(y)dy & = & \int g(t)dt +C. \end$$

Integrating with respect to $t$ on each side.

Upon integrating, we have our implicitly-defined general solution of the ODE, which we can often solve explicitly for y(t). A solution of an ODE is said to be written implicitly if it has the form $H(xy)=C$, rather than being solved for y in terms of x.

Example

Let’s solve the separable ODE $y’ = \frac$. Separating the variables and integrating,

Recall that
$r\ln a = \ln a^ \mathrm$
$\ln a – \ln b = \ln \frac.$

The general solution, $y=Ct^4$, defines a family of solution cuves corresponding to various initial conditions.

View Solution

Follow the image link for a complete description of the image

Using an Integrating Factor to solve a Linear ODE

If a first-order 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>$:

Multiplying both sides of the ODE by $\mu (t)$.

$\left( \mu (t)y \right) ‘ = \mu (t)y’ + \mu ‘(t)y$ and $\mu ‘(t) = p(t) \mu (t)$ using the chain rule to differentiate $\mu (t)= e^<\int p(t)dt>$.

Integrating each side with respect to $t$.

Dividing through by $\mu (t)$, we have the general solution of the linear ODE.

Example

We 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^> $$ Multiplying both sides of the ODE by $\mu (t)$,

You can verify that $(e^>y)’=e^>(y’-2ty)$ by using the Chain Rule to differentiate $e^>y$

Integrating each side with respect to $t$.

Dividing through by $e^>$.

So the general solution of $y’-2ty=t$ is $y(t)=Ce^>-\frac$.

For practice, solve $y’ = \frac$ 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.

View Solution

Follow the image link for a complete description of the image

Using a Change of Variables

Often, a first-order 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:

Homogeneous Equation of Order 0: $\frac = f(x,y)$ where $f(kx,ky)= f(x,y)$. Use the change of variables $z=\frac$ to convert the ODE to $x\frac = f(1,z)-z$, which is separable.

Derivation

Let $z=y/x$. Then $y=xz$, and

Substituting into the original equation,

Since $f(kx,ky)=f(x,y)$ for all $k$.

We recommend understanding the change of variables procedure, rather
than memorizing the equation that results! After solving this separable equation, use $z=y/x$ to return to the original variables.

Bernoulli Equation: $\frac+p(t)y= q(t)y^ \quad
(b \not= 0,1)$. Use the change of variables $z=y^$ to convert the ODE to $\frac + (1-b)p(t)z=(1-b)q(t)$, which is linear.

Derivation

After solving this linear equation, use $z= y^$ to return to the
original variables.

Riccati Equation: $\frac=a(t)y+b(t)y^+ F(t)$. If one particular solution $g(t)$ is known, use the change of variables $z=\frac$ to convert the ODE to $\frac+ (a+2bg)z=-b$, which is linear.

Derivation

Suppose that $y=g(t)$ solves the ODE.

Substituting into the original ODE,

\begin g'(t) -\frac>\frac & = & a(t)\left[ g(t)+\frac \right] + b(t)\left[ g(t)+\frac \right] ^ + F(t)\ g'(t) -\frac>\frac & = & a(t)g(t) + a(t)\frac + b(t)\left( g(t) \right) ^ + 2b(t)g(t)\frac + b(t)\frac>+ F(t) \ -\frac>\frac & = & \left[ a(t)g(t) + b(t)\left( g(t) \right) ^ + F(t) -g'(t) \right] + \left( a(t) + 2b(t)g(t) \right) \frac + b(t)\frac> \ -\frac>\frac & = & (a+2bg)\frac + \frac> \ \frac & = & -(a+2bg)z – b \ \frac + (a+2bg)z & = & -b . \end

$g'(t) = ag+ bg^ + F(t)$, since $g(t)$ solves
the original ODE.

After solving this linear equation, use $y=g(t) + \frac$ to
return to the original variables.

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.

Example

Let’s solve the ODE $\frac=\frac$. To see that it is homogeneous of order 0, note that $$ f(kx,ky)= \frac=\frac=f(x,y). $$

Let $z=\frac$. Then $y=xz$, so $\frac=x\frac+z$. The ODE becomes \begin x\frac+z &= & \frac \\ x\frac+z &= & \frac\\ x\frac & = & \frac-1>, \end which is separable. Separating the variables and integrating,

\begin \int \frac-1>dz &= & \int \fracdx \\ \int \left( \frac + \frac \right) dz & = & \int \fracdx \\ -\frac \ln |2z+1| – \frac \ln |2z-1| & = & \ln |x| + C_\\ 3 \ln |2z+1| + \ln |2z-1| & = & -4\ln |x| + C_\\ \ln \left| (2z+1)^(2z-1)x^ \right| & = & C_\\ e^<\ln \left| (2z+1)^(2z-1)x^ \right|> & = & e^\\ \left| (2z+1)^(2z-1)x^ \right| & = & C\\ \left( 2\frac+1 \right) ^ \left( 2\frac-1 \right)x^ & = & C\\ (2y+x)^(2y-x) & = & C. \end

Using partial fractions.

Multiplying through by $-4$ and relabelling $-4C_$ as $C_$.

Returning to the original variables using $z=y/x$.

The general solution, $(2y+x)^(2y-x) = C$, is written implicitly.

View Solution

Follow the image link for a complete description of the image

Finding an Integral for an Exact Equation

An 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'(x,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.

Example

The ODE $\left( 2yx^ + 4 \right) \frac + \left( 2y^x -3 \right) = 0$ is exact, since for $N(x,y) = 2yx^ + 4$ and $M(x,y) = 2y^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^x-3 \mathrm \frac<\partial H><\partial y>= 2yx^+4. $$ From the first of these, \begin H(x,y) &= & \int \left( 2y^x -3 \right) dx + g(y) \\ H(x,y) &= & y^x^-3x+g(y) . \end Then $\frac<\partial H><\partial y>=2yx^ + g'(y)=2yx^+4$, so $g'(y)=4$.

Integrating, $g(y)= 4y$, so $H(x,y)= y^x^-3x+4y$.

The general solution is given implicitly by $$ y^x^-3x+4y =C. $$