宏记软件(十):Mathematica学习之最大值和最小值求解

宏记软件(十):Mathematica学习之最大值和最小值求解

宏记软件(十):Mathematica学习之最大值和最小值求解.mp31:50来自LearningYard学苑

分享兴趣,传播快乐,增长见闻,留下美好。

亲爱的您,

这里是LearingYard学苑!

今天小编为大家带来Mathematica学习之最大值和最小值求解.

欢迎您的用心访问!

本期推文阅读时长大约5分钟,请您耐心阅读。

Share interest, spread happiness,

increase knowledge, and leave beautiful.

Dear you.

This is the LearingYard Academy!

Today, the editor brings Mathematica learning – Maximum and minimum value solving.

Welcome your visit!

The reading time of this tweet is about 5 minutes, please read it with patience.

Mathematica作为科学计算软件,支持数值符号计算,支持与图形系统、编程语言、文本系统等程序连接,是最受欢迎的数学软件之一。本期推文将介绍如何使用Mathematica计算函数的最大最小值。感谢您的观看!

Mathematica is one of the most popular mathematical software as scientific computing software that supports numerical symbolic computation and links to programs such as graphics systems, programming languages, and text systems. This tweet will explain how to use Mathematica to calculate the maximum and minimum values of functions. Thanks for watching!

1.一元函数的最小值数值解

在Mathematica中,对于解线性函数可以使用ConstrainedMax和ConstrainedMin这两个命令。对于非线性的,没有限制条件的函数,可以使用FindMinimum函数,好用!

使用方法为FindMinimum[f,{x,x0}] 。含义为将x=x0 作为初始值求函数f的最小值。

1. The numerical solution of the minimum value of a unitary function

In Mathematica, for solving linear functions can use the two commands ConstrainedMax and ConstrainedMin. For non-linear, no constraints on the function, you can use FindMinimum function, good!

Use FindMinimum[f,{x,x0}]. Meaning x=x0 as the initial value to find the minimum value of the function f.

宏记软件(十):Mathematica学习之最大值和最小值求解

然后可以用绘图函数Plot验证结果。

宏记软件(十):Mathematica学习之最大值和最小值求解

2.多极值点函数最小值求解

首先画出一个多极值的函数:

2. multi-polar point function minimum solution

Firstly, draw a multipole function.

宏记软件(十):Mathematica学习之最大值和最小值求解

求极小值取决于,开始的取值点:

Finding the minimal value depends on the starting point.

宏记软件(十):Mathematica学习之最大值和最小值求解

对于多极值点的函数,建议找两个起始点,找全局极小值更为精准。

For functions with multiple polarization points, it is recommended to find two starting points to find the global minima more precisely.

宏记软件(十):Mathematica学习之最大值和最小值求解

3.最大值的求解

Mathematica并没有提供FindMaximum这个命令,故求最大值,现将函数乘-1,转换成最小值问题。

3. Solving for the maximum value

Mathematica does not provide the command FindMaximum, so to find the maximum value, now the function is multiplied by -1 and converted into a minimum value problem.

今天的分享就到这里了。

如果您对今天的文章有独特的想法,

欢迎给我们留言,

让我们相约明天。

祝您今天过得开心快乐!

That’s it for today’s sharing.

If you have a unique idea about today’s article,

welcome to leave us a message,

let us meet tomorrow.

I wish you a happy day today!

参考资料:谷歌翻译

本文由LearningYard学苑整理发出,如有侵权请在后台留言!

LearningYard学苑

文字 | clear

排版| clear

审核| 任务达人

来源:LearningYard学苑

声明:本站部分文章及图片转载于互联网,内容版权归原作者所有,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2022年9月25日
下一篇 2022年9月25日

相关推荐