Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
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
up vote 8 down vote accepted

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)$).


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)$.

share|cite|improve this answer
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}$

share|cite|improve this answer
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



which belongs to a second order linear ODE of the form

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}$


$\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$





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

The ODE becomes



The auxiliary equation is



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


share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.