curl

Curl of vector field

Description

example

curl(V,X) returns the curl of the vector field V with respect to the vector X. The vector field V and the vector X are both three-dimensional.

curl(V) returns the curl of the vector field V with respect to the vector of variables returned by symvar(V,3).

Examples

collapse all

Compute the curl of this vector field with respect to vector X = (x, y, z) in Cartesian coordinates.

syms x y z
V = [x^3*y^2*z, y^3*z^2*x, z^3*x^2*y];
X = [x y z];
curl(V,X)
ans =
x^2*z^3 - 2*x*y^3*z
x^3*y^2 - 2*x*y*z^3
- 2*x^3*y*z + y^3*z^2

Compute the curl of the gradient of this scalar function. The curl of the gradient of any scalar function is the vector of 0s.

syms x y z
f = x^2 + y^2 + z^2;
vars = [x y z];
ans =
0
0
0

The vector Laplacian of a vector field V is defined as follows.

${\nabla }^{2}V=\nabla \left(\nabla \cdot V\right)-\nabla ×\left(\nabla ×V\right)$

Compute the vector Laplacian of this vector field using the curl, divergence, and gradient functions.

syms x y z
V = [x^2*y, y^2*z, z^2*x];
vars = [x y z];
ans =
2*y
2*z
2*x

Input Arguments

collapse all

Input, specified as a three-dimensional vector of symbolic expressions or symbolic functions.

Variables, specified as a vector of three variables

collapse all

Curl of a Vector Field

The curl of the vector field V = (V1, V2, V3) with respect to the vector X = (X1, X2, X3) in Cartesian coordinates is this vector.

$curl\left(V\right)=\nabla ×V=\left(\begin{array}{c}\frac{\partial {V}_{3}}{\partial {X}_{2}}-\frac{\partial {V}_{2}}{\partial {X}_{3}}\\ \frac{\partial {V}_{1}}{\partial {X}_{3}}-\frac{\partial {V}_{3}}{\partial {X}_{1}}\\ \frac{\partial {V}_{2}}{\partial {X}_{1}}-\frac{\partial {V}_{1}}{\partial {X}_{2}}\end{array}\right)$