What is the solution to the differential equation $(1+x^2) \frac{dy}{dx} -2xy =2x$? I am using integrating factor method to solve $(1+x^2) \frac{dy}{dx} -2xy =2x$ but having some issues.
When I divide through by $(1+x^2)$ I get
$ \frac{dy}{dx}-\frac{2x}{(1+x^2)}y=\frac{2x}{1+x^2}$
Then I integrate $\frac{2x}{(1+x^2)}$ to give $\ln(1+x^2)$. Thus the integrating factor is $(1+x^2)$.
When you multiply through by the i.f then you are simply left with the same equation as you start with.
Can anybody kindly point out where I may be going wrong?
Thanks
 A: As an alternative method, you can rearrange the given ODE to form a separable equation. We are given
$$(1+x^2) y' -2xy =2x$$
Rewrite as
$$y' = \frac{2x}{1+x^2} + \frac{2x}{1+x^2}y=\frac{2x}{1+x^2}(1+y)$$
which is a separable ODE.
$$\frac{dy}{1+y}=\frac{2x\:dx}{1+x^2}$$
Therefore we may integrate to find
$$\ln\left|y+1\right|=\ln\left|x^2+1\right|+\text{constant}$$
$$y+1=C(x^2+1)$$
Thus
$$y(x)=C(x^2+1)-1$$
A: I think the issue is how you apply the integrating factor
$$
y(x) \cdot \text{I.F} = \int f(x)\cdot \text{I.F}
$$
and not multiply everything and have
$$
\text{I.F} \cdot \frac{dy}{dx} -\text{I.F} \cdot 2xy = \text{I.F} \cdot \frac{2x}{1+x^2}
$$
you also have a sign issue
$$
\text{I.F} = \mathrm{exp}\left[\int -\frac{2x}{1+x^2}dx\right] = \frac{1}{1+x^2}
$$
Your actual output will be
$$
y(x) = (1+x^2)\int 2x \cdot  \frac{1}{1+x^2}dx
$$
A: $$(1+x^2) \frac{dy}{dx} -2xy =2x$$
Try tu put the DE in the following form:
$$\dfrac {f'g-fg'}{g^2}=\left (\dfrac fg \right)'$$
Since $g'=(1+x^2)'=2x$  and $f=y$.
$$(1+x^2) \dfrac{dy}{dx} -2xy =2x$$
$$\left(  \dfrac{y}{x^2+1} \right)'= -\left( \dfrac 1 {x^2+1}\right)'$$
Integrate both sides.
