<s>[INST] Integrating a partial fraction How do I compute the integral
$$\int_0^{\pi/2} \cfrac 1 {12\cos x + 9 \sin x} dx?$$
Please can you help.
 [/INST] If all else fails, the Weierstrass substitution will do it.
However, let's try something that begins with what Marvin suggested in his answer.  First notice that $12^2+9^2=15^2$, so $\left(\frac{12}{15}\right)^2+\left(\frac{9}{15}\right)^2=1$.  Hence we can find $\theta$ such that $\cos\theta=12/15$ and $\sin\theta=9/15$.  Then
$$
12\cos x + 9\sin x = 15\left(\frac{12}{15}\cos x+\frac{9}{15}\sin x\right) = 15(\cos\theta\cos x + \sin\theta\sin x) = 15\cos(x-\theta).
$$
Therefore
$$
\int\frac{dx}{12\cos x+9\sin x} = \int \frac{dx}{15\cos(x-\theta)}= \int \frac{\cos(x-\theta)\,dx}{15(\cos(x-\theta))^2} = \frac{1}{15}\int \frac{\cos(x-\theta)\,dx}{1- (\sin(x-\theta))^2}
$$
$$
= \frac{1}{15}\int \frac{du}{1-u^2} = \frac{1}{15}\int \frac{A}{1-u} + \frac{B}{1+u} \, du.
$$
Then use partial fractions.
</s>