# A Relentless Pursuit

Problem: Solving differential equation

$y \frac{d^2y}{dx^2} - (\frac{dy}{dx})^2 = 1.\quad\quad\quad(1)$

Solution:

Let

$p = \frac{dy}{dx}.\quad\quad\quad(2)$

Then by chain rule,

$\frac{d^2 y}{dx^2} = \frac{dp}{dx} =\frac{dp}{dy}\cdot\frac{dy}{dx} = p\frac{dp}{dy}.$

Rewrite (1) as

$y\cdot p\frac{dp}{dy} - p^2=1.$

Equivalently,

$\frac{p}{1+p^2}\cdot\frac{dp}{dy} = \frac{1}{y}.\quad\quad\quad(3)$

Integrate (3) with respect to $y$ gives

$\displaystyle\int \frac{1}{2}\cdot\frac{2p}{1+p^2}\cdot\frac{dp}{dy}\;dy =\displaystyle \int \frac{1}{y}\;dy\implies\frac{1}{2}\log(1+p^2)= \log(y) + C.$

Hence

$\log(\sqrt{1+p^2}) - \log(y) = C.$

Or,

$\frac{\sqrt{1+p^2}}{y} = e^{C}=\frac{1}{C_1}\quad\quad\quad(4)$

where $C_1 > 0$ since $e^C>0$.

Square (4) gives

$\frac{1+p^2}{y^2} = \frac{1}{C_1^2}.\quad\quad\quad(5)$

Solving for $p$ from (5), we obtain

$p^2 = \frac{y^2-C_1^2}{C_1^2} \overset{(4)}{\implies} p = \pm \frac{\sqrt{y^2-C_1^2}}{C_1}.$

And so,

$\frac{dy}{dx} \overset{(2)}{=} \frac{\sqrt{y^2-C_1^2}}{\pm C_1}.$

Or,

$\pm C_1\cdot\displaystyle\frac{1}{\sqrt{y^2-C_1^2}}\cdot\frac{dy}{dx} = 1.\quad\quad\quad(6)$

Integrate (6) with respect to $x$ yields

$\pm C_1\cdot\displaystyle\int\frac{1}{\sqrt{y^2-C_1^2}}\cdot\frac{dy}{dx}\;dx= \int\;dx\overset{(\star)}{\implies}\pm C_1\cdot\cosh^{-1}\left(\frac{y}{C_1}\right)=x+C_2.$

i.e.,

$\cosh^{-1}(\frac{y}{C_1}) = \frac{x+C_2}{\pm C_1}.$

Therefore,

$y = C_1\cdot\cosh\left(\frac{x+C_2}{\pm C_1}\right)=C_1\cdot\cosh\left(\frac{x+C_2}{C_1}\right)$

since $\cosh$ is an even function.

Let $y=C_1z \implies \frac{dy}{dz}=C_1.$

$\displaystyle\int \frac{1}{\sqrt{y^2-C_1^2}} \;dy=\int\frac{C_1}{\sqrt{(C_1z)^2-C_1^2}}\;dz\overset{C_1>0}{=}\int\frac{1}{\sqrt{z^2-1}}\;dz\overset{(\star\star)}{=}\cosh^{-1}(z)$

$=\cosh^{-1}(\frac{y}{C_1}).$

i.e.,

$\displaystyle\int \frac{1}{\sqrt{y^2-C_1^2}} \;dy = \cos^{-1}\left(\frac{y}{C_1}\right).\quad\quad\quad(\star)$

Let $z = \sec(\theta) \implies \frac{dz}{d\theta} = \sec(\theta)\tan(\theta).$

$\displaystyle\int \frac{1}{\sqrt{z^2-1}}\;dz=\displaystyle\int \frac{\sec(\theta)\tan(\theta)}{\sqrt{\sec(\theta)^2-1}}\;d\theta$

$= \displaystyle\int \sec{\theta}\;d\theta \overset{(\star\star\star)}{=} \log(\sec(\theta)+\tan(\theta)) = \log(z + \sqrt{z^2-1})$

By definition (see “Deriving Two Inverse Functions“),

$= \cosh^{-1}(z).$

i.e.,

$\displaystyle\int \frac{1}{\sqrt{z^2-1}} = \cosh^{-1}(z).\quad\quad\quad(\star\star)$

Without using a CAS,

$\displaystyle \int \sec(x)\;dx = \displaystyle\int\frac{1}{\cos(x)}\;dx=\displaystyle\int \frac{\cos(x)}{\cos(x)^2}\;dx= \displaystyle\int\frac{\cos(x)}{1-\sin(x)^2}\;dx$

Let $t = \sin(x) \implies 1 = \cos(x)\frac{dx}{dt}\implies \frac{dx}{dt} = \sec(x)$,

$=\displaystyle\int \frac{1}{1-t^2} \;dt = \displaystyle\int\frac{1}{2}\left(\frac{1}{1-t} + \frac{1}{1+t}\right)\;dt=\frac{1}{2}(-\log(1-t) + \log(1+t))$

$= \frac{1}{2}\log\left(\frac{1+t}{1-t}\right)=\frac{1}{2}\log\left(\frac{(1+t)(1+t)}{(1-t)(1+t)}\right)=\frac{1}{2}\log\left(\frac{(1+t)^2}{1-t^2}\right)=\frac{1}{2}\log\left(\frac{(1+\sin(x))^2}{1-\sin(x)^2}\right)$

$=\frac{1}{2}\log\left(\frac{(1+\sin(x))^2}{\cos(x)^2}\right)=\log\left(\frac{1+\sin(x)}{\cos(x)}\right)=\log(\sec(x) + \tan(x)).$

i.e.,

$\displaystyle\int \sec(x)\;dx = \log(\sec(x) + \tan(x)).\quad\quad\quad(\star\star\star).$

Exercise-1 What is the derivative of $\cosh^{-1}(x)?$ hint: $(\star\star)$