# How to find the global maximum of a function? [closed]

I tried the following but plotting the function clearly reveals that there is a global maximum around $r = 7$ (here $a = 0.53$)

FindMaximum [{r^2*(Exp[-(r)/(3 a)]* (27 a^2 - 18 a r + 2 r^2)/(9 a^2))^2 ,
0 <= r < Infinity}  , {r, 0}]

{0.253131, {r -> 0.39222}}

I tried NMaximum, Max, MaxValue, Maximize, FindMaxValue, FindMaximum but nothing works!

(..I wonder why there are so many maxima finding functions anyway!..)

-

## closed as too localized by Oleksandr R., Silvia, Sjoerd C. de Vries, m_goldberg, Yves KlettApr 30 '13 at 6:34

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Why don't you do it the calculus way: find those r's that zero the first derivative of the function? –  Spawn1701D Apr 19 '13 at 2:36
"(...I wonder why there are so many maxima finding functions anyway!...)" - because some of the functions are intended for local optima, and some of them attempt to find global optima. –  Ｊ. Ｍ. Apr 19 '13 at 2:47
possible duplicate of How to find all the local minima/maxima in a range –  Silvia Apr 29 '13 at 18:50