Euler's equation problem example: $x^2 y'' + xy' -4y = x^2 + x^4$, this is how my teacher solved it, he set $y = x^{\lambda}$ then computed $y',y''$ to find that $\lambda = 2,-2$ he then said we try $y = f(x)x^2$ as a solution, then he once again, computed $y',y''$, subbed in back in, then let $g' = f$ then solved the equation for g, subbed back in $f'$ integrate and got the solution. My question is this - Why did he take the positive value for $\lambda$? Say for instance I had an equation $x^2y'' + 4xy' + 2y = 2/x^3$, if I use the same method and let $y = x^\lambda$ I'll get $\lambda = -2,-1$ - which specific value should I use when trying to determine the general solution? I.e. do I use $y = f(x) x^{-2}$ and repeat the same process, or $y = f(x) x^{-1}$? 
 A: Mi guess is you may choose any of them, either $\lambda = -2$ or $\lambda = -1$. To see this, let's go to your first ODE (since it's a bit easier).
Since $x^\lambda$ is a solution for the homogeneous Euler's equation, it must satisfy:
$$\lambda^2 - 4 = 0,$$ 
so you obtain $\lambda = \pm 2$. Keep this in mind and substitute back in the complete ODE $y(x) = f(x) x^\lambda$, for $\lambda$ being any of the solutions of the equation above. Then it yields, after simplication:
$$f'' + \frac{3 \lambda}{x} f' + f (\lambda^2 - 4)= x^2+x^4, $$
this is a "false" ODE-2 for $f$ since the coefficient for $f$ vanish as $\lambda^2 - 4 = 0$. This occurs for any $\lambda = \pm2$ (prove it for the second example). 
The differential equation above leads to (if I made no mistake before, of course):
$$f'' + \frac{3 \lambda}{x} f' = x^2 + x^4 \Rightarrow \frac{d}{dx}\left( x^{3\lambda} f' \right) = x^{3\lambda}(x^2+x^4)$$
where $x^{3\lambda} = e^{\int \frac{3\lambda}{x} \, dx} $ is an integrating factor and you can easily solve for $f$ and obtain the complete solution, $y$.
I hope this is useful to you.
Cheers.
