tft每日頭條

 > 生活

 > mathematica微分語法

mathematica微分語法

生活 更新时间:2024-11-26 04:38:51

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學苑原創,部分資料來自網絡,若有侵權請聯系

如果您對今天的文章有獨特的想法,歡迎給我們留言,讓我們相約明天,祝您今天過得開心快樂

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关生活资讯推荐

热门生活资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved