« View all new features in
Mathematica
9
◄
previous

next
►
New in
Mathematica
9
›
Builtin Symbolic Tensors
Vector Laplacian Identity
The Laplacian of a vector field in
dimensional flat space can be computed via the formula
. This formula is well known in three dimensions.
In[1]:=
X
Laplacian[{v1[x, y, z], v2[x, y, z], v3[x, y, z]}, {x, y, z}] == Grad[Div[{v1[x, y, z], v2[x, y, z], v3[x, y, z]}, {x, y, z}], {x, y, z}]  Curl[ Curl[{v1[x, y, z], v2[x, y, z], v3[x, y, z]}, {x, y, z}], {x, y, z}]
Out[1]=
The following creates a table that automates the verification of the identity in different dimensions and coordinate systems.
In[2]:=
X
Laplacian[{v1[x, y, z], v2[x, y, z], v3[x, y, z]}, {x, y, z}] == Grad[Div[{v1[x, y, z], v2[x, y, z], v3[x, y, z]}, {x, y, z}], {x, y, z}]  Curl[ Curl[{v1[x, y, z], v2[x, y, z], v3[x, y, z]}, {x, y, z}], {x, y, z}]; labels = {HoldForm[vec], HoldForm[Laplacian[vec, vars, sys]], HoldForm[% == Grad[Div[vec, vars, sys], vars, sys] + (1)^k Curl[Curl[vec, vars, sys], vars, sys]]};
In[3]:=
X
systems = {{"Cartesian", "Polar", "Bipolar", "PlanarParabolic"}, {"Cartesian", "Cylindrical", "Spherical", "CircularParabolic", "BipolarCylindrical"}, {"Cartesian", "Hyperspherical"}, {"Cartesian"}};
In[4]:=
X
Manipulate[ If[Not@MemberQ[systems[[dim  1]], system], system = "Cartesian"]; Block[{vars = Array[Subscript[x, #] &, dim], k = dim, vec, lap}, Grid[Transpose[{labels, {vec = Array[Subscript[v, #] @@ vars &, k], lap = (Laplacian[vec, vars, system] // Simplify), Simplify[ lap == Grad[Div[vec, vars, system], vars, system] + (1)^k Curl[Curl[vec, vars, system], vars, system]]}}], Dividers > Center, ItemSize > {{20, 20}, Automatic}, Alignment > Left]], {dim, Range[2, 5]}, {{system, "Cartesian"}, systems[[dim  1]], ControlType > SetterBar}, SaveDefinitions > True]
Out[4]=