integrate sinus and cosinus divison I'm trying to solve $$\int \frac{1}{\sin^2x+2\cos^2x} dx $$
I thought this should be done using the standard substitution $\tan \dfrac {x}{2} = t$ however that won't work (the integral I then get isn't correct according to wolframalpha). So how do you solve this?
(and why doesn't $\tan \dfrac {x}{2} = t$ work?)

Your integral is
$$\int\dfrac{dx}{1+\cos^2x}$$
and with $t=\tan\left( x\right)$ we have $dx=\dfrac{dt}{1+t^2}$ and $\cos^2 x=\dfrac{1}{1+t^2}$ so we find
$$\int\dfrac{dt}{2+t^2}=\dfrac1{\sqrt2}\int\dfrac{d(t/\sqrt2)}{1+\left(\dfrac t{\sqrt 2}\right)^2}=\dfrac1{\sqrt2}\arctan\left(\dfrac t{\sqrt 2}\right)+C=\dfrac1{\sqrt2}\arctan\left(\dfrac {\tan x}{\sqrt 2}\right)+C  $$
