Vector Analysis with Tensor Derivatives¶
Gradient, Jacobian, divergence, and curl are different arrangements of the same partial derivatives. Egison's tensor notation makes those arrangements explicit and keeps the symbolic expressions readable.
Scalar and vector fields¶
We use a polynomial scalar field and a vector field on $\mathbb R^3$ so every derivative remains symbolic but has an easily interpretable form.
declare symbol x, y, z : MathValue
def coords : Vector MathValue := [| x, y, z |]
def f : MathValue := x ^ 2 * y + y ^ 2 * z + z ^ 2 * x
def A : Vector MathValue := [| x * y, y * z, z * x |]
Gradient¶
Differentiating a scalar with respect to the coordinate vector produces the covector of first partial derivatives.
∂/∂ f coords
Jacobian¶
A vector of derivative operators applied to a vector field produces the full Jacobian matrix. Rows correspond to differentiation by $x$, $y$, and $z$.
[| (\e -> ∂/∂ e x), (\e -> ∂/∂ e y), (\e -> ∂/∂ e z) |] A
Divergence¶
Divergence contracts the derivative index with the vector-component index:
$$\nabla\cdot A=\partial_x A_x+\partial_y A_y+\partial_z A_z.$$
div A coords
Curl¶
Curl contracts the Jacobian with the Levi-Civita tensor, $(\nabla\times A)_i=\varepsilon_{ijk}\partial_jA_k$.
rot A coords
A local series view¶
Tensor calculus and series expansion share the same symbolic derivative machinery. Expanding $f$ in $x$ about zero treats $y$ and $z$ as parameters.
take 4 (taylorExpansion f x 0)
The gradient retains every first derivative, the divergence selects the Jacobian trace, and the curl selects its antisymmetric part. These are therefore not unrelated operators: they are distinct contractions and symmetries of one derivative tensor.