First order differential equation homework help Hi I'm really stuck with some homework:
Find the general solution of the differential equation,
$$\left(x+\dfrac{1}x\right)\dfrac{dy}{dx} + 2y = 2\left(x^2+1\right)^2$$
So far, I've divided both sides by $x+\dfrac{1}x$ and integrated $\dfrac{2y}{x + \frac{1}{x}}$ to get $y \ln\left(x^2+1\right)$ but have no idea where to go from here. 
Anyone know what I need to do next?
 A: Rewrite equation into form :
$$ \frac{dy}{dx}+p(x)y=q(x)$$
General solution is given by :
$$y=\frac{\int u(x)\cdot q(x) \,dx +C}{u(x)} ~\text{where}~u(x)=e^{\int p(x) \,dx}$$
A: $$
\begin{align*}
(x+(1/x))\frac{dy}{dx} +2y &= 2(x^2+1)^2\\
\left(\frac{x^2+1}{x}\right)\frac{dy}{dx} +2y &= 2(x^2+1)^2\\
\frac{dy}{dx} +\frac{2xy}{x^2+1} &= 2x(x^2+1) \tag{A}\\
\frac{dy}{dx} +P(x)y &= Q(x)\\
\end{align*}
$$
where $\displaystyle{P(x) = \frac{2x}{x^2+1}}$ and $\displaystyle{Q(x) = 2x(x^2+1)}$
$$\displaystyle{\int \frac{2x}{x^2+1} = \ln(x^2+1)}$$ 
The integrating factor = $\displaystyle{e^{\int P(x) dx}}$  which is
$\displaystyle{e^{\ln(x^2+1)}} = x^2+1$  (why?)
$(A)$ simplifies to 
$$\frac{d}{dx}\left( (1+x^2)y \right) = 2x(1+x^2)$$
I could finish it completely, but can you figure the rest (by integrating both sides)?
A: Your equation can be transformed into a first order linear differential equation. You can find the solving formula here: http://en.wikipedia.org/wiki/Linear_differential_equation#First_order_equation
