1. ## Is my answer to this integral correct

$\int_0^{\pi} \cos(\tan(x)) ~dx ~= \frac{\pi}{e}$ ???

2. Originally Posted by simplependulum

$\int_0^{\pi} \cos(\tan(x)) ~dx ~= \frac{\pi}{e}$ ???
yes, it's correct. $\int_0^{\pi} \cos(\tan(x)) \ dx= 2 \int_0^{\frac{\pi}{2}} \cos(\tan x) \ dx = 2\int_0^{\infty} \frac{\cos x}{1+x^2} \ dx = \frac{\pi}{e}.$ (a very well-known result!)

3. Thank you so much Mr NonCommAlg

This result really surprised me !

4. Originally Posted by NonCommAlg
yes, it's correct. $\int_0^{\pi} \cos(\tan(x)) \ dx= 2 \int_0^{\frac{\pi}{2}} \cos(\tan x) \ dx = 2\int_0^{\infty} \frac{\cos x}{1+x^2} \ dx = \frac{\pi}{e}.$ (a very well-known result!)
Hey! Will you please explain the last step for me? I don't understand how you converted $cos(tan(x))$.

5. Originally Posted by Kaitosan
Hey! Will you please explain the last step for me? I don't understand how you converted $cos(tan(x))$.
A simple substitution $x=\tan(x)$

6. Huh?

$cos(tan(x)) dx$ = $cos(u) du$

$du = sec^2x dx$ which doesn't make sense.

How does $cos(tan(x)) = cos(x)/(1+x^2)$?

Please clarify. Maybe there's some trig information I'm missing or something.

7. Maybe because $\sec^2(x)=\frac{1}{\cos^2(x)}=\frac{\cos^2(x)+\sin ^2(x)}{\cos^2(x)}=1+\tan^2(x)=1+u^2$

In fact, it can be known that the derivative of tangent is also $1+\tan^2$
It depends on the way you learnt it ^^'

8. Another way to look at it: $u=\tan x,\ x= \arctan u,\ dx=\frac{du}{1+u^2}$

9. ooh I see. Thanks!

One last question -

How do you integrate $cos(x)/(1+x^2)$? Trig sub and inverse trig function integration seem not to work.

10. Originally Posted by Kaitosan
ooh I see. Thanks!

One last question -

How do you integrate $cos(x)/(1+x^2)$? Trig sub and inverse trig function integration seem not to work.
Residue theorem
That's complex analysis.

11. Well. In that case, I feel better! For a moment I felt like crap.