$$\int\frac{1}{sin^2(x)+2cos^2(x)}dx$$

My attempt

$$=\int\frac{1}{2-sin^2(x)}dx = \int\frac{1}{1+cos^2(x)}dx $$

Not sure how to proceed here so tried substitution t=tan(x/2).

$$t=tan(x); cos(x)=\frac{1-t^2}{1+t^2}; dx=\frac{2}{1+t^2}dt$$

But it didn't go well... It seems that there should be a better way. It's also possible that i screwed up.

$$=\int\frac{1}{1+(\frac{1-t^2}{1+t^2})^2}*\frac{2}{1+t^2}dt$$

$$=\int\frac{1+t^2}{1+t^4}dt$$

Does it look ok so far?