Question: How do I maximize correctly?

LF1 and LF2 return quite different numbers, and only that of LF2 agrees with theoretical results and computations done with other packages. What do I do wrong, or how do I optimise correctly, only knowing that p in (0,1) and lambda >0? Is there anything more appropriate than NLPSolve? Thanks. LF1 := (1/1658880)*(1-p)^12*p^6*lambda^20/((exp(lambda))^6*(1-1/exp(lambda))^6); NLPSolve(LF, p = .1 .. .9, lambda = 1 .. 5, maximize) [1.65899053351694972*10^(-10), [p = .500000000000000000, lambda = 3.]] LF2 := (1/1658880)*(1-p)^12*p^6*lambda^20/((exp(lambda))^6*(1-1/exp(lambda))^6); NLPSolve(LF, p = .3 .. .35, lambda = 1 .. 5, maximize) [4.75722160529957034*10^(-10), [p = .333333073182180029, lambda = 3.19705942287185962]]

Please Wait...