tensor(deprecated)/directional_diff - Maple Help

Home : Support : Online Help : tensor(deprecated)/directional_diff

tensor

 directional_diff
 compute the directional derivative

 Calling Sequence directional_diff( f, V, coord)

Parameters

 f - scalar field V - contravariant vector field coord - list of coordinate names

Description

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 • The function directional_diff(f, V, coord) computes the directional derivative of the scalar field f with respect to the coordinates coord in the direction of the contravariant vector V.
 • f must be of type algebraic, and V must be a tensor_type with index character [1] (a contravariant vector field).  The result is an algebraic expression.
 • Simplification:  This routine uses the tensor/directional_diff/simp routine for simplification purposes.  The simplification routine is applied to each component of the gradient of f (an intermediate calculation) and once to the contraction of this gradient with V (the result).  By default, tensor/directional_diff/simp is initialized to the tensor/simp routine. It is recommended that the tensor/directional_diff/simp routine be customized to suit the needs of the particular problem.

Examples

Important: The tensor package has been deprecated. Use the superseding packages DifferentialGeometry and Physics instead.

 > $\mathrm{with}\left(\mathrm{tensor}\right):$
 > $\mathrm{coord}≔\left[x,y,z\right]:$
 > $f≔\frac{3x}{y+z}$
 ${f}{≔}\frac{{3}{}{x}}{{y}{+}{z}}$ (1)
 > $V≔\mathrm{create}\left(\left[1\right],\mathrm{array}\left(\left[xy,yz,zx\right]\right)\right)$
 ${V}{≔}{table}{}\left(\left[{\mathrm{index_char}}{=}\left[{1}\right]{,}{\mathrm{compts}}{=}\left[\begin{array}{ccc}{x}{}{y}& {y}{}{z}& {z}{}{x}\end{array}\right]\right]\right)$ (2)

Compute the directional derivative of f with respect to coord in the direction of V:

 > $\mathrm{directional_diff}\left(f,V,\mathrm{coord}\right)$
 ${-}\frac{{3}{}{x}{}\left({z}{}{x}{-}{{y}}^{{2}}\right)}{{\left({y}{+}{z}\right)}^{{2}}}$ (3)

Compute the directional derivative of an arbitrary scalar field g(x,y,z) in the direction of an arbitrary vector field U = (u1, u2, u3):

 > $U≔\mathrm{create}\left(\left[1\right],\mathrm{array}\left(\left[\mathrm{u1},\mathrm{u2},\mathrm{u3}\right]\right)\right)$
 ${U}{≔}{table}{}\left(\left[{\mathrm{index_char}}{=}\left[{1}\right]{,}{\mathrm{compts}}{=}\left[\begin{array}{ccc}{\mathrm{u1}}& {\mathrm{u2}}& {\mathrm{u3}}\end{array}\right]\right]\right)$ (4)
 > $\mathrm{directional_diff}\left(g\left(x,y,z\right),U,\mathrm{coord}\right)$
 $\left(\frac{{\partial }}{{\partial }{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{g}{}\left({x}{,}{y}{,}{z}\right)\right){}{\mathrm{u1}}{+}\left(\frac{{\partial }}{{\partial }{y}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{g}{}\left({x}{,}{y}{,}{z}\right)\right){}{\mathrm{u2}}{+}\left(\frac{{\partial }}{{\partial }{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{g}{}\left({x}{,}{y}{,}{z}\right)\right){}{\mathrm{u3}}$ (5)