Calculus/Discrete vector calculus

From Wikibooks, open books for an open world
Jump to: navigation, search

This chapter will present an analog to vector calculus where space now consists of discrete "lumps". The purpose of this chapter is to provide an intuitive basis for vector calculus. The portrayal of vector calculus in this chapter will enable the generalization of vector calculus to non-Euclidean geometries.

The essence of Calculus[edit]

The key approach to calculus is to start with a model where each variable, using as an example, takes on discrete quantities separated by small intervals of width . is a measure of the model's "coarseness" (when is increasing) or "fineness" (when is decreasing). When handling quantities at the scale of , an approximation for which the error relative to vanishes as becomes infinitely small, becomes exact when is treated as a continuous variable.

As an example, let be small, and restrict to the quantities . Let for any integer .

The difference approaches 0 as , but it is not accurate to approximate with 0, as the error relative to does not vanish as : in truth, as .

It is however, accurate to approximate with since the error relative to does vanish as : it is the case that as .

When we articulate continuous space into small but non-zero volumes for the purpose of approximating vector calculus, it is important to note that the only approximations that will be made, will be those that entail relative errors that vanish as the articulation of space becomes more and more fine.

As another example, consider the closed interval divided into intervals: where . From each choose a representative point , and let . Let and be two functions whose first parameter is a representative point, and the second parameter is the interval width. Consider the two sums and . It will be assumed that and converge to and respectively as and .

The question of interest are circumstances under which . If other words, as the interval becomes more and more articulated into smaller and smaller intervals, what is required so that approximating with becomes exact?

If as , this is not sufficient to guarantee that . In contrast, if as , this will force . To prove this, the following derivation will be used:

For each , it is assumed that as . Therefore and hence as and . Therefore .

Lumped space[edit]

Directed graphs[edit]

The lumped approximation of space will require the use of a "directed graph".

A "directed graph" consists of a set of nodes/vertices and a set of directed edges. For each edge , has an origin node that is the beginning of edge , and a terminal node that is the end of edge . It will also be allowed that edges can form loops () and that multiple edges can have both the same beginning and end ( and ), though this will be irrelevant for the cases that will be considered.

An arbitrary function over the set of nodes will be referred to as a "node based function", and is effectively a scalar field. The notation will be used if the input parameter is ambiguous. A node based function can also be denoted by exhaustively listing the assignment to each node:

An arbitrary function over the set of edges will be referred to as an "edge based function", and is effectively a scalar or vector field. The notation will be used if the input parameter is ambiguous. An edge based function can also be denoted by exhaustively listing the assignment to each edge: . When a real number assigned to an edge denotes a "vector", a positive value denotes an orientation along the edge's preferred direction, and a negative value denotes an orientation against the edge's preferred direction.

An example directed graph.

An example directed graph is shown to the right. The node set is and the edge set is . The origin and terminal nodes of each edge are: ; ; ; ; ; and .

Interpreting nodes and edges[edit]

Two irregular volumes with an irregular boundary are characterized as two points linked by a curve. Each point is a node in a directed graph, and the curve denotes the directed edge that links the two points. The "length" of the directed edge is the distance between the two points, and the "cross-sectional area" of the directed edge is the area of the projection of the boundary surface onto a plane that is perpendicular to the displacement between the two points.

Each node will correspond to both a point in space, and a volume that contains . will denote the volume of , also referred to as the volume of node . The volume of each node must be positive: for all . In the example directed graph, an example choice of volumes for each node is .

Each edge will correspond to both a curve originating from and terminating on , and a surface that separates from oriented from to .

will denote the distance from to , which will be referred to as the length of edge . The length of each edge must be positive: for all . will denote the area of projected onto a plane that is perpendicular to the displacement , which will be referred to as the cross-sectional area, thickness, or width of edge . The cross-sectional area of each edge must be positive: for all . In the example directed graph, an example choice of lengths for each edge is , and an example choice of areas for each edge is .

In summary an arbitrary directed graph will be characterized by:

  • the set of nodes
  • the set of edges
  • the start and end of each edge
  • the volume of each node
  • the length and area of each edge

The point and space associated with each node , and the curve and surface associated with each edge , are not given consideration after the approximate directed graph model has been established. The parameters in the above list are all that is needed to utilize the directed graph model.

Points and multi-points[edit]

A "point" in space is quantified by a single node , which corresponds to the space point .

Point can be denoted by the node based function where for each node it is the case that . The term arises from the fact that the point is "spread out" over the volume of .

A superposition of points is a "multi-point". Any node based function that returns real values can denote a multi-point.

Volumes and multi-volumes[edit]

The discrete analog to volumes using a directed graph is that a volume is a collection of nodes: . The combined volume region denoted by is and the total volume amount is .

Volume can be denoted by a node based membership function: where for each node , it is the case that

A superposition of volumes forms a "multi-volume". Any node based function that returns real values can be the membership function of a multi-volume. For example, given the node based function can be expressed as the following superpositions:

is the superposition of volumes with the respective weights .

is the superposition of volumes with the respective weights .

Paths and multi-paths[edit]

The discrete analog to paths using a directed graph is that a path is a series of edges and orientations: where is the edge and is an indicator that is if is traversed in the preferred direction, and is if is traversed in the opposite direction. The path must be unbroken: for each it must be that . The combined path denoted by is (path is path the orientation reversed) and the total length is .

A path can be denoted by the edge based function where for each edge , it is the case that where . The term arises from the fact that the path is "spread out" over the thickness of .

A superposition of paths forms a "multi-path". Any edge based function that returns real values can denote a multi-path. For example, assuming that for all , the edge based function can be expressed as the following superpositions:

is the superposition of paths , and with the respective weights .

is the superposition of paths , and with the respective weights .

Surfaces and multi-surfaces[edit]

The example directed graph with the example multi-surface.

The discrete analog to oriented surfaces using a directed graph is that an oriented surface is a collection of edges and orientations: where all of the edges are distinct and is an indicator that describes the surface's orientation. Each edge is an edge that passes through the surface, and is if passes through the surface in the preferred direction, and is if passes through the surface in the opposite direction. The combined surface denoted by is (surface is surface with the orientation reversed) and the total area is .

A surface can be denoted by the edge based function where for each edge , it is the case that . The term arises from the fact that the surface is "spread out" over the length of .

A superposition of surfaces forms a "multi-surface". Any edge based function that returns real values can denote a multi-surface. For example, assuming that for all , the edge based function can be expressed as the following superpositions:

is the superposition of surfaces and with the respective weights .

is the superposition of surfaces and with the respective weights and .

Model of Cartesian coordinates[edit]

The discrete model used for Cartesian coordinates will consist of an infinite 3 dimensional grid of nodes that spans . To establish the model, the following is needed:

  • A spacing for the x-coordinates.
  • A spacing for the y-coordinates.
  • A spacing for the z-coordinates.

For each triplet of integer indices , there exists a node and 3 edges , , and .

The origin and terminal nodes of are and

The origin and terminal nodes of are and

The origin and terminal nodes of are and

The Cartesian coordinate associated with node is , and the space associated with node is .

The volume of node is .

The length of edge is . The length of edge is . The length of edge is .

The area of edge is . The area of edge is . The area of edge is .

Given a scalar field over Cartesian coordinates, will be approximated by the node based function . Function is defined by for each .

Given a vector field over Cartesian coordinates, will be approximated by the edge based function . Function is defined by ; ; and .

Model of Cylindrical coordinates[edit]

The discrete model used for Cylindrical coordinates will consist of an infinite 3 dimensional cylindrical grid of nodes that spans . To establish the model, the following is needed:

  • A spacing for the coordinate .
  • A large positive integer that will yield a spacing for the coordinate .
  • A spacing for the coordinate .

Each node will correspond to a unique triplet of integers, and will be denoted by . The cylindrical coordinate denoted by will be .

Clearly, due to the nature of cylindrical coordinates (such as the fact that coordinate is cyclical), not every triplet will be allowed. The following three domains will be defined: , , and .

There exists a node for each .

There exists an edge for each such that and

There exists an edge for each such that and

There exists an edge for each such that and

Next, the volume of each node and the lengths and area of each edge will be calculated. To simplify notation, let for any nonnegative real number .

For each the cylindrical coordinate that corresponds to is , and the space (described using cylindrical coordinates) associated with is

For each the volume of node is

For each the length and area of edge is and respectively.

For each the length and area of edge is and respectively.

For each the length and area of edge is and respectively.

Given a scalar field over cylindrical coordinates, will be approximated by the node based function . Function is defined by for each .

Given a vector field over cylindrical coordinates, will be approximated by the edge based function . Function is defined by:

Model of Spherical coordinates[edit]

The discrete model used for Spherical coordinates will consist of an infinite 3 dimensional spherical grid of nodes that spans . To establish the model, the following is needed:

  • A spacing for the coordinate .
  • A large positive integer that will yield a spacing for the coordinate .
  • A large positive integer that will yield a spacing for the coordinate .

Each node will correspond to a unique triplet of integers, and will be denoted by . The spherical coordinate denoted by will be .

Clearly, due to the nature of spherical coordinates (such as the fact that coordinate is cyclical), not every triplet will be allowed. The following three domains will be defined: , , , and .

There exists a node for each .

There exists an edge for each such that and

There exists an edge for each such that and

There exists an edge for each such that and

Next, the volume of each node and the lengths and area of each edge will be calculated. To simplify notation, let for any nonnegative real number , and let for any nonnegative real number and any real number .

For each the spherical coordinate that corresponds to is , and the space (described using spherical coordinates) associated with is

For each the volume of node is

For each the length and area of edge is and respectively.

For each the length and area of edge is and respectively.

For each the length and area of edge is and respectively.

Given a scalar field over spherical coordinates, will be approximated by the node based function . Function is defined by for each .

Given a vector field over spherical coordinates, will be approximated by the edge based function . Function is defined by:

Model of Curvilinear coordinates[edit]

A curvilinear coordinate system is a coordinate system such as cylindrical or spherical coordinates where the position may not follow a straight line as one of the coordinates is changed. To model an arbitrary curvilinear coordinate system in 3 dimensional space, let the coordinates be denoted by .

To avoid unnecessary repetition, the following notation will be used:

  • denotes an arbitrary triplet of integer indices from .
  • For each :
  • denotes an arbitrary curvilinear coordinate .
  • For each :

Let denote the position given by coordinate . For each , the rate of change in the position at coordinate with respect to is given by: . It will be assumed that , , and are all mutually perpendicular, which is the case for cylindrical and spherical coordinates. In addition, for each , vector will also denote a unit length normalization of .

For the purposes of simplicity, it will be assumed that the coordinates can be any triple of real numbers. Singularities such as the z-axis in cylindrical and spherical coordinates will not be considered by this model. Since singularities are not considered, this model will be considerably simpler than the models given for cylindrical and spherical coordinates.

To model the curvilinear coordinate system, a lattice of of nodes connected by directed edges will be established:

Start by choosing "resolutions" for each coordinate denoted by . The quantities should all be strictly positive, and ideally should be as small as possible.

For each triplet of integer indices , a node will be created at position .

For each and for each triplet of integer indices , there will exist edge such that and .

For each , the volume of node is

For each , the length and area of edge are and respectively.

Any node for which should be deleted along with all connecting edges.

For any edge for which and , then nodes and should be fused into a single node, and edge should be discarded. For any edge for which and , then edge should be discarded. Either action may be pursued when .

Given a scalar field over the curvilinear coordinate system, will be approximated by the node based function . Function is defined by for each .

Given a vector field over the curvilinear coordinates, will be approximated by the edge based function . Function is defined by for each and for each .

Discrete analog to Integrals[edit]

Volume Integrals[edit]

Let denote an arbitrary volume. Given a node based function , the "volume integral" of over is (recall that is the volume of node , and is the volume of space represented by ).

If node based function is an approximation of a scalar field , where , then is an approximation of the volume integral .

Recall that can be described via the node based function . This allows the expression . If node based function denotes a multi-volume, then .

Path Integrals[edit]

Let denote an arbitrary path. Given an edge based function , the "path integral" of along is (recall that is the length of edge , and is the curve represented by ).

If edge based function is an approximation of a vector field , where , then is an approximation of the path integral .

Recall that can be described via the edge based function . This allows the expression . If edge based function denotes a multi-path, then .

Surface Integrals[edit]

Let denote an arbitrary surface. Given an edge based function , the "surface integral" of over is (recall that is the cross-sectional area of edge , and is the surface which separates and ).

If edge based function is an approximation of a vector field , where , then is an approximation of the surface integral .

Recall that can be described via the edge based function . This allows the expression . If edge based function denotes a multi-surface, then .

Discrete analog to the Gradient[edit]

Given a node based function , the "gradient" of is the edge based function . For all , . The gradient denotes the rate of change in along each edge in the preferred direction.

The path integral along path of the gradient of is the difference in between the endpoints. The value of at each node is shown, and along the path the value of is shown at each edge. (the edge orientations are not shown for simplicity)

When given an arbitrary path , the path integral of the gradient along is:

The condition that is unbroken means that:

will denote the sequence of nodes visited by :

For each , it is the case that

hence:

The path integral of the gradient of along is simply the difference of between the final node and the starting node: .

Given an arbitrary multi-volume denoted by node based function , the multi-surface which is the outwards oriented surface of the multi-volume is denoted by the edge based function . When traversing an arbitrary edge, the net number of outwards transitions through surfaces is the negative change in .

The gradient can also be used to compute the surfaces of volumes:

Consider an arbitrary volume . The outwards oriented surface of is defined by: for every directed edge , it is the case that and .

Volume can be denoted by the node based function , and the outwards oriented surface can be denoted by the edge based function .

The gradient of is:

Therefore the outwards oriented surface or multi-surface of a volume or multi-volume denoted by an arbitrary node based function is denoted by the edge based function .

The following sections will demonstrate that the gradient defined for node based functions is consistent with the gradient for scalar fields in . This consistency will be shown for Cartesian, cylindrical, and spherical coordinates.

The Gradient in Various Coordinate Systems[edit]

All of Cartesian, cylindrical, and spherical coordinate systems will be modeled using the discrete model of curvilinear coordinates. The same shorthand notation will be used.

Starting with an arbitrary scalar field , the node based function that approximates is for all .

For each and , the gradient along edge is:

Given an arbitrary coordinate , let index the node whose position is "closest" to .

The gradient of scalar field is a vector quantity with components that are multiples of the basis vectors . The coefficient of is the gradient of along edges that are parallel to , and similarly for and . The fact that , , and are of unit length and mutually orthogonal (perpendicular) is important.

The gradient of scalar field at can now be approximated by the following:

As , it becomes apparent that .

The Gradient in Cartesian Coordinates[edit]

Applying the curvilinear coordinate model to Cartesian coordinates means that , , and . It is also the case that , , and . Applying the formula for the gradient that was derived from the discrete model of curvilinear coordinates gives:

which is consistent with the formula for the gradient derived for continuous functions over Cartesian coordinates.

The Gradient in Cylindrical Coordinates[edit]

Applying the curvilinear coordinate model to cylindrical coordinates means that , , and . It is also the case that , , and . Applying the formula for the gradient that was derived from the discrete model of curvilinear coordinates gives:

which is consistent with the formula for the gradient derived for continuous functions over cylindrical coordinates.

The Gradient in Spherical Coordinates[edit]

Applying the curvilinear coordinate model to spherical coordinates means that ,