# How do I solve the integral: $\int \frac{\sin x}{\tan^2x+\cos^2x}\,dx$

As the title says, I want to know how to solve this integral: $$\int \frac{\sin x}{\tan^2x+\cos^2x}\,dx.$$ I tried to write everything as $\cos x$ and I got that the integral is equal to: $$\int \frac{\sin x\cos^2x}{\cos^4x-\cos^2x+1}\,dx.$$ I tried to substitute $\cos x=t \implies -\sin x \,dx=dt$ and I got the integral: $$-\int \dfrac{t^2}{t^4-t^2+1}\,dt,$$ which I do not know how to solve. Is everything I have done so far right or I can do it in another way that is faster or easier?

• Can you factor the denominator and do a partial fraction decomposition? – Brian Borchers Nov 5 '17 at 16:40
• Everything seems fine. As for the integral that you reach, are you aware about integration by partial fractions? – MathematicianByMistake Nov 5 '17 at 16:41
• "Solve" is the wrong word. One solves problems; one solves equations; one evaluates expressions. The question is how to evaluate this integral. – Michael Hardy Nov 8 '17 at 16:45