Answer
$$\int x^{2}cos\,3x\,dx=\frac{x^{2}}{3}sin\,3x+\frac{2x}{9}cos\,3x-\frac{2}{27}sin\,3x+C$$
Work Step by Step
$$\int x^{2}cos\,3x\,dx$$
$$=\frac{1}{3}x^{2}sin\,3x-2x(-\frac{1}{9}cos\,3x)+2(-\frac{1}{27}sin\,3x)-\int 0\cdot (-\frac{1}{27}sin\,3x)dx$$
$$=\frac{x^{2}}{3}sin\,3x+\frac{2x}{9}cos\,3x-\frac{2}{27}sin\,3x+C$$