Physics[Vectors][DirectionalDiff] - the directional derivative
Calling Sequence
DirectionalDiff(A, B_)
Parameters
A
-
any algebraic (vectorial or scalar) expression
B_
a vector
Description
DirectionalDiff(A, B_) computes the directional derivative of A in the direction of B_, that is, the scalar product of a unitary vector in the direction of B_ times Nabla - the differential operator - applied to the function A. Two cases can happen:
A is not a vector. Hence DirectionalDiff⁡A,B_=B_Norm⁡B_·∇⁡A
A_ is a vector. Hence DirectionalDiff⁡A_,B_=B_·∇·A_Norm⁡B_
The %DirectionalDiff is the inert form of DirectionalDiff, that is: it represents the same mathematical operation while holding the operation unperformed. To activate the operation use value.
Examples
with⁡PhysicsVectors
&x,`+`,`.`,Assume,ChangeBasis,ChangeCoordinates,CompactDisplay,Component,Curl,DirectionalDiff,Divergence,Gradient,Identify,Laplacian,∇,Norm,ParametrizeCurve,ParametrizeSurface,ParametrizeVolume,Setup,Simplify,`^`,diff,int
Setup⁡mathematicalnotation=true
mathematicalnotation=true
The definition of directional derivative
DirectionalDiff⁡a⁡x,y,z,_i=_i·∇⁡a⁡x,y,z
∂∂xa⁡x,y,z=∂∂xa⁡x,y,z
Directional derivative in spherical coordinates
DirectionalDiff⁡a⁡r,θ,φ,_θ=_θ·∇⁡a⁡r,θ,φ
∂∂θa⁡r,θ,φr=∂∂θa⁡r,θ,φr
Directional derivative of a vector function
R≔a⁡x,y,z⁢_i+b⁡x,y,z⁢_j+c⁡x,y,z⁢_k
R≔a⁡x,y,z⁢i∧+b⁡x,y,z⁢j∧+c⁡x,y,z⁢k∧
DirectionalDiff⁡R,_i=_i·∇⁡R
∂∂xa⁡x,y,z⁢i∧+∂∂xb⁡x,y,z⁢j∧+∂∂xc⁡x,y,z⁢k∧=∂∂xa⁡x,y,z⁢i∧+∂∂xb⁡x,y,z⁢j∧+∂∂xc⁡x,y,z⁢k∧
Note that, when the vector which defines the direction (the second argument) is projected over one coordinate system, the function being differentiated is expected to be expressed using the same coordinate system; otherwise an error interruption happens and a corresponding message is displayed
DirectionalDiff⁡a⁡x,y,z,_r
Error, (in Physics:-Vectors:-DirectionalDiff) vectors must be projected over one and the same base
For this example, correct input could be
DirectionalDiff⁡a⁡x,y,z,ChangeBasis⁡_r,1
∂∂xa⁡x,y,z⁢sin⁡θ⁢cos⁡φ+∂∂ya⁡x,y,z⁢sin⁡θ⁢sin⁡φ+∂∂za⁡x,y,z⁢cos⁡θcos⁡φ2⁢sin⁡θ2+sin⁡φ2⁢sin⁡θ2+cos⁡θ2
See Also
ChangeBasis, convert,VectorCalculus, Identify, Nabla, operations, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Student[MultivariateCalculus][DirectionalDerivative], tensor/directional_diff, VectorCalculus[DirectionalDiff]., Vectors, Vectors[`.`]
Download Help Document