寻找最大值

发布于 2024-10-03 10:08:02 字数 153 浏览 0 评论 0原文

如何通过Mathematica、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 Mathematica 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梅窗月明清似水 2024-10-10 10:08:02

由于这个问题看起来有点像家庭作业,所以这里的答案有点像讲座:

  • 问问自己,当 st 变小并变大时,函数会发生什么情况较大的正值和负值;这将帮助您确定应该检查的值范围; MathematicaMatlab 都可以帮助您解决这个问题;
  • 在感兴趣的值范围内绘制函数图形,感受其形状并尝试找出其最大值在哪里;为此,Mathematic Plot3D[] 函数和 Matlab plot() 函数都将很有用;
  • 由于这是一个包含 2 个变量的函数,因此您应该考虑绘制它的一些部分,即保持 s (或 t) 常量,并绘制该部分的二维图功能;再次,了解该函数的行为方式;
  • 现在您应该能够对函数最大值周围的 s,t 值进行某种搜索,并获得可接受的准确结果。

如果这太困难,那么您可以使用Mathematica函数NMaximize[]。我不认为 Matlab 具有与内置符号函数相同的功能,您必须进行数字计算,但函数 findmax 会有所帮助。

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.

小矜持 2024-10-10 10:08:02

在 Matlab 中,可以创建一个具有 s 和 t 值的向量/矩阵,以及一个具有函数值的相应向量。然后,您可以使用 Mathematica 中的函数 max 来确定最大值

,如下所示使用 FindMaximum

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

这将搜索从 (s,t)=(0,0) 开始的最大值。

有关详细信息,请参阅 http://reference.wolfram.com/mathematica/ref/FindMaximum。 html

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文