(3(cosx+xsinx))^2 = 9(cos(x)^2 + 2x * cos x * sin x + x^2 * sin (x)^2 ) = 9*cos(x)^2 + 18 *x * cos x * sin x + 9*x^2 * sin (x)^2
(3(sinx-xcosx))^2= 9(sin(x)^2 - 2x * cos x * sin x + x^2 * cos (x)^2 ) = 9*sin(x)^2 + 18 *x * cos x * sin x + 9*x^2 * cos (x)^2