# Help with linear differential equation problem

Given $$\frac{dy}{dx}-\frac{2xy}{x^2+1}=1$$ This is a linear differential equation. The integrating factor is $e^{\int p(x)\mathrm{dx}}=\frac{1}{x^2+1}$. Please verify!

After multiplying the differential equation by the integration factor and simplifying, I got the following: $$\int\frac{2xy}{x^2+1}\mathrm{dx}-\mathrm{dy}=0$$

So the solution function $$f=\int\left(\frac{2xy}{x^2+1}+1\right ) \mathrm{ dx}$$ $$=y\log(x^2+1)+x+f(y)$$

However when I took the partial of $f$ with respect to y to try get $f'(y)$

I got: $$\frac{\partial f}{\partial y}=\log(x^2+1)+f'(y)=-1$$

I'm not sure how to go about next because $x$ does not cancel and $f'(y)$ must be a function only of $y$.

Your integrating factor is correct. However, your simplification is probably wrong and hence the solution is a bit wrong since $y$ is a function of $x$ and so $$\int\left(\frac{2xy}{x^2+1}+1\right )dx \not =y\log(x^2+1)$$
After multiplying by the integrating factor, you get $$\frac{1}{x^2+1}\cdot\frac{dy}{dx}-\frac{2xy}{(x^2+1)^2}=\frac{1}{x^2+1}$$ $$\frac{d}{dx}\left(\frac{y}{x^2+1}\right)=\frac{1}{x^2+1}$$ $$d\left(\frac{y}{x^2+1}\right)=\frac{dx}{x^2+1}$$
Integrating both sides, you get $$\frac{y}{x^2+1}=\arctan x + c$$
• After you multiplied by the integrating factor, I don't understand how you got from the first equation to the second. How did you just separate the $y$ from $\frac{d}{dx}$ – shoestringfries Mar 24 '16 at 20:34
• @shoestringfries Consider differentiating $\frac{y}{x^2+1}$ with respect to $x$ where $y$ is a function of $x$. You will get the first expression as your answer. You might want to check this tex for more detailst... if you want...tutorial.math.lamar.edu/Classes/DE/Linear.aspx – SchrodingersCat Mar 25 '16 at 12:38