VectorCalculus
diff
computes the derivative of a Vector
Calling Sequence
Parameters
Description
Examples
diff(f, v)
f
-
Vector(algebraic); Vector or algebraic expression
v
name; specify the variables of differentiation
The diff(f,v) command is an extension of the top-level diff command which understands free Vectors, position Vectors, rooted Vectors and VectorFields in the different coordinate systems of the VectorCalculus package. If f is not a Vector, the arguments are passed to the top-level diff command.
If f is a free Vector, f is differentiated component-wise independent of the coordinate system. The output is a free Vector.
If f is a position Vector representing a curve or surface, the Vector is differentiated component-wise since it is in Cartesian coordinates (see Position Vector). The output is a Vector rooted at the point with the same components as the position Vector.
If f is a rooted Vector in non-Cartesian coordinates, f is mapped back to Cartesian coordinates where the differentiation takes place. The output is a Vector rooted at the same point as f.
If f is a VectorField in non-Cartesian coordinates, the unit vectors of the coordinate system of the field are expressed in terms of the standard Cartesian unit vectors to perform the differentiation. The result is mapped back to the original coordinate system and a field is returned.
Differentiating a free Vector.
with⁡VectorCalculus:
v1≔t,t2,t3
diff⁡v1,t
v2≔1,2,3
diff⁡v2,t
Differentiating a position Vector that represents a curve. The result is a vector rooted at the curve.
pv≔PositionVector⁡p,p,polarr,t
pv≔p⁢cos⁡pp⁢sin⁡p
dpv≔diff⁡pv,p
dpv≔cos⁡p−p⁢sin⁡psin⁡p+p⁢cos⁡p
GetRootPoint⁡dpv
Differentiating a rooted Vector gives a Vector rooted at the same root as the original Vector.
rv≔RootedVector⁡1,p,root=p,p,polarr,t
rv≔1p
drv≔diff⁡rv,p
drv≔p⁢cos⁡p⁢−2⁢sin⁡p−p⁢cos⁡p+p⁢sin⁡p⁢2⁢cos⁡p−p⁢sin⁡pp2⁢sin⁡p2+p2⁢cos⁡p2p⁢cos⁡p⁢2⁢cos⁡p−p⁢sin⁡p−p⁢sin⁡p⁢−2⁢sin⁡p−p⁢cos⁡pp2⁢sin⁡p2+p2⁢cos⁡p2
simplify⁡drvassuming0<p
−p2
GetRootPoint⁡rv
pv≔PositionVector⁡1,t,t2,cartesianx,y,z
pv≔1tt2
tv≔diff⁡pv,t
tv≔012⁢t
dtv≔diff⁡tv,t
dtv≔002
GetRootPoint⁡dtv
Differentiating a VectorField gives another VectorField.
F≔VectorField⁡a⁢r,0,0,sphericalr,φ,θ
diff⁡F,φ
W≔VectorField⁡f⁡r,t,g⁡r,t,polarr,t
simplify⁡diff⁡W,r
simplify⁡diff⁡W,t
See Also
VectorCalculus[PositionVector]
VectorCalculus[RootedVector]
VectorCalculus[TangentVector]
VectorCalculus[Vector]
VectorCalculus[VectorField]
Download Help Document