# Spotting substitution in $\int \frac{1}{(t+\cos \alpha)^2 + \sin^2 \alpha}$

I have been solving a STEP II question 6 (2000 paper), part 1 and after tons of thought you end up at: $\displaystyle{\int_0^1 \frac{1}{(t+\cos \alpha)^2 + \sin^2 \alpha} dt}$ and then yet again you have to make a substitution. I was not able to proceed after I ended up here, so I looked into the answers and apparently I had to come up with the following substitution: $t+\cos \alpha = \sin \alpha \tan u$ which works extremely well. Using $\frac{1+\cos \alpha}{\sin \alpha}=\tan(\frac{\pi}{2}-\frac{\theta}{2})$ for the upper integral bound and then the integral nicely simplifies to just $1$.

My question is the following: what hints could I use just looking at that integral that that is the substitution I had to use?

Factoring gives $$\frac{1}{\sin^2 \alpha} \int\frac{dt}{(t \csc \alpha + \cot \alpha)^2 + 1},$$ so that the denominator of the integral has the familiar form $v^2 + 1$. This suggests writing $$t \csc \alpha + \cot \alpha = v = \tan u,$$ and multiplying both sides of this substitution by $\sin \alpha$ gives the desired substitution: $$\color{#bf0000}{\boxed{\sin \alpha \tan u = t + \cos \alpha}} .$$

HINT:

$$\int\frac{1}{\left(t+\cos(a)\right)^2+\sin^2(a)}\space\text{d}t=$$

Substitute $u=\cos(a)+t$ and $\text{d}u=\text{d}t$:

$$\int\frac{1}{\sin^2(a)+u^2}\space\text{d}u=$$ $$\int\frac{\csc^2(a)}{u^2\csc^2(a)+1}\space\text{d}u=$$ $$\csc^2(a)\int\frac{1}{u^2\csc^2(a)+1}\space\text{d}u=$$

Substitute $s=u\csc(a)$ and $\text{d}s=\csc(a)\space\text{d}u$:

$$\csc(a)\int\frac{1}{s^2+1}\space\text{d}s$$