First-Order Linear Equations I have the equation,  
$$\frac{dy}{dx} - \frac{2y}{x} = x^2$$
and I have tried solving it using $e^{G(x)}$ but I get the answer $y(x) = x^4$ which isn't correct. I got the integration of $g(x)$ to be $-2ln|x| + C$ which seems to be right but implementing it in the equation didn´t work for me. 
I got
$$\frac{dy}{dx} \frac{1}{x^2} - \frac{2}{x} \frac{1}{x^2}  y = \frac{1}{x^2}  x^2$$
and then 
$$\frac{dy}{dx}\bigg(\frac{1}{x^2} y(x)\bigg) = x^2$$
An ideas?
 A: Here is your mistake:
$$\frac{dy}{dx}\cdot \frac{1}{x^2} - \frac{2}{x} \cdot \frac{1}{x^2} \cdot y = \frac{1}{x^2} \cdot x^2 $$
This leads to:
$$\frac{d}{dx}\left(\frac{1}{x^2} \cdot y(x)\right) = \color{red}{1}$$
Can you continue from here?
A: Hint:
An integrating factor of
$$\dfrac{dy}{dx}-\frac{2y}x=x^2$$
is $\mu(x)=\exp\left[\int-\frac2xdx\right]=x^{-2}$. So, by multiplying both sides of the preceding equation by $\mu(x)=x^{-2}$ we get
\begin{align*}
x^{-2}\frac{dy}{dx}-2x^{-3}y&=1
\end{align*}
A: A very systematic and general but maybe over-course approach is to first rewrite your last equation to:
$$y\cdot \frac{dy}{dx} = x^4$$
EDIT will work also with projectilemotion's fix, just replace $x^4$ with $x^2$.
In terms of a power series expansion, the left hand side is almost an autoconvolution and the right hand side provides a very simple objective $$\sum_{k=0}^\infty c_kx^k, c_k= \cases{1, k=4 (or 2)\\0, k\neq 4 (or 2)}$$
If we solve systematically from the end: $$c_1c_0=0\\c_0\frac{c_2}{2}+c_1^2=0 \\\vdots$$
The right hand sides being the $c_k$ in the sum above. We will now be able do narrow down the $c_k$ from low $k$ and increasing.
