Skip to main content
1-Visitor
May 6, 2016
Question

求助,在教程的求解教程中的最优化函数里,得到的结果不一样。

  • May 6, 2016
  • 2 replies
  • 2676 views

在教程的求解教程中的最优化函数里,得到的结果xmax不一样.

2 replies

nlan1-VisitorAuthor
1-Visitor
May 6, 2016

FPIO2]6V6XX@RYM_Y7}((MG.png

19-Tanzanite
May 6, 2016

The tutorial is wrong. With a guess value of 30 the answer should be 32.19.

25-Diamond I
May 6, 2016

I am not sure what your question is?

In case you are confused because maximize did not return x=0, the absolute maximum: "maximize" is a numerical algorithm which will always return a LOCAL maximum within a certain numerical tolerance. The value you end up with depends on the guess value.

If you search for absolute maxima and minima you may be interested in Minimizing a Function using Simulated Annealing

BTW, you don't need to use a solve block if you use maximize without any constraints:

Regards

Werner