开发者

Finding the Maximum

开发者 https://www.devze.com 2023-01-25 23:08 出处:网络
How to find the following Maximum or supremum by computer software such as Ma开发者_高级运维thematica and Matlab: $\\sup\\frac{(1+s)^{4}+(s+t)^{4}+t^{4}}{1+s^{4}+t^{4}}$?

How to find the following Maximum or supremum by computer software such as Ma开发者_高级运维thematica and Matlab: $\sup\frac{(1+s)^{4}+(s+t)^{4}+t^{4}}{1+s^{4}+t^{4}}$?

Instead of numerical approximation, what is the accurate maximum?

Thanks.


Since the question seems a bit like homework, here's an answer that starts a bit like a lecture:

  • ask yourself what happens to the function as s and t go to small and to large positive and negative values; this will help you to identify the range of values you should be examining; both Mathematica and Matlab can help your figure this out;
  • draw the graph of your function over the range of values of interest, develop a feel for its shape and try to figure out where it has maxima; for this the Mathematic Plot3D[] function and the Matlab plot() function will both be useful;
  • since this is a function of 2 variables, you should think about plotting some of its sections, ie hold s (or t) constant, and make a 2D plot of the section function; again, develop some understanding of how the function behaves;
  • now you should be able to do some kind of search of the s,t values around the maxima of the function and get an acceptably accurate result.

If this is too difficult then you could use the Mathematica function NMaximize[]. I don't think that Matlab has the same functionality for symbolic functions built-in and you'll have to do the computations numerically but the function findmax will help.


In Matlab, one would create a vector/matrix with s and t values, and a corresponding vector with the function values. Then you can pinpoint the maximum using the function max

In Mathematica, use FindMaximum like this:

f[s_,t_]:= ((1+s)^4 + (s+t)^4 + t^4)/(1+s^4+t^4)
FindMaximum[ f[s,t],{s,0},{t,0} ]

This searches for a maximum starting from (s,t)=(0,0).

For more info, see http://reference.wolfram.com/mathematica/ref/FindMaximum.html

0

精彩评论

暂无评论...
验证码 换一张
取 消