Calculus/Vector calculus

← Inverse function theorem, implicit function theorem Calculus Vector calculus identities →
Vector calculus

Vector calculus specifically refers to multi-variable calculus applied to scalar and vector fields. While vector calculus can be generalized to dimensions (), this chapter will specifically focus on 3 dimensions ()

Fields in vector calculusEdit

 
A depiction of xyz Cartesian coordinates with the ijk elementary basis vectors.

Scalar fieldsEdit

A scalar field is a function   that assigns a real number to each point in space. Scalar fields typically denote densities or potentials at each specific point. For the sake of simplicity, all scalar fields considered by this chapter will be assumed to be defined at all points and differentiable at all points.

Vector fieldsEdit

A vector field is a function   that assigns a vector to each point in space. Vector fields typically denote flow densities or potential gradients at each specific point. For the sake of simplicity, all vector fields considered by this chapter will be assumed to be defined at all points and differentiable at all points.

 
A depiction of cylindrical coordinates and the accompanying orthonormal basis vectors.

Vector fields in cylindrical coordinatesEdit

The cylindrical coordinate system used here has the three parameters:  . The Cartesian coordinate equivalent to the point   is

 

 

 

Any vector field in cylindrical coordinates is a linear combination of the following 3 mutually orthogonal unit length basis vectors:

 

 

 

Note that these basis vectors are not constant with respect to position. The fact that the basis vectors change from position to position should always be considered. The cylindrical basis vectors change according to the following rates:

     
       
       
       

Any vector field   expressed in cylindrical coordinates has the form:  

Given an arbitrary position   that changes with time, the velocity of the position is:

 

The coefficient of   for the term   originates from the fact that as the azimuth angle   increases, the position   swings around at a speed of  .

 
A depiction of spherical coordinates and the accompanying orthonormal basis vectors.

Vector fields in spherical coordinatesEdit

The spherical coordinate system used here has the three parameters:  . The Cartesian coordinate equivalent to the point   is

 

 

 

Any vector field in spherical coordinates is a linear combination of the following 3 mutually orthogonal unit length basis vectors:

 

 

 

Note that these basis vectors are not constant with respect to position. The fact that the basis vectors change from position to position should always be considered. The spherical basis vectors change according to the following rates:

     
       
       
       

Any vector field   expressed in spherical coordinates has the form:  

Given an arbitrary position   that changes with time, the velocity of this position is:

 

The coefficient of   for the term   arises from the fact that as the latitudinal angle   changes, the position   traverses a great circle at a speed of  .

The coefficient of   for the term   arises from the fact that as the longitudinal angle   changes, the position   traverses a latitude circle at a speed of  .

Volume, path, and surface integralsEdit

Volume IntegralsEdit

Volume integrals have already been discussed in the chapter Multivariable calculus, but a brief review is given here for completeness.

Given a scalar field   that denotes a density at each specific point, and an arbitrary volume  , the total "mass"   inside of   can be determined by partitioning   into infinitesimal volumes. At each position  , the volume of the infinitesimal volume is denoted by the infinitesimal  . This gives rise to the following integral:

 

Path IntegralsEdit

Given any oriented path   (oriented means that there is a preferred direction), the differential   denotes an infinitesimal displacement along   in the preferred direction. This differential can be used in various path integrals. Letting   denote an arbitrary scalar field, and   denote an arbitrary vector field, various path integrals include:

 ,  ,  ,  , and many more.

  denotes the total displacement along  , and   denotes the total length of  .

Calculating Path IntegralsEdit

To compute a path integral, the continuous oriented curve   must be parameterized.   will denote the point along   indexed by   from the range  .   must be the starting point of   and   must be the ending point of  . As   increases,   must proceed along   in the preferred direction. An infinitesimal change in  ,  , results in the infinitesimal displacement   along  . In the path integral  , the differential   can be replaced with   to get  

Example 1

As an example, consider the vector field   and the straight line curve   that starts at   and ends at  .   can be parameterized by   where  .  . We can then evaluate the path integral   as follows:

 

 


If a vector field   denotes a "force field", which returns the force on an object as a function of position, the work performed on a point mass that traverses the oriented curve   is  

Example 2

Consider the gravitational field that surrounds a point mass of   located at the origin:   using Newton's inverse square law. The force acting on a point mass of   at position   is  . In spherical coordinates the force is   (note that   are the unit length mutually orthogonal basis vectors for spherical coordinates).

Consider an arbitrary path   that   traverses that starts at an altitude of   and ends at an altitude of  . The work done by the gravitational field is:

 

The infinitesimal displacement   is equivalent to the displacement expressed in spherical coordinates:  .

 

The work is equal to the amount of gravitational potential energy lost, so one possible function for the gravitational potential energy is   or equivalently,  .


Example 3

Consider the spiral   parameterized with respect to   in cylindrical coordinates by  . Consider the problem of determining the spiral's length with   restricted to the range  . An infinitesimal change of   in   results in the infinitesimal displacement:

 

The length of the infinitesimal displacement is  .

The length of the spiral is therefore:  



Surface IntegralsEdit

Given any oriented surface   (oriented means that the there is a preferred direction to pass through the surface), an infinitesimal portion of the surface is defined by an infinitesimal area  , and a unit length outwards oriented normal vector  .   has a length of 1 and is perpendicular to the surface of  , while penetrating   in the preferred direction. The infinitesimal portion of the surface is denoted by the infinitesimal "surface vector":  . If a vector field   denotes a flow density, then the flow through the infinitesimal surface portion in the preferred direction is  .

The infinitesimal "surface vector"   describes the infinitesimal surface element in a manner similar to how the infinitesimal displacement   describes an infinitesimal portion of a path. More specifically, similar to how the interior points on a path do not affect the total displacement, the interior points on a surface to not affect the total surface vector.

 
The displacement between two points is independent of the path that connects them.

Consider for instance two paths   and   that both start at point  , and end at point  . The total displacements,   and  , are both equivalent and equal to the displacement between   and  . Note however that the total lengths   and   are not necessarily equivalent.

Similarly, given two surfaces   and   that both share the same counter-clockwise oriented boundary  , the total surface vectors   and   are both equivalent and are a function of the boundary  . This implies that a surface can be freely deformed within its boundaries without changing the total surface vector. Note however that the surface areas   and   are not necessarily equivalent.

The fact that the total surface vectors of   and   are equivalent is not immediately obvious. To prove this fact, let   be a constant vector field.   and   share the same boundary, so the flux/flow of   through   and   is equivalent. The flux through   is  , and similarly for   is  . Since   for every choice of  , it follows that  .

The geometric significance of the total surface vector is that each component measures the area of the projection of the surface onto the plane formed by the other two dimensions. Let   be a surface with surface vector  . It is then the case that:   is the area of the projection of   onto the yz-plane;   is the area of the projection of   onto the xz-plane; and   is the area of the projection of   onto the xy-plane.

 
The boundary   of   is counter-clockwise oriented.

Given an oriented surface  , another important concept is the oriented boundary. The boundary of   is an oriented curve   but how is the orientation chosen? If the boundary is "counter-clockwise" oriented, then the boundary must follow a counter-clockwise direction when the oriented surface normal vectors point towards the viewer. The counter-clockwise boundary also obeys the "right-hand rule": If you hold your right hand with your thumb in the direction of the surface normals (penetrating the surface in the "preferred" direction), then your fingers will wrap around in the direction of the counter-clockwise oriented boundary.

Example 1

Consider the Cartesian points  ;  ;  ; and  .

Let   be the surface formed by the triangular planes  ;  ; and   where the vertices are listed in a counterclockwise direction relative to the surface normal directions. The surface vectors of each plane are respectively  ;  ; and   respectively which add to a total surface vector of  .

Let   be the surface formed by the single triangular plane   where the vertices are listed in a counterclockwise direction relative to the normal direction. It can be seen that   and   share a the common counter clockwise boundary  The surface vector is   which is equivalent to  .


Example 2

This example will show how moving a point that is in the interior of a "triangular mesh" does not affect the total surface vector. Consider the points   where  . Let the closed path   be defined by the cycle  . For simplicity,  . For each  ,   will denote the displacement of   relative to  . Like with  ,  .

Let   denote a surface that is a "triangular mesh" comprised of the closed fan of triangles:  ;  ; ...;  ;   where the vertices of each triangle are listed in a counterclockwise direction. It can be seen that the counterclockwise boundary of   is   and does not depend on the location of  . The total surface vector for   is:

 

Now displace   by   to get  . The displacement vector of   relative to   becomes  . The counterclockwise boundary is unaffected. The total surface vector is:

 

 

Therefore moving the interior point   neither affects the boundary, nor the total surface vector.



Calculating Surface IntegralsEdit

To calculate a surface integral, the oriented surface   must be parameterized. Let   be a continuous function that maps each point   from a two-dimensional domain   to a point in  .   must be continuous and onto. While   does not necessarily have to be one to one, the parameterization should never "fold back" on itself. The infinitesimal increases in   and   are respectively   and  . These respectively give rise to the displacements   and  . Assuming that the surface's orientation follows the right hand rule with respect to the displacements   and  , the surface vector that arises is  .

In the surface integral  , the differential   can be replaced with   to get  .

Example 3

Consider the problem of computing the surface area of a sphere of radius  .

Center the sphere   on the origin, and using   and   as the parameter variables, the sphere can be parameterized in spherical coordinates via   where   and  . The infinitesimal displacements from small changes in the parameters are:

  causes  

  causes  

The infinitesimal surface vector is hence  . While not important to this example, note how the parameterization was chosen so that the surface vector points outwards. The area is  .

The total surface area is hence:

 


The Gradient and Directional DerivativesEdit

Given a scalar field   that denotes a potential, and given a curve  , a commonly sought after quantity is the rate of change in   as   is being traversed. Let   be an arbitrary parameter for  , and let   denote the point indexed by  . Given an arbitrary   which corresponds to the point  , then using the chain rule gives the following expression for the rate of increase of   at  ,  :

 

where   is a vector field that denotes the "gradient" of  , and   is the unnormalized tangent of  .

If   is an arc-length parameter, i.e.  , then the direction of the gradient is the direction of maximum gain: Given any unit length tangent  , the direction   will maximize the rate of increase in  . This maximum rate of increase is  .

Calculating total gainEdit

Given the gradient of a scalar field  :  , the difference between   at two different points can be calculated, provided that there is a continuous path that links the two points. Let   denote an arbitrary continuous path that starts at point   and ends at point  . Given an infinitesimal path segment   with endpoints   and  , let   be an arbitrary point in  .   denotes the infinitesimal displacement denoted by  . The increase in   along   is:

 

The relative error in the approximations vanish as  . Adding together the above equation over all infinitesimal path segments of   yields the following path integral equation:

 

This is the path integral analog of the fundamental theorem of calculus.

The gradient in cylindrical coordinatesEdit

Let   be a scalar field that denotes a potential and a curve   that is parameterized by  :  . Let the rate of change in   be quantified by the vector  . The rate of change in   is:

 

Therefore in cylindrical coordinates, the gradient is:  

The gradient in spherical coordinatesEdit

Let   be a scalar field that denotes a potential and a curve   that is parameterized by  :  . Let the rate of change in   be quantified by the vector  . The rate of change in   is:

 

Therefore in spherical coordinates, the gradient is:  

The Directional DerivativeEdit

Given a scalar field   and a vector  , scalar field   computes the rate of change in   at each position   where the velocity of   is  . Scalar field   can also be expressed as  . Velocity   can also be a vector field   so   depends on the position  . Scalar field   becomes  .

In Cartesian coordinates where   the directional derivative is:

 

In cylindrical coordinates where   the directional derivative is:

 

In spherical coordinates where   the directional derivative is:

 

What makes the discussion of directional derivatives nontrivial is the fact that   can instead be a vector field  . Vector field   computes   at each position   where  .

In cylindrical coordinates, basis vectors   and   are not fixed, and in spherical coordinates, all of the basis vectors  ,  , and   are not fixed. This makes determining the directional derivative of a vector field that is expressed using the cylindrical or spherical basis vectors non-trivial. To directly compute the directional derivative, the rates of change of each basis vector with respect to each coordinate should be used. Alternatively, the following identities related to the directional derivative can be used (proofs can be found here):

Given vector fields  ,  , and  , then  

Given vector fields   and  , and scalar field  , then  

In cylindrical coordinates,   and  

In spherical coordinates,  , and  , and  

Full Expansions

In Cartesian coordinates where   and   the directional derivative is:

     

In cylindrical coordinates where   and   the directional derivative is:

   

 

 

In spherical coordinates where   and   the directional derivative is:

   

     

     


The Divergence and Gauss's Divergence TheoremEdit

Let   denote a vector field that denotes "flow density". For any infinitesimal surface vector   at position  , the flow through   in the preferred direction is  .   is the flow density parallel to the x-axis etc.

Given a volume   with a closed surface boundary   with an outwards orientation, the total outwards flow/flux through   is given by the surface integral  . This outwards flow is equal to the total flow that is being generated in the interior of  .

For an infinitesimal rectangular prism   ( ,  , and  ) that is centered on position  , the outwards flow through the surface   is:

       

     

 

 

All relative errors vanish as  .

  is the "divergence" of   and is the density of "flow generation" at  . As noted above, the total outwards flow through   is the total flow generated inside of  , which gives Gauss's divergence theorem:

 

 
This image depicts an example of the total flow across a closed boundary being the total flow generated inside the boundary.

In the image to the right, an example of the total flow across a closed boundary being the total flow generated in the interior of the boundary is given. The direction of the flow across each edge is denoted by the direction of the arrows, and the rate is denoted by the number of arrows. Each node inside the boundary is labelled with the rate of flow generation at the current node. It can be checked that a net total of 2 units of flow is being drawn into the boundary, and the total rate of flow generation across all interior nodes is a net consumption of 2 units.


The divergence in cylindrical coordinatesEdit

Let   denote a vector field that denotes "flow density". In order to compute the divergence (flow generation density) of  , consider an infinitesimal volume   defined by all points   where  ,  , and  . Note that   is not a rectangular prism. Let  ,  , and  . Let   be an arbitrary point from  .

The volume of   is approximately  . The 6 surfaces bounding   are described in the following table:

Surface approximate area direction approximate flow density
 ,  ,        
 ,  ,        
 ,  ,        
 ,  ,        
 ,  ,        
 ,  ,        

The total outwards flow through the surface   of   is:

       

     

 

 

 

All relative errors vanish as  .

The divergence (flow generation density) is therefore: