# How to solve this differential equation? $y''-\frac{y'}{x}=4x^{2}y$

How to solve $y''-\displaystyle\frac{y'}{x}=4x^{2}y$ ?

I know that the solution of this equation is: $y = e^{x^{2}}$, but I cannot resolve.

First I thought that $z=y'$ could be, but was not.

-
One question mark is enough. –  Mariano Suárez-Alvarez Nov 23 '10 at 2:30
Mariano, Mike, sorry by question mark. –  Bryan Yocks Nov 23 '10 at 2:52

Note that we have $xy'' - y' = 4x^3y$. The LHS in some sense is dimensional consistent and looks something similar to a quotient rule provided we divide by $x^2$. So dividing by $x^2$ and doing algebraic manipulations we get $(\frac{1}{x}y')' = 4xy$. Now this looks familiar to some extent.

Rewriting, we get $(\frac{y'}{2x})' = 2xy$.

Now let $\frac{y'}{2x} = z(x)$. Plug this in and simplify to get $z' = \frac{y'}{z}y$

(Replace $2x$ by $\frac{y'}{z}$).

So we have $z^2 = y^2 + c$.

Thus we have now converted a second order differential equation in terms of first order differential equation, viz,

$\frac{1}{2x}\frac{dy}{dx} = \pm \sqrt{y^2 + c}$.

where $c$ is a constant.

(You could plug this in and check that this satisfies the second order differential equation.)

We now need other conditions (boundary/ initial conditions) to completely solve the problem i.e. to eliminate $c$ and other constant which will arise after solving the first order differential equation to get $y(x) = \exp(x^2)$.

(Note that taking $c =0$ we get a simple ode and the solution to which is $y(x) = y(0) \exp(\pm x^2)$).

$\textbf{EDIT:}$

The first order ODE can be solved as follows:

$\textbf{CASE 1:}$

Let $c > 0$, then let $c = a^2$

Rearranging, we get

$\frac{dy}{\sqrt{y^2 + a^2}} = \pm d(x^2)$

$y = a \tan(\theta)$, we get $dy = a \sec^2(\theta) d\theta$.

Hence, the ode now becomes,

$\sec(\theta) d\theta = \pm d(x^2)$

$d(log(\sec(\theta) + \tan(\theta))) = \pm d(x^2)$.

$log(\sec(\theta) + \tan(\theta)) = \pm (x^2 + k)$

$\sec(\theta) + \tan(\theta) = \exp(\pm (x^2 + k))$

Substitute for $\theta$ in terms of $y$ to get,

$\frac{y}{a} \pm \sqrt{1+(\frac{y}{a})^2} = K \exp(\pm x^2)$

$\textbf{CASE 2:}$

Let $c > 0$, then let $c = -a^2$.

Rearranging, we get

$\frac{dy}{\sqrt{y^2 - a^2}} = \pm d(x^2)$

$y = a \sec(\theta)$, we get $dy = a \sec(\theta) \tan(\theta) d\theta$.

Hence, the ode now becomes,

$\sec(\theta) d\theta = \pm d(x^2)$

$d(log(\sec(\theta) + \tan(\theta))) = \pm d(x^2)$.

$log(\sec(\theta) + \tan(\theta)) = \pm (x^2 + k)$

$\sec(\theta) + \tan(\theta) = \exp(\pm (x^2 + k))$

Substitute for $\theta$ in terms of $y$ to get,

$\frac{y}{a} \pm \sqrt{(\frac{y}{a})^2 - 1} = K \exp(\pm x^2)$

$\textbf{CASE 3:}$

Let $c = 0$.

The equation, we have now is $\frac{dy}{dx} = \pm 2xy$.

Solving, we get $y(x) = K \exp(\pm x^2)$.

-
Thanks Sivariam . –  Bryan Yocks Nov 23 '10 at 3:14
It sounds great, but you solution is not enough general. –  doraemonpaul Jun 16 '12 at 21:44
@doraemonpaul What do you mean by "the solution is not general enough"? –  user17762 Jun 16 '12 at 21:46

$\rm\quad\quad\quad \ y'\ =\ f\ y$

$\rm\quad\Rightarrow\ y''\ =\ f\:'\ y + f^{\:2}\ y$

$\rm\quad\displaystyle\Rightarrow\ y''\ = \frac{f\:'}f\ y' + f^{\:2}\ y$

So $\rm\quad\displaystyle y''\ = \ \frac{1}x\ y' + 4x^2\ y\ \ \Rightarrow\ \ f\ =\ \pm 2\:x$

and $\rm\ y'\ =\ \pm 2\:x\ y\ \ \Rightarrow\ \ y\ =\ c\ e^{\pm x^2}$

-
This is amazing, thank you –  Bryan Yocks Nov 23 '10 at 3:03
How does it follow that $f = \pm 2x$? It is one of the solutions, but couldn't there be others? For instance, even though it is trivial, $y=0$ admits any $f$. –  Aryabhata Nov 23 '10 at 3:32
@Moron: Hint: uniqueness theorem –  Bill Dubuque Nov 23 '10 at 3:50
@Bill: What is the motivation for $y'=fy$ ? –  user17762 Nov 23 '10 at 4:02
seeing the solution? ;) Seriously though it is equivalent to guessing $y = e^{f(x)}$ and then finding $f'(x)$, which might not occur to one without knowing in advance. –  Zarrax Nov 23 '10 at 4:19

$y''-\dfrac{y'}{x}=4x^2y$

$x\dfrac{d^2y}{dx^2}-\dfrac{dy}{dx}-4x^3y=0$

which belongs to a second order linear ODE of the form http://eqworld.ipmnet.ru/en/solutions/ode/ode0208.pdf

From there, we get the hints of let $t=x^n$ ,

Then $\dfrac{dy}{dx}=\dfrac{dy}{dt}\dfrac{dt}{dx}=nx^{n-1}\dfrac{dy}{dt}$

$\dfrac{d^2y}{dx^2}=\dfrac{d}{dx}\left(nx^{n-1}\dfrac{dy}{dt}\right)=nx^{n-1}\dfrac{d}{dx}\left(\dfrac{dy}{dt}\right)+n(n-1)x^{n-2}\dfrac{dy}{dt}=nx^{n-1}\dfrac{d}{dt}\left(\dfrac{dy}{dt}\right)\dfrac{dt}{dx}+n(n-1)x^{n-2}\dfrac{dy}{dt}=nx^{n-1}\dfrac{d^2y}{dt^2}nx^{n-1}+n(n-1)x^{n-2}\dfrac{dy}{dt}=n^2x^{2n-2}\dfrac{d^2y}{dt^2}+n(n-1)x^{n-2}\dfrac{dy}{dt}$

$\therefore x\left(n^2x^{2n-2}\dfrac{d^2y}{dt^2}+n(n-1)x^{n-2}\dfrac{dy}{dt}\right)-nx^{n-1}\dfrac{dy}{dt}-4x^3y=0$

$n^2x^{2n-1}\dfrac{d^2y}{dt^2}+n(n-1)x^{n-1}\dfrac{dy}{dt}-nx^{n-1}\dfrac{dy}{dt}-4x^3y=0$

$n^2x^{2n-1}\dfrac{d^2y}{dt^2}+n(n-2)x^{n-1}\dfrac{dy}{dt}-4x^3y=0$

$n^2x^{2n-4}\dfrac{d^2y}{dt^2}+n(n-2)x^{n-4}\dfrac{dy}{dt}-4y=0$

$n^2t^{\frac{2n-4}{n}}\dfrac{d^2y}{dt^2}+n(n-2)t^{\frac{n-4}{n}}\dfrac{dy}{dt}-4y=0$

The ODE has the simplest form when we choose $n=2$.

The ODE becomes

$4\dfrac{d^2y}{dt^2}-4y=0$

$\dfrac{d^2y}{dt^2}-y=0$

The auxiliary equation is

$\lambda^2-1=0$

$\lambda=+-1$

$\therefore y=C_1e^t+C_2e^{-t}$

$y=C_1e^{x^2}+C_2e^{-x^2}$

-