\documentclass[12pt]{amsart}
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\topmargin}{-0.5in}
\usepackage{amssymb,amsmath,amsfonts,graphicx,psfrag}

\pagestyle{empty}
\newcommand{\dis}{\displaystyle}
\newcommand{\bd}{\partial}
\begin{document}
{%\Large

\begin{center}
{\bf Second Order Differential Equations that can be Transformed into First Order Differential Equations}
\end{center}

This Lecture covers material developed in the exercises (36-51) on pages 135--136 of the Boyce \& DiPrima textbook.

A second order differential equation is one that involves second derivatives. Normally they have two initial conditions.

{\bf Example 1.}  Consider $\dis y'' + \frac{y'}{t+1} = 2$ with $y(0) = 1$ and $y'(0) = 2$.

\begin{proof}[Solution]
Notice that there is no $y$ term. If we let $v=y'$ we get 
\[
v' + \frac{v}{t+1} = 2 \mbox{   with  } v(0) = 2.
\]
Now this is a first order equation. It is linear. Let,
\[
\mu(t) = e^{\int \frac{1}{t+1}\, dt} = e^{\ln|t+1| + C} = C|t+1|.
\]
We will use $\mu = t+1$. Now we have,
\begin{eqnarray*}
(t+1)v' + v &=& 2(t+1) \\
((t+1)v)' &=& 2t+2 \\
(t+1)v &=& t^2 + 2t + C_1\\
v &=& \frac{t^2 + 2t + C_1}{t+1}
\end{eqnarray*}

Since $v(0) = 2$ we get $C_1=2$. Now we find $y(t)$.




\begin{eqnarray*}
y' &=& v \\
y  &=& \int \frac{t^2+2t+2}{t+1}\, dt \\
y  &=& \int t+1 + \frac{1}{t+1} \, dt, \:\:\:\:\: \mbox{    (by long division) }\\
y  &=& \frac{1}{2}t^2 + t + \ln |t+1| + C_2.
\end{eqnarray*}

Since $y(0)=1$ have $1 = 0 + 0 + \ln |1| + C_2$. Hence $C_2 = 1$. Finally, 
\[
y(t) = \frac{1}{2}t^2 + t + \ln (t+1) + 1, \:\: \mbox{   for   } t > -1.
\]
\end{proof}

\vspace{.25in}
%\vfill
%\pagebreak
{\bf Example 2.} Solve $y' y'' = 2$, with $y(0)=1$ and $y'(0)=2$.

\begin{proof}[Solution]
Again $y$ does not appear. Let $v = y'$. Then we get $v v' =2$. This is separable.

\begin{eqnarray*}
\int v \, dv &=& \int 2 \, dt. \\
\frac{1}{2}v^2 &=& 2t+ C_1. \\
\frac{1}{2}v^2 &=& 2t + 2, \:\: \mbox{ since } v(0) = y'(0) = 2. \\
v &=& \pm \sqrt{4t + 4}. \\
v &=& \sqrt{4t+4}, \:\:\mbox{   since } v(0) = 2 > 0.
\end{eqnarray*}

Now integrate $v$ to get $y$.
\begin{eqnarray*}
y &=& \int v \, dt \\
  &=& 2 \int \sqrt{t+1} \, dt \\
  &=& \frac{4}{3} (t+1)^{\frac{3}{2}} + C_2 \\
  &=& \frac{4}{3} (t+1)^{\frac{3}{2}} - \frac{1}{3}, \:\: \mbox{ since } y(0) = 1.
\end{eqnarray*}


Thus,
\[
y(t) = \frac{4(t+1)^{\frac{3}{2}} -1}{3} \mbox{   for } t>-1.
\]
\end{proof}

%\vfill
%\pagebreak
\vspace{.2in}

{\bf Example 3.} Find the general solution to $y y'' + (y')^2 = 0$, with independent variable $t$. Notice that $t$ does not appear, except in the 
differentiation symbols $\frac{d}{dt}$ if we write it out ``longhand''. 

\begin{proof}[Solution] 
It turns out the same substitution $v = y'$ will work, but the steps are different. The result at first looks innocent enough:
\[
y v' + v^2 = 0.
\]
It looks separable, but this is not valid. The reason is clearer if we write it as
\[
y\frac{dv}{dt} + v^2 = 0.
\]
There are three variables. The $v'$ did not mean $\frac{dv}{dy}$ so this not an equation form we have studied. 

The way around this is to think of $v$ as a function of $y$.  Then
\[
\frac{d\,v(y(t))}{dt} = \frac{dv}{dy}\frac{dy}{dt} =  \frac{dv}{dy} v = v'v,
\]
where $v'$ is understood to mean the derivative with respect to $y$.
Now we have
\[
y v v' + v^2 = 0.
\]
This is now a true first order equation. Dividing by $v$ makes in linear.
\begin{eqnarray*}
yv' + v &=& 0.\\
(yv)' &=& 0. \\
yv &=& C_1. \\
v &=& C_1/y.
\end{eqnarray*}
Now convert back to $y$ and $t$.
\begin{eqnarray*}
\frac{dy}{dt} &=& C_1/y. \\
\int y \, dy &=& \int C_1 \, dt. \\
\frac{1}{2}y^2 &=& C_1 t + C_2. \\
y &=& \pm\sqrt{C_1t + C_2}.
\end{eqnarray*}
This then is the general solution. 
\end{proof}

{\bf Example 3'.} We now consider Example 3 with initial conditions given by $y(t_o)=a$ and $y'(t_o)=b$. If $a\neq 0$, then the sign of $a$ resolves the $\pm$ sign. It is easier to work with
\[
y^2 = C_1t+C_2.
\]
Then taking the derivative gives
\[
2yy' = C_1.
\]
Thus, $C_1 = 2ab$ and $C_2 = a^2-2abt_o$.

But, what if $a=0$? Then we get $C_1=C_2=0$, so the $\pm$ does not matter. It seems $y(t)=0$. But, this presents a difficultly. What if $y'(t_o)=b\neq 0$? Then there are no solutions. Notice that in Example 3 we divided through by $v$, which is $y'$. This step is invalid if $y'$ is ever zero. 



%\vfill
%\pagebreak
\vspace{.2in}

{\bf Example 4.} Find the general solution to $y'' + y (y')^3 = 0$. Let $t$ be the independent variable.

\begin{proof}[Solution]
Let $v=y'$. Then use \[\frac{d^2y}{dt^2} = \frac{dv}{dt} = \frac{dv}{dy} \frac{dy}{dt} = v'v,\]
where the last $v'$ now means the derivative with respect to $y$. Then the problem becomes,
\[vv' + yv^3 = 0,\]
or 
\[ v' = -yv^2,\]
which is separable. We have
\begin{eqnarray*}
\int v^{-2} \,dv &=& \int -y \, dy \\
-v^{-1}  &=& - \frac{1}{2}y^2 +C_1 \\
v &=& \frac{1}{ \frac{1}{2}y^2 -C_1} \\
\frac{dy}{dt} &=& \frac{2}{y^2 +C_1},\:\: (\mbox{new } C_1) \\
\int y^2 + C_1 \, dy &=& \int 2 \, dt \\
\frac{1}{3}y^3 + C_1 y + C_2 &=& 2t \\
y^3 + C_1 y + C_2 &=& 6t \:\:\:\: (\mbox{new } C_1 \& C_2)
\end{eqnarray*}
There is no simple way to solve for $y$, so we'll leave it in this form.

But, notice that $y=C$ also solves the original differential equation.
Can you see why we missed this case?
\end{proof}

\vspace{.2in}

{\bf Example 4'.} Let's look more closely at initial conditions.
Suppose $y(t_o)=a$ and $y'(t_o)=b$. This gives the set of two equations in two unknowns.

\[
a^3+C_1a+C_2 = 6t_o.
\]

\[
b=\frac{2}{a^2+C_1/3}.
\]

If $b=0$ this second equation has no solutions. But, in this case the constant function $y(t)=a$ solves the differential equation and satisfies the initial conditions.

Assume $b\neq 0$. Then $C_1 = 3(2/b - a^2)$. From this you can show $C_2= 6t_o-a^3-C_1a$.

\vspace{.2in}

{\bf Extra Credit.} Suppose the initial conditions in Example 4 are $y(0) = a$ and $y(1) =b$. (So, no $y'(0)$.)
Show that there are unique values for $C_1$ and $C_2$, unless $a=b$. What is the solution when $a=b$?




%\vfill
%\pagebreak

\vspace{.2in}

{\bf Example 5.} Solve $y'' + (y')^2 - 4y = 2$, with  $y(0)=0$ and $y'(0) = 0$. Let $t$ be the independent variable. 

\begin{proof}[Solution]
Let $v = y' = \frac{dy}{dt}$. Then use \[\frac{d^2y}{dt^2} = \frac{dv}{dt} = \frac{dv}{dy} \frac{dy}{dt} = v'v,\]
where the last $v'$ now means the derivative with respect to $y$. Then the problem becomes,
\[
v v' + v^2 - 4y = 2, 
\]
with $y$ taken as the independent variable. Rewrite as
\[
(v^2 - 4y-2) + v v' = 0.
\]
Let $M = v^2 - 4y-2$ and $N=v$. Then
\[
\frac{\bd M}{\bd v} = 2v \hspace{.7in} \frac{\bd N}{\bd y} = 0.
\]
It is not exact, but
\[
\frac{M_v - N_y}{N} = 2,
\]
which does not depend on $v$. Thus, we use $\mu = e^{2y}$ as an integrating factor. Now we have
\[
e^{2y}(v^2 - 4y -2) + e^{2y}v v' = 0.
\]
You can check that it is exact. Now,
\[
\psi(y,v) = \int (v^2 -4y -2)e^{2y} \, dy = \frac{1}{2}(v^2-2)e^{2y} + (1-2y)e^{2y} + C_1(v) 
\]
\[ \hspace{4in} = \frac{1}{2}v^2e^{2y} - 2ye^{2y} + C_1(v),
\]
and
\[ 
\psi(y,v) = \int ve^{2y} \, dv = \frac{1}{2}v^2 e^{2y} + C_2(y).
\]
If we let $C_1(v)=0$ and $C_2(y)=  - 2ye^{2y}$ we have our solution:
\[
\psi(y,v) =  \frac{1}{2}v^2e^{2y} - 2ye^{2y} = C_3.
\]
At $t=0$ both $y(0)$ and $v(0) = y'(0) = 0$. Thus $C_3$ must be zero. Now we can simplify and get
\[
v^2 = 4y \:\:\: \mbox{ or } \:\:\: (y')^2 = 4y.
\]
Thus, $y' = \pm 2 \sqrt{y}$, which is separable. Next
\[
\int y^{-1/2} \, dy = \pm \int 2 \, dt = \pm 2t + C_4.
\]
Thus, $2 y^{\frac{1}{2}} =  \pm 2t + C_4$. Since $y(0) = 0$ we get that $C_4= 0$. Hence, the solution 
is \[
y(t) = t^2.
\]
\end{proof}

%\vfill
%\pagebreak

\vspace{.2in}
\begin{center}{\bf Summary}\end{center}
\vspace{.2in}

In this lecture we have developed two methods for reducing certain second
order differential equations to first order  differential equations. Both
start with a substitution or ``change of variables'' given by
\[
v = \frac{dy}{dt}.
\]

\noindent{\bf Case 1.} If the given equation does not contain any ``y'' terms, replace
all occurrences of $y'$ with $v$ and of $y''$ with $v'$. In this case the derivatives
are all with respect to the original independent variable, $t$. Once you solve for $v(t)$
integrate it to get $y(t)$. The finial result will have two arbitrary constants.
This was the method used in Examples 1 \& 2.

\vspace{.25in}

\noindent{\bf Case 2.}  If the given equation does not contain any ``t'' terms, the situation is trickier.
You replace any occurrences of $y'$ with $v$, but for $y''$ you use the following:
\[
\frac{d^2y}{dt^2} = \frac{dv}{dt} = \frac{dv}{dy}\frac{dy}{dt} = v'v,
\]
where $v'$ means the derivative with respect to $y$. The resulting equation
is a first order differential equation in $v$ with independent variable $y$.

Solve it for $v(y)$. Then you have a problem of the form
\[
\frac{dy}{dt} = v(y)
\]
which is separable, in fact it is autonomous. Solve it by
\[
\int \frac{1}{v(y)} \, dy = \int\, dt = t+C_2,
\]
then solve the result for $y(t)$ if possible. 

Finally, check by inspection to see if $y(t) = $ a constant will work. Solutions may not work for
all initial conditions. 

This was the method used in Examples 3, 4, \& 5. (This method could be applied to Example 2 as well, but the first method is usually easier.)
}

\vspace{.2in}
{\bf Student Exercises.} Solve the following if possible.

\begin{enumerate}
\item $y'' - y' = e^t$, $y(0)=y'(0)=1$.

\item $xy'' - 2y' = 4x^3$, $y(0)=1$, $y'(0)=3$. Explain what goes wrong. 
\item $y''+2yy'=0$, with $t$ as the independent variable.

%\item
\end{enumerate}

\vspace{.2in}

{\em Answers.}

\begin{enumerate}
\item $y(t)=te^t + 1$.
\item $y(x)= x^4 + C_1x^3 + C_2$ is the general solution. Why is it not valid for the given initial conditions? 
\item $y=-a\tan(at+b)$ or $a\tanh (at+b)$ or a constant.  
%\item
\end{enumerate} 


\end{document}
