# Integrating a partial fraction

How do I compute the integral $$\int_0^{\pi/2} \cfrac 1 {12\cos x + 9 \sin x} dx?$$

-
This isn't something you can break up into partial fractions (unless you can pull some chicanery that I'm not seeing). –  Cameron Buie Oct 25 '12 at 17:11
It can be done with partial fractions. See my answer below. –  Michael Hardy Oct 25 '12 at 18:05

HINT

Rewrite $12 \cos(x) + 9 \sin(x)$ as $$15 \left(\dfrac{12}{15} \cos(x) + \dfrac{9}{15} \sin(x) \right) = 15 \cos(x + \theta)$$ where $\tan(\theta) = - \dfrac9{12}$. (Note that $15 = \sqrt{9^2 + 12^2}$.) This is similar to the problem here.

-

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.

-