TITLE: Find the indefinite integral $\int \frac{25}{(3\cos(x)+4\sin(x))^2} dx$
QUESTION [6 upvotes]: Find the indefinite integral: $$ \int\frac{25}{(3\cos(x)+4\sin(x))^2} dx$$

Obviously the first thing to is to expand the denominator but that doesn't help us that much. I have also tried applying the Weierstrass substitution but that lead to a black hole of algebra. I also notice the denominator has a $3$ and $4$ and the numerator has $25$ which mean a $3-4-5$ triangle might be related to this integral but I'm not to sure.
Any help is appreciated :)

REPLY [7 votes]: Let $\varphi$ such that $\;\begin{cases}\cos\varphi=\frac35,\\\sin\varphi=\frac45.\end{cases}$, e.g. $\;\varphi=\arctan\bigl(\frac43\bigr)$.
The integral can be rewritten as
$$\int\frac{\mathrm dx}{\cos^2(x-\varphi)}=\tan(x-\varphi).$$