# Don't understand this simplification

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.

You forget one of the denominators $6$: $$18\sin\theta\cos\theta = 18\frac{x}{\color{red}{6}}\frac{\sqrt{36-x^2}}{\color{red}{6}}= \frac{18x}{36}\sqrt{36-x^2} = \frac{x}{2}\sqrt{36-x^2}$$ The fractions are multiplied (so the denominators are as well), not added.