You can put this solution on YOUR website! Take the derivative and set = 0:
df/dx = 12cos(x) - 18sin(x)cos(x) = 0
6cos(x)[2 - 3sin(x)] = 0
This is satisfied if cos(x) = 0, and sin(x) = 2/3
cos(x) = 0 -> x = /2
f(/2) = 12*1 - 9*1 = 3
This may be a local minimum or a maximum
Check the other solution:
12*2/3 - 9*(2/3)^2 = 8 - 4 = 4
So the maximum value is 4
The graph is below: