Alembert method $xy''-y'=x^2e^x$, $y_1=x^2$ The question asks to use the Alembert method to solve $xy''-y'=x^2e^x$, being $y_1=x^2$ a solution of the associated homogeneous equation. 
I did $y=ux^2$, 
$y'=u'x^2+2xu$,
$y''=u''x^2+4xu'+2u$
$u''x+3u'=e^x$
Making $u'=v$
$v'x+3v=e^x$
then i got $v=(e^x+c_1)/x$
How can i get $u$? Is all i have done before right? 
Thanks
 A: To answer how you get $u$ ty simply integrate $v$ w.r.t to x and then mutiply by $x^2$ to get $y$.
How did you get $v$?
As I get 
$$
v\mathrm{e}^{3\ln x} = vx^3 = \int \frac{\mathrm{e}^{ x}}{x}\mathrm{e}^{3\ln x}dx = \int x^2\mathrm{e}^x dx + c_1
$$
Which does not result in your answer for $v$?
The actual result is
$$
\frac{x^2-2x+2}{x^3}\mathrm{e}^x + \frac{c_1}{x^3}
$$
To evaluate the last integral I used 
$$
\int x^2 \mathrm{e}^x dx = \lim_{\alpha\rightarrow 1}\dfrac{\partial^2}{\partial \alpha ^2}\int \mathrm{e}^{\alpha x} dx
$$ or you can use by parts :)
A: You have $v$ (According to Wolfram):
$$v = \frac{e^x}{x} - \frac{2e^x}{x^2} + \frac{2e^x}{x^3}$$
When using the reduction of order method (Also known as the method you described above), then you do not need the constant values.
Since $u' = v$
$$u' = \frac{e^x}{x} - \frac{2e^x}{x^2} + \frac{2e^x}{x^3}$$
Integrating we get:
$$u = \frac{e^x}{x} - \frac{e^x}{x^2}$$
Therefore, our second solution is:
$$y_2 = ux^2 = \left(\frac{e^x}{x} - \frac{e^x}{x^2}\right)x^2 = xe^x - e^x = e^x(x-1)$$
Our general solution is:
$$y = c_1x^2 + c_2(e^x(x-1))$$
