# Calculation of a an integral

Good Evening. I am having a problem with a step in the calculation of the following integral:

$$\int_{0}^x \frac{dt}{\sin^2 t +\cos t} =\int_{0}^x \frac{dt}{-\cos^2 t +\cos t+1} =-\int_{0}^x \frac{dt}{\cos^2 t -\cos t-1}$$

Let $X=\cos t$

$$X^2-X-1=0 \Leftrightarrow X=\frac{1-\sqrt{5}}{2} \mbox{and } X=\frac{1+\sqrt{5}}{2}$$

$$\frac{1}{X^2-X-1}=\frac{\frac{\sqrt{5}}{5}}{X-(\frac{1+\sqrt{5}}{2})}-\frac{\frac{\sqrt{5}}{5}}{X-(\frac{1-\sqrt{5}}{2})}$$

Therefore: $$-\int_{0}^x \frac{dt}{\cos^2 t -\cos t-1}= -\int_{0}^x \frac{\frac{\sqrt{5}}{5}}{\cos t-(\frac{1+\sqrt{5}}{2})}dt + \int_{0}^x \frac{\frac{\sqrt{5}}{5}}{\cos t-(\frac{1-\sqrt{5}}{2})}dt$$

-
trigonometric substitution – user31280 Nov 6 '12 at 21:54

The $\tan(t/2)$ method is one way to go (though a bit cumbersome). Let $y = \tan(t/2)$. We get that $$dy = \sec^2(t/2) \dfrac{dt}2 \implies dt = \dfrac{2 dy}{1+y^2}$$ Also, recall that $$\sin(t) = \dfrac{2y}{1+y^2} \,\,\,\text{ and }\,\,\, \cos(t) = \dfrac{1-y^2}{1+y^2}$$
Then we get that $$I = \int \dfrac{dt}{\sin^2(t) + \cos(t)} = \int \dfrac{2dy}{\dfrac{4y^2}{1+y^2} + 1-y^2} = \int \dfrac{2(1+y^2) dy}{1+4y^2 - y^4}$$ I leave the rest to you since you should be able to finish it by splitting into appropriate partial fractions.
@user43418 The same substitution $y = \tan(t/2)$ can be used to evaluate your two integrals of the form $a/(\cos(t) - b)$ – user17762 Nov 6 '12 at 22:11
Can you help me calculate the final integral: $\int \dfrac{2(1+y^2) dy}{1+4y^2 - y^4}$ = $-2\int \dfrac{1+y^2}{y^4-4y^2-1}dy$ = $-2(\int \dfrac{\frac{1}{2}-\frac{3\sqrt{5}}{10}}{y^2- (2-\sqrt{5})}+\int \dfrac{\frac{3\sqrt{5}}{10}+\frac{1}{2}}{y^2-(2+\sqrt{5})})dy$ – user43418 Nov 7 '12 at 12:29