# find maximum and minimum for any function

I'm writing an optimization algorithm thats supposed to find the maximum and minimum value of any given function. Whats the fastest numerical approuch to do so?

• Functions in one real variable? Continuous? Is it known that there is only one local maximum in an interval? – Hagen von Eitzen Apr 24 '13 at 12:18
• yes continous functions with one real variable and one local maximum – Yui Apr 24 '13 at 12:22
• I think you must specify the question. There are many fast algorithms for special classes of functions, but there is no algorithm that can handle "any given function". – Mårten W Apr 24 '13 at 12:36