<s>[INST] Solving $(1+x^2)y' - 2xy = (1+x^2)\arctan(x)$ I'm asked to solve the differential equation: $$(1+x^2)y' - 2xy = (1+x^2)\arctan(x).$$
I rewrite it: 
$$y' - \frac{2x}{1+x^2}y = \arctan(x).$$
The integrating factor is: 
$$e^{-\int{\frac{2x}{1+x^2}}dx} = e^{-\ln{1+x^2}} = (e^{ln{1+x^2}})^{-1} = \frac{1}{1+x^2}.$$ 
$$\frac{1}{1+x^2}y' - \frac{1}{1+x^2}\frac{2x}{1+x^2}y = \arctan(x)\frac{1}{1+x^2}$$
$$\frac{d}{dx}(\frac{1}{1+x^2}y) = \arctan(x)\frac{1}{1+x^2}$$
So to solve this equation I need to find the primitive of 
$$\arctan(x)\frac{1}{1+x^2}$$
But I don't think I can do that yet, is there any other way to solve this differential equation? 
 [/INST] Take into account that
$$
\frac{d}{dx}\arctan(x) = \frac{1}{1+x^2}
$$
so that
$$
\int dx\; \frac{\arctan(x)}{1+ x^2} = \int dx\; \arctan(x) \frac{d}{dx}\arctan(x) = \int dx\; \frac{d}{dx}\left(\frac{1}{2}\arctan^2(x)\right) = \frac{1}{2}\arctan^2(x) + c
$$
</s>