1 / 12

数学分析实验(八)

数学分析实验(八). 偏导数与方向导数. 例. 1. 已知 1) 求 z 的偏导数 ; 2) 求 z 的高阶偏导数 2. 用 matlab 求函数 在点 A(5,1) 沿点 A(5,1) 到点 B(9,4) 的方向上的方向导数. 求 的一阶 导数 ;. 求 对 x 的 n 阶偏 导数 ;. 求 的高阶偏 导数 。. 求偏导数:.

afram
Télécharger la présentation

数学分析实验(八)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 数学分析实验(八) 偏导数与方向导数

  2. 1.已知 1)求z的偏导数 ; 2)求z的高阶偏导数 2.用matlab求函数在点A(5,1)沿点A(5,1)到点B(9,4)的方向上的方向导数.

  3. 求 的一阶导数 ; 求 对 x的 n阶偏导数 ; 求 的高阶偏导数 。 求偏导数: diff(f(x)) diff(f(x),n) diff(f(x,y),x,n) diff(diff(f, x,m),y,n)

  4. 例1(1)求多元函数 的偏导数 解:输入命令 >> syms x y u %定义符号变量 >> u=x^2*sin(x*y); %给出函数 >> dx=diff(u,x);%对x求偏导 >> dy=diff(u,y);%对y求偏导 结果: dx =2*x*sin(x*y) +x^2*y*cos(x*y) dy =x^3*cos(x*y)

  5. 例2 (2)求多元函数 的高阶偏导数 解:输入命令 >> syms x y u%定义符号变量 >> u=x^2*sin(x*y);%给出函数 >> dx2=diff(u,x,2);%对x求2 阶偏导 >> dy2=diff(u,y,2);%对y求2 阶偏导 >> dxdy=diff(diff(u,x),y); %先对x求偏导,再对y求偏导 结果: dx2= 2*sin(x*y) + 4*x*y*cos(x*y) - x^2*y^2*sin(x*y) dy2= -x^4*sin(x*y) dxdy= 3*x^2*cos(x*y) - x^3*y*sin(x*y)

  6. 方向导数 设函数uf(x, y)在点p0(x0 y0)的某一邻域U(P0)内有定义v是以P0(x0 y0)为始点的一条射线 与v同方向的单位向量为ev(cos cos)=(cos,sin)。则其方向导数为:

  7. 方向导数的计算I 构造一元函数,使得多元函数的方向导数等于一元函数在零点的导数值。

  8. 例2.用matlab求函数在点A(5,1)沿点A(5,1)到点B(9,4)的方向上的方向导数例2.用matlab求函数在点A(5,1)沿点A(5,1)到点B(9,4)的方向上的方向导数 解:输入命令 >>A=[5,1 ];%给出点A >>B=[9,4 ];%给出点B >>L=sqrt(sum((B-A).^2));%求AB线段长 >>cosx=(B(1)-A(1))/L;%求方向向量的第一分量 >>cosy=(B(2)-A(2))/L; %求方向向量的第二分量 >>syms x y t%定义符号变量 >>g=(x+t*cosx)^2*sin((x+t*cosx)*(y+t*cosy));%定义关于t的函数 >>dg_dl=diff(g,t);%对t求导数 >>b=subs(dg_dl,{x,y,t},{5,1,0}); 结果:du_dl=(8*x*sin(x*y))/5 +x^2*cos(x*y)*((3*x)/5 + (4*y)/5) b =19.2765

  9. 方向导数的计算 II 定理:如果函数uf(x, y)在点p0(x0 y0)可微分,则函数在该点沿任一方向v(ev(cos sin) (cos cos)的方向导数都存在,且有

  10. 由该定理知,还可以使用以下命令来方向导数 解:输入命令 >>A=[5,1 ];%给出点A >>B=[9,4 ];%给出点B >>L=sqrt(sum((B-A).^2));%求AB线段长 >>cosx=(B(1)-A(1))/L;%求方向向量的第一分量 >>cosy=(B(2)-A(2))/L; %求方向向量的第二分量 >>syms x y u%定义符号变量 >>u=x^2*sin(x*y);%给出函数 >>du_dl=diff(u,x)*cosx+diff(u,y)*cosy%求方向导数 >>a=subs(du_dl,{x,y},{5,1})%代点求方向导数值 结果:du_dl =(8*x*sin(x*y))/5+(3*x^3*cos(x*y))/5 +(4*x^2*y*cos(x*y))/5 a=19.2765

  11. 思考: 如何求向量值函数的方向导数? 求向量值函数导数(雅可比矩阵):matlab 命令 jacobian,调用格式: jacobian([f(x,y,z),g(x,y,z),h(x,y,z)],[x,y,z])

  12. 作业 • 计算习题9.3.1第2、3、4题

More Related