# Antiderivative of trig function

1. Dec 9, 2014

### nuuskur

1. The problem statement, all variables and given/known data
$$\int\frac{{\rm{d}}x}{1+2\sin^2 (x)}$$

2. Relevant equations

3. The attempt at a solution
it's some sort of a derivative of arctan, however, when I try to substitute $y = \sqrt{2}\sin(x),\ {\rm{d}}y = \sqrt{2}\cos(x){\rm{d}}x$ I get nowhere with it, atleast I think, since there is a further complication, namely the dy. Suggestions, please.

2. Dec 9, 2014

### ShayanJ

Multiply by $\frac{sec^2x}{sec^2x}$ and then substitute $y=\sqrt 2 \tan x$!

3. Dec 9, 2014

### nuuskur

Right, of course I won't think of that :D
$$\int\frac{\sec^2(x){\rm{d}}x}{\frac{1}{\cos^2(x)}+2\frac{\sin^2(x)}{\cos^2(x)}} = \int\frac{\sec^2(x){\rm{d}}x}{3\tan^2(x)+1}$$ and that's all she wrote.