# Stuck finding the area of a region for $\int_{0}^{\frac{\pi}{2}}|9\sin{x}-9\cos{2x}|dx$

I'm so frustrated with this problem! I've spent maybe an hour on it just making sure I have everything perfect since the first couple of times I kept getting it incorrect.

Can you spot my error?

This is the original equation: $$\int_{0}^{\frac{\pi}{2}}|9\sin(x)-9\cos(2x)|dx$$

After doing some factoring and trig identity substitution I came up with the following integrals:

$$9\int_{0}^{\frac{\pi}{6}}\cos(2x) - \sin(x)dx + 9\int_{\frac{\pi}{6}}^{\frac{\pi}{2}}\sin(x) - \cos(2x)dx$$

And then I anti-differentiated:

$$9(\frac{1}{2}\sin(2x)+\cos(x))|_{0}^{{\pi}{6}}+9(-\cos(x)-\frac{1}{2}\sin(2x))|_\frac{\pi}{6}^\frac{pi}{2}$$

"Simplifying" I got this:

$$\frac92\sin\left(2\frac\pi6\right)+9\cos\left(\frac\pi6\right)-[\frac92\sin(2\cdot0)+9\cos(0)]-9\cos\left(\frac\pi2\right)-\frac92\sin(\pi)-[-9\cos\left(\frac\pi6\right)-\frac92\sin\left(\frac\pi3\right)]$$

Simplifying even further I got this (this is where I suspect I messed up):

$$\frac{9\sqrt3}4+\frac{9\sqrt3}2-[0+9]-0+\frac92-[-\frac{9\sqrt3}2-\frac{9\sqrt3}4]$$

I got a final answer of:

$$\frac{9\sqrt3}2+9\sqrt3+\frac92-9$$

$\ \frac{9}{2} \cdot \sin \pi = \$ ?! – RecklessReckoner Aug 30 '13 at 2:54
@RecklessReckoner $\frac{-9}{2}$? – free_mind Aug 30 '13 at 2:56
@RecklessReckoner omg.. it's 0 – free_mind Aug 30 '13 at 2:57