I'm trying to solve the following equation by using the Bernoulli method. 
$$
2\frac{dy}{dx}+\frac{1}{x}y=x^2y^{-1}
$$

So if I'm understanding right, I divide the former by $y^{-1}$ to get:
$$
2y\frac{dy}{dx}+\frac{1}{x}y^2=x^2
$$
Then let $v=y^2$, thus $v'=2y\frac{dy}{dx}$, and substituting these values I get: 
$$
v'+\frac{1}{x}v=x^2
$$
And here's where I'm stuck. The book I'm reading says I should find a $f(x)$ such that:
$$
f(x)=e^{\int{(1-n)p(x)dx}}
$$
I think $n=-1$ and $p(x)=\frac{1}{x}$ so I'm looking for an $f$ such that: 
$$
f(x)=e^{\int{2\frac{1}{x}dx}}
$$
Is that correct? How should I proceed from here? Thanks in advance.