mathematica微分语法(赶紧进来抄作业)(1)

分享兴趣、传播快乐、增长见闻、留下美好,大家好,这里是LearningYard学苑,今天小编为大家带来文章:用mathematica求偏导

Share interest, spread happiness, increase knowledge, and stay good. Hello, everyone. This is LearningYard Academy. Today I will bring you an article: Using mathematica to ask for partial guidance

mathematica微分语法(赶紧进来抄作业)(2)

大家下午好呀

上一次给大家介绍了用Mathematica作三维图的方法

附上补课链接高颜值的三维图片,建议学习收藏

今天小编分享的也是Mathematica哦

老规矩,感兴趣的小伙伴赶紧@你的小伙伴一起学习吧!

Good afternoon everyone

Last time, I introduced you to the method of using Mathematica to make 3D graphs.

Attach a link to make-up lessons高颜值的三维图片,建议学习收藏

Today the editor is sharing Mathematica too

Old rules, interested friends, hurry up @you friends to learn together!

接下来开始今天的教程学习:用Mathematica求偏导数与多元函数的极值

(有条件的同学建议先复习一下大学课程微积分里的相关内容)

Next, start today’s tutorial study: Use Mathematica to find the extreme value of partial derivatives and multivariate functions

(Students with conditions suggest to review the relevant content in the college course calculus first)

mathematica微分语法(赶紧进来抄作业)(3)

注:在Mathematica中,还是有些微分函数用于直接计算的,如下表所示

Note: In Mathematica, there are still some differential functions used for direct calculation, as shown in the following table

mathematica微分语法(赶紧进来抄作业)(4)

mathematica微分语法(赶紧进来抄作业)(5)

命令In[1]:= D[Log[x Sqrt[x^2 y^2] ],x];Simplify[%]

通常Mathematica不自动化简微分结果,要借助于Simplify函数

Usually Mathematica does not automate the result of simple differentiation, it has to resort to the Simplify function

mathematica微分语法(赶紧进来抄作业)(6)

下面开始进阶学习

Let's start advanced learning

mathematica微分语法(赶紧进来抄作业)(7)

小提示:面对复杂的函数时,要先定义函数,再求偏导哦

Tips: When facing complex functions, define the function first, and then find the partial derivative.

In[1]:= Clear[z,x,y];z[x,y]:=x^3*Sin[y] y^3Sin[x]; D[z[x,y],y]

/*定义二元函Define a binary function*/

Out[1]=

mathematica微分语法(赶紧进来抄作业)(8)

In[2]:= D[z[x,y],y]/.{x->1,y->1} /*给函数的变量赋值Assign a value to the variable of the functio*/

Out[2]=

mathematica微分语法(赶紧进来抄作业)(9)

In[3]:= D[z[x,y],{x,2}]

Out[3]=

mathematica微分语法(赶紧进来抄作业)(10)

In[4]:= D[z[x,y],{x,3},{y,3}]

Out[4]=

mathematica微分语法(赶紧进来抄作业)(11)

继续进阶,求由下列方程所确定的隐函数和导数或偏导数

Continue to advance to find the implicit function and derivative or partial derivative determined by the following equations

mathematica微分语法(赶紧进来抄作业)(12)

小提示:需要利用Solve函数

Tips: need to use the solve function

mathematica微分语法(赶紧进来抄作业)(13)

今日的第二个主题:求极值

Today’s second topic: seeking extreme values

mathematica微分语法(赶紧进来抄作业)(14)

In[1]:= f[x_,y_]:=x^2 y^2-12x 16y;t=Solve[{D[f[x,y]= =0,x],D[f[x,y]= =0,y]},{x,y}]

Out[1]= {{x->6,y->-8}} (*驻点*)

In[2]:= x^2 y^2-25/.t[[1]]

Out[2]=75

该驻点在圆外,圆内无驻点,故不取极值。下面考虑圆

mathematica微分语法(赶紧进来抄作业)(15)

上的最值。这是在约束条件

mathematica微分语法(赶紧进来抄作业)(16)

下的条件极值,用Lagrange乘数法求解

The stagnation point is outside the circle, and there is no stagnation point inside the circle, so the extreme value is not taken. Next consider the highest value on

mathematica微分语法(赶紧进来抄作业)(17)

. This is the conditional extreme value under the constraint bar, which is solved by the Lagrange multiplier method.

In[3]:= Clear[x,y,F,t];F[x_,y_,t_]:=f[x,y] t(x^2 y^2-25);

s=Solve[{D[f[x,y,t]==0,D[f[x,y,t]==0,y],D[F[x,y,t]= =0,t]],{x,y,t}}

Out[3]={{t->-3,x->-3,y->4},{t->1,x->3,y->-4}}

In[4]:= F[x,y]/.s[[1]]

Out[4]=25

In[5]:= F[x,y]/.s[[2]]

Out[5]=-75

今天的分享就到这里啦

That's it for today's sharing

散会

Let's adjourn

参考资料:网络

翻译:Google翻译

本文由LearninglYard学苑原创,部分资料来自网络,若有侵权请联系

如果您对今天的文章有独特的想法,欢迎给我们留言,让我们相约明天,祝您今天过得开心快乐

,