Maximizing a trig function

1. The problem statement, all variables and given/known data
THe range of a projectile fired with elevation angle X at an inclined plane is given by the formula
R = [2v^2 cos(x)sin(x-a)] / [g cos^2 (a)]

where a is the inclination of the target plane , v and g are constants. Calculate x for maximum range

3. The attempt at a solution

So first of all i assume i'll get the maximum of x expressed in terms of a (inclination of the plane)
2nd, i take out all the constants [2v^2 ] /[ g cos^2(a) ]
So my derivative is that constant times the derivative of cos(x)sin(x-a)]
R' = [2v^2 ] /[ g cos^2(a) ] * [-sin(x)*sin(x-a) + cos(x-a)*cos(x) ]

setting it to zero, i get cos(x-a)cos(x) - sin(x)sin(x-a) = 0

from here on, i have no idea how to get the roots ....i suppose my relevant range would be between 0 and 90 degrees (0, Pi/4)

the only guess i have is setting cos(x-a)cos(x) - sin(x)sin(x-a) = 0
-> cot(x-a) = tan(x)
but i dont know if that really helps does it?