Implement a way to optimize (i.e., find the global maximum and minimum) a function. This should probably be in the form of two new functions in MathFunction:
-findMaximum(double a, double b)
-findMinimum(double a, double b)
These functions should find the maximum and minimum values, respectively, of the function between points a and b, inclusively.
There are many ways to solve this problem; see Wikipedia for a brief discussion:
Implement a way to optimize (i.e., find the global maximum and minimum) a function. This should probably be in the form of two new functions in
MathFunction
:-
findMaximum(double a, double b)
-findMinimum(double a, double b)
These functions should find the maximum and minimum values, respectively, of the function between points
a
andb
, inclusively.There are many ways to solve this problem; see Wikipedia for a brief discussion:
http://en.wikipedia.org/wiki/Mathematical_optimization
There might be a better resource online.
I'm looking for a solution that:
EasyMain
can just seta=-50
andb=50
for now. Thus, the min and max value between -50 and 50 will be printed.