The problem I was trying to solve was $$\int\frac{x^2}{\sqrt{36-x^2}}dx.$$
When checking my answer the solution said, $$18(\theta-\sin\theta\cos\theta)+C,$$ where $\sin\theta=\frac{x}{6},$ and $\cos\theta=\frac{\sqrt{36-x^2}}{6}$ $$=18\sin^{-1}(\frac{x}{6})-\frac{x}{2}\sqrt{36-x^2}+C.$$
I understand everything apart from where the $\frac{x}{2}$ comes from. When I try to simpify I always end up with $3x$ in it's place as to me it looks like the answer should be,
$$18\sin^{-1}(\frac{x}{6})-\frac{18x\sqrt{36-x^2}}{6}+C = 18\sin^{-1}(\frac{x}{6})-3x\sqrt{36-x^2}+C.$$
Thanks.