MATLAB: Solving difficult trigonmetric equations for theta.

MATLABtrigonometry solutionsvertical tangent lines

First, thank you for taking the time to read my problem. I apprecaiate any help.
Trying to find roots of the below equation. It doesn't seem to work on octave. When I use an online tool like wolframalpha, I can get the asnwer that I am looking for. I can always approximate the answer graphically but I am interested in the code to cruch answers directly. The below is the input and output. There are roots to my problem. I'm not sure why Matlab can't solve for them. The larger picture problem that I am working on is in finding vertical tangent lines to polar equations which I have done on paper but would like to code.
solve(-1*sin(x)*(4 + 2*cos(3*x + 21*3.14/6)) - cos(x)*6*sin(3*x + 21*3.14/6) == 0,x)
ans = {}(0x0)
Interestingly enough, when I do a simple example like the below, I get the obvious solution. So, I know that "solve" at least works with simple examples:
solve(sin(x) == 0,x)
ans = (sym 2×1 matrix)
0
⎢ ⎥
⎣π⎦

Best Answer

polyxpoly works quite well for this situation. I use it here to find the intersection of two lines; your equation (over a specified range) and y=0
range=[0 100];
x=linspace(range(1),range(2),10000); %generate data in a given range
y=-1*sin(x).*(4 + 2*cos(3*x + 21*3.14/6)) - cos(x).*6.*sin(3*x + 21*3.14/6);
[xroots,y0] = polyxpoly(x,y,range,[0 0]); % find intersection
plot(x,y), hold on, plot(xroots,y0,'or');
xroots