problem getting all root solutions in maxima



Pedro Ferreira wrote:
> Hello, don't know if I'm sending to the right email, anyway here's my
> problem. I'm trying to get all the zeros of a function in a certain
> interval. What I did was:
>  find_root(df(x), x, a, b);
> df(x) is my function, a and b the intervals.
> What i get is the x of one of the zeros, but there's more than 1 zero
> on that interval, but I'm not seeing how do i get all the x's
> corresponding to all the zeros.
> I think there's some sort of trick where you put a variable in the
> command, and by changing the value(0,1,2,3...) you get all the zeros,
> but I'm not seeing how to do here.
find_root returns just one root.  If you want more, I think you're
supposed to change the bounds of the interval so find_root looks
elsewhere.  So if x0 is one root, you might want to look in a to x0-eps
and x0+eps to b.  And so on.

Or maybe just plot the function, figure out the appropriate intervals
containing the roots you're looking for and use find_root for each interval.

Anyway, that's what I would do.  Perhaps there are other ways.

Ray