Finding the root of a function in an interval using maxima

260 Views Asked by At

I'm trying to find the roots of the function $f:[-2\pi,2\pi] \to [-1,1]$, with $f(x)=\sin(x)/2$ using maxima. Intuitively I know that the solutions are; $x = -2\pi, x=0$ and $x=2\pi$. I started by doing the following:

f(x):= sin(x)/2$

solve(f(x) = 0)

But I got the following error message:

solve: using arc-trig functions to get a solution.
Some solutions will be lost.
(%o27)  [x=0]

Then, I tried using the following command specifying the interval and got:

find_root(f(x), -2*%pi, 2*%pi)
(%028) 0.0

And this only returned me $x = 0$ as well. How can I do this?