Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Numerically find all roots in an interval

Is there a function to find all the roots of a function on a given interval? I'm thinking of something like this:

sage: find_all_roots(lambda z: tan(z)+z/sqrt(9*pi^2-z^2), 0, 10) [0, 2.835952326711582867481259929, 5.64146101037285257526886564, 8.338774576412169721334841011]

Thanks!

Numerically find all roots in an interval

Is there a function to find all the roots of a function on a given interval? I'm thinking of something like this:

sage: find_all_roots(lambda z: tan(z)+z/sqrt(9*pi^2-z^2), 0, 10)
[0, 2.835952326711582867481259929, 5.64146101037285257526886564, 8.338774576412169721334841011]

Thanks!