Vector Fields
Contents
4. Vector Fields#
A field in a mathematical sense is some function which can be defined within some domain \(D\), we will examine fields in two and three spatial dimensions, (but this can be extended to more later as required), therefore \(D \subset \mathbb{R}^2\) or \(D \subset \mathbb{R}^3\) respectively. If \(D\) is not specified, then we assume the whole of the space is being used as the domain.
In a physical sense, a field is some physical quantity which has a value at every point within a space, examples of which include temperature, distances, velocities, acceleations, forces, electric and magnetic fields.
One important distinction to make between fields is whether they are Scalar, Vector or some other (e.g. Tensor although this is beyond the scope of this course).
4.1. Scalar Fields#
A scalar field is a physical quantity which has some value (or magnitude) but contains no information about direction, at every point \({\bf r} = (x, \,y, \,z)\) within a domain. Physical examples include pressure, density and temperature. Mathematically we can write this as a function \(\phi = \phi({\bf r})\). We can picture scalar fields in Fig. 4.1, where the value of the scalar could be plotted as a surface or contour plot.
4.2. Vector Fields#
A vector field A scalar field is a physical quantity which has both magnitude and direction, at every point \({\bf r} = (x, \,y, \,z)\) within a domain. Physical examples include velocity, force, electric field and magnetic field. Mathematically we can write this as a function \(\bf A(r)\) such that:
We can picture vector fields in Fig. 4.2, outlining a vector field
4.3. Calculus on Fields#
Now that we have defined fields, which can vary according to different parameters at every point within a domain, we can begin to apply our toolkit of mathematical tools, here calculus.
We can find the partial derivatives of fields in a similar way to functions,
Worked example
Find the \(x,\, y\) derivatives for the fields:
These partial derivatives measure the change of \(\phi\) along the directions of \(x\) or \(y\), but can we calculate the derivative of \(\phi\) along some general direction, characterised by a unit vector \(\hat{\bf u}\):
We need a directional derivative, which can tell us about the changes in \(\phi\) along each component of \(\hat{\bf u}\). This leads us to the gradient operator:
which as an operator needs to act on a scalar field:
We see that this is now a vector field, which we can resolve in the \(\hat{\bf u}\) direction:
which is our directional derivative of \(\phi\) in the \(\hat{\bf u}\) direction, which we often write as \(\nabla_{\hat{\bf u}} \phi\).
Looking at this expression further:
\(|\nabla_{\hat{\bf u}} \phi|\) is maximised when \(\theta = 0\) - The gradient \(\nabla \phi\) of a scalar field \(\phi\) always points toward the direction of maximum increase of \(\phi\) (i.e. a maxima).
\(|\nabla_{\hat{\bf u}} \phi|\) is zero when \(\theta = \pi/2\), i.e. tangential surfaces, which would be given by \(\phi({\bf r}) = \text{constant}\) - this is always therefore one dimension lower than the dimension of the problem (therefore in 3D these would be surface areas and in 2D they would be contour lines).
We can always take some surface \(z = z(x,\,y)\) and convert it into a scalar field \(\phi\) with some surface normal \({\bf n} = \nabla \phi\).
Worked example
Consider \(\phi = \exp(-(x^2+y^2)\) defined over the domain \(x^2 + y^2 \leq 1\), find \(\nabla \phi\).
We see that for all \(x,\, y\) within the domain, the vector will be directed inwards, as we see in Fig. 4.3.
The gradient of \(\phi(x,\,y,\,z)\) will therefore be perpendicular to the surface \(\phi=c\), and we can use this to find the tangent plane to the surface at a given point.
Further worked examples
1. Find the gradient of the function \(f(x,\,y,\,z) = xyz\) at the point \((−2,\,3,\,4)\) and find the directional derivative of this function in the direction \({\bf v} = (3, \,-4, \,12)\).
We can find \(\nabla f\):
and therefore the directional derivative is given by:
2. Find the tangent plane for the surface
at \(x=y=1\).
This equation means we can write \(\phi = x^3−y^3−2xy+2 - z = 0\) and therefore:
The gradient of \(z = z(x,\,y)\) will be perpendicular to the contours of \(z\), projected in the \((x,\,y)\) plane, as illustrated in Fig. 4.4.
We can see that the gradient field vectors map out the stationary points on the function.
If we want to find the equation of the resulting tangent surface at a \(x=y=1\) we find \(z = 0\):
then we know that the scalar form of the tangent plane, which must satisfy \({\bf n}\cdot ({\bf r}- {\bf r_0}) = 0\) means:
4.4. Total Differential#
Recall from our discussions about partial derivatives, we can also define a scalar total differential for a scalar field \(\phi(x,\,y,\,z)\):
which measures the infinitesimal change of \(\phi\) as we change \(x, \,y,\,z\) by infinitesimal amounts \(\mathrm{d}x, \,\mathrm{d}y,\, \mathrm{d}z\).
Likewise we can can the vectorial line element:
to write the total differential in a slightly more compact notation:
To find the vector total differential, we can just use the multi-variate chain rule expression for a vectorised variable:
4.5. Different coordinate systems#
The gradient operator does not need to be specified in Cartesian coordinates, we can also look at it in other coordinate systems too.
Using the result \(\mathrm{d}\phi = \nabla \phi \cdot \mathrm{d}{\bf r}\), we can examine the change in \(\mathrm{d}{\bf r}\) over different systems of coordinates, which will tell us how \(\nabla \phi\) will be different.
4.5.1. Cylindrical polar coordinates#
Here the vectorial line element has the form:
and looking at what we expect to get \(\mathrm{d}\phi\) from the multi-variate chain rule:
then our expression for and so for \(\mathrm{d}\phi = \nabla \phi \cdot \mathrm{d}{\bf r}\) to match, we must have a gradient operator to be of the form:
4.5.2. Spherical polar coordinates#
Here the vectorial line element has the form:
and looking at what we expect to get \(\mathrm{d}\phi\) from the multi-variate chain rule:
then our expression for and so for \(\mathrm{d}\phi = \nabla \phi \cdot \mathrm{d}{\bf r}\) to match, we must have a gradient operator to be of the form:
A very good resource for all these expressions can be found at Del in cylindrical and spherical coordinates