【问题标题】:Differentiating tuple valued functions in mathematica在mathematica中区分元组值函数
【发布时间】:2013-01-10 06:16:19
【问题描述】:

如何在 Mathematica 中创建元组值函数并对其执行微分。

更具体地说,我有以下函数,其中R 表示实线

f:R^2 -> R^3

g:R^3 -> R^3 

h: R^3 -> R^1

我想考虑这些函数 k:R^2 -> R^1 的组成,即 k= h(g(f(x,y))) 并且我想找到导数 k_x、k_y、k_xx, k_yy, k_xy

如何在 Mathematica 中做到这一点?

【问题讨论】:

    标签: function wolfram-mathematica differentiation


    【解决方案1】:

    我假设您没有 f,g,h 的表达式,但您想要根据 f,g,h 的导数来获得合成的导数。

    您总是可以通过使用 f[x_,y_] := {f1[x,y],f2[x,y],f3[x,y]} 之类的定义将问题简化为单值函数

    例如:

    f[x_, y_] := Through[{f1, f2, f3}[{x, y}]]
    g[x_, y_, z_] := Through[{g1, g2, g3}[{x, y, z}]]
    
    D[h @@ g @@ f[x, y], x]
    

    结果:

    (Derivative[{1, 0}][f3][{x, y}]*Derivative[{0, 0, 1}][g3][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}] + 
       Derivative[{1, 0}][f2][{x, y}]*Derivative[{0, 1, 0}][g3][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}] + 
       Derivative[{1, 0}][f1][{x, y}]*Derivative[{1, 0, 0}][g3][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}])*
      Derivative[0, 0, 1][h][g1[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}], g2[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}], 
       g3[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}]] + 
     (Derivative[{1, 0}][f3][{x, y}]*Derivative[{0, 0, 1}][g2][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}] + 
       Derivative[{1, 0}][f2][{x, y}]*Derivative[{0, 1, 0}][g2][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}] + 
       Derivative[{1, 0}][f1][{x, y}]*Derivative[{1, 0, 0}][g2][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}])*
      Derivative[0, 1, 0][h][g1[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}], g2[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}], 
       g3[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}]] + 
     (Derivative[{1, 0}][f3][{x, y}]*Derivative[{0, 0, 1}][g1][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}] + 
       Derivative[{1, 0}][f2][{x, y}]*Derivative[{0, 1, 0}][g1][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}] + 
       Derivative[{1, 0}][f1][{x, y}]*Derivative[{1, 0, 0}][g1][{f1[{x, y}], f2[{x, y}], f3[{x, y}]}])*
      Derivative[1, 0, 0][h][g1[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}], g2[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}], 
       g3[{f1[{x, y}], f2[{x, y}], f3[{x, y}]}]]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-29
      • 2013-01-12
      • 1970-01-01
      相关资源
      最近更新 更多