# Is my solution to this first order ODE correct? (Integrating factor method)

The question wants me to prove the following ODE via integrating factor method: $$\frac{dx}{dt} + \frac{t}{(1+t^2)}x = \frac{1}{t(1+t^2)}$$

I got my integrating factor to be $$\mu(t)= \sqrt{1+t^2}$$ and then it gets messy and my implicit solution is as follows:

$$\sqrt{1+t^2}x = \frac{1}{2}\ln{\frac{\sqrt{1+t^2}-1}{\sqrt{1+t^2}+1}} + C$$

details of the workings are shown:

working

I'm not too sure whether I'm correct, but my peer told me that I could use some substitution $$x=\tan{t}$$ but I'm not sure why I need to do that substitution

And also if I am actually correct, the solution to that ODE could have a totally different expression if I were to use that tangent substitution right? (and that both expressions could be correct right? How do we verify if the expressions are equivalent?)

• The integrating factor is correct. Sep 6, 2020 at 13:54
• The solution is correct. Just to check the solution, replace it in the differential equation. Sep 6, 2020 at 13:59

If you set $$t=\tan(s)$$ and $$y(s)=x(t)=x(\tan(s))$$, then you get $$y'(s)=x'(\tan(s))(1+\tan^2(s))=x'(t)(1+t^2)=-tx+\frac1t=-\tan(s)y(s)+\cot(s)$$ The integrating factor can now be determined as $$\frac1{\cos(s)}$$ and results in $$\frac{y(s)}{\cos(s)}=\int\frac1{\sin(s)}ds=\int\frac{\sin s}{1-\cos^2(s)}ds \\ =\frac12\ln|1-\cos(s)|-\frac12\ln|1+\cos(s)|+C$$ After back-substitution this gives exactly your solution. If this way is simpler is most likely a rather subjective decision.