I tried to compute $\int^t \tan(x)dx$ in two different way, but I don't get the same result, why ?

First way : $$\int^t \tan(x)dx=\int^t\frac{\sin(x)}{\cos(x)}dx\underset{u=\cos(x)}{=}-\int^{\cos(t)}\frac{1}{u}du=-\ln(\cos(t)).$$

second way : $$\int ^t\tan(x)dx\underset{x=\arctan(u)}{=}\int^{\tan(t)}\frac{u}{u^2+1}du=\frac{1}{2}\ln(\tan^2(t)+1).$$

Since I don't have the same result, which technic is correct ?


For your first integral, it's $\ln(|\cos(t)|)$. Excepting this mistakes, both are correct since $$\frac{1}{2}\ln(\tan^2(x)+1)=\ln\left(\sqrt{\tan^2(x)+1}\right)$$ and $$\frac{1}{\cos^2(x)}=1+\tan^2(x).$$

  • $\begingroup$ Dawn !! Thanks for your quick reply, I forgot this last formula. $\endgroup$ – MathBeginner Sep 5 '16 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.