Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
在教程的求解教程中的最优化函数里,得到的结果xmax不一样.
The tutorial is wrong. With a guess value of 30 the answer should be 32.19.
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