快捷搜索:  汽车  科技

数与式运算教程(小李Talk每周学点Mathmatica)

数与式运算教程(小李Talk每周学点Mathmatica)After downloading Mathmatica click [New - Notebook] on the upper left corner下载好Mathmatica之后,点击左上角【新建-笔记本】Today the editor brings the “Learn Mathmatica (1) every week - polynomial operation”. Welcome to visit! This tweet usually takes about 4 minutes to read. Please read patiently.Mathmatica之多项式运算Polynomial Operation of Mathmatica

数与式运算教程(小李Talk每周学点Mathmatica)(1)

分享兴趣,传播快乐,增长见闻,留下美好!亲爱的您,这里是LearningYard学苑。

今天小编为大家带来“每周学点Mathmatica(1)——多项式运算”,欢迎您的用心访问!本期推文时长大约4分钟,请您耐心阅读。

Share interest spread happiness increase knowledge and leave beautiful. Dear this is the Learing Yard Academy!

Today the editor brings the “Learn Mathmatica (1) every week - polynomial operation”. Welcome to visit! This tweet usually takes about 4 minutes to read. Please read patiently.

Mathmatica之多项式运算

Polynomial Operation of Mathmatica

下载好Mathmatica之后,点击左上角【新建-笔记本】

After downloading Mathmatica click [New - Notebook] on the upper left corner

数与式运算教程(小李Talk每周学点Mathmatica)(2)

数与式运算教程(小李Talk每周学点Mathmatica)(3)

建好新的笔记本之后,我们可以上手试一些简单运算来熟悉一下软件。比如加减乘除或多项式。

After building a new notebook we can try some simple calculations to get familiar with the software. Such as addition subtraction multiplication division or polynomial.

数与式运算教程(小李Talk每周学点Mathmatica)(4)

数与式运算教程(小李Talk每周学点Mathmatica)(5)

当输入多项式时,Mathmatica并不会对多项式进行合并。如需对多项式进行合并,需要借助Collect函数或者FullSimplify函数。

以Collect函数为例,小编在这里将多项式命名为“happy”,然后运用Collect[(happy) b],进行多项式的合并,其中happy是所要合并的多项式名称,b是要合并的多项式的项。运行过程及结果如下:

When entering polynomials Mathmatica does not merge polynomials. To merge polynomials you need to use the Collect function or FullSimplify function.

Taking the Collect function as an example Xiao Bian here names the polynomial "happy" and then uses Collect [(happy) b] to merge the polynomials where happy is the name of the polynomial to be merged and b is the item of the polynomial to be merged. The operation process and results are as follows:

数与式运算教程(小李Talk每周学点Mathmatica)(6)

接下来,我们了解一下三种求导函数,分别是一阶求导、二阶求导和多元函数分别求导。

Next let's learn about three kinds of derivative functions namely first order derivative second order derivative and multivariate function derivative.

  • 一阶求导(first derivation)

一阶函数求导我们借助的是ans=D[函数名,求导对象],示例如下:

We use ans=D [function name derivative object] to derive the first-order function. Examples are as follows:

数与式运算教程(小李Talk每周学点Mathmatica)(7)

  • 二阶求导(Second order derivation)

二阶函数求导我们借助的是ans=D[函数名称,{二阶求导对象,2}],这里的数字2指的是求导次数,示例如下:

We use ans=D [function name {second order derivative object 2}] to derive the second order function. The number 2 here refers to the number of derivative times. An example is as follows:

数与式运算教程(小李Talk每周学点Mathmatica)(8)

  • 多元函数分别求导(Separate derivation of multivariate functions)

当为多元函数时,先对a变量求偏导,再对b变量求偏导,借助函数ans=D[函数名称 a b]

其中,ab的顺序决定了求导的次序。

When it is a multivariate function first calculate the partial derivative of variable a then calculate the partial derivative of variable b with the help of function ans=D [function name a b]

The order of ab determines the order of derivation.

小tips:Mathmatica区分大小写;

(shift enter)组合求结果。

Small tips: Mathmatica is case sensitive;

(shift enter) Combine to find the result.

END

今天的分享就到这里了,如果您对文章有独特的想法,欢迎给我们留言。让我们相约明天,祝您今天过得开心快乐!

That's all for today's sharing. If you have a unique idea about the article please leave us a message and let us meet tomorrow. I wish you a happy day!

参考资料:Deepl翻译、百度

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

猜您喜欢: