Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Does Mathematica implement binary search to find a 0, and ternary search to find a local min/max?:

As nearly as I can tell, there's no "BinarySearch" method for FindRoot, nor a "TernarySearch" method for FindMaximum.

I realize these are numerical, not symbolic, methods, but I was surprised Mathematica doesn't implement them.

I even ran into a case where binary search would have worked, but FindRoot didn't.

It would be easy to implement both in Mathematica, but I can't believe it's not already included?

share|improve this question
    
You'll find more detailed documentation on the available FindRoot methods here. If you need to bracket a root, try Brent's method. The step control method (full docs) is also relevant and might be the reason why FindRoot didn't work with the default options. –  Szabolcs Jan 6 at 17:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.