Calculus/Inverting vector calculus operators
In the chapter on vector calculus, the differential operator of the gradient (), the divergence (), and the curl () were introduced. This chapter will focus on inverting these differential operators.
The gradient, divergence, and curl operators are all "linear", meaning that given arbitrary scalar fields , vector fields , and scalars , that:
More generally given a family of scalar fields , vector fields , and coefficients (each corresponds to a scalar field, a vector field, and a scalar coefficient),
Inverting Linear Operators
Recall from linear algebra that when given a bijective linear operator , that an inverse can be created by computing a solution to each of where is the elementary basis vector for each . When attempting to find an that solves for an arbitrary , the solutions to can be stacked in a linear manner to get as a possible solution. This yields an approach to inverting .
This same approach will be used to compute "Green's functions" for each vector calculus differential operator.
The Dirac delta function
The Dirac delta function is a hypothetical function that returns for all and for . The Dirac delta is not meant to be evaluated at , but instead assumed to satisfy the following integral property: . More generally, given any interval that strictly contains 0: , then . is effectively a density function that describes an infinitely dense total mass of 1 at . For an arbitrary , describes a density function that describes an infinitely dense total mass of 1 at .
Even though , it is not the case that , or . The integrals are: and . In general, for any , .
Addressing non-differentiability
Consider the piece-wise function defined by: . It is common to accept that is not differentiable at and that . With the Dirac delta function, the derivative of can be expressed as . With this derivative, part II of the fundamental theorem of calculus holds even for intervals that contain .
In this chapter, it will generally be assumed that all scalar fields and vector fields are continuous and differentiable everywhere. However if this is not the case, the Dirac delta function will be used to model the derivative operators at points of non-differentiability.
Inverting linear differential operators
Given an arbitrary function , can be expressed as the linear combination of Dirac delta functions. Let be a linear differential operator that takes a real valued single variable function , and returns another real valued single variable function . If a solution exists to for all , then given an arbitrary , a solution exists to which is . The family of functions are referred to as "Green's functions".
Dirac delta function variants
In this chapter, given an arbitrary point , the function will denote a 3-dimensional variant of the Dirac delta function. The key integral property is that for any volume , that . Note that . It should also be noted that carries with it the dimensions .
Given an arbitrary oriented curve , will denote another variant of the Dirac delta function which returns vectors. for all , and is infinite in the direction of for all points from . The key integral property is that for any oriented surface , that where is the net number of times passes through in the preferred direction ( passing through in the reverse direction reduces by 1). It should also be noted that carries with it the dimensions .
Given an arbitrary oriented surface , will denote another variant of the Dirac delta function which returns vectors. for all , and is infinite in the direction of the oriented normals of for all points from . The key integral property is that for any oriented curve , that where is the net number of times passes through in the preferred direction ( passing through in the reverse direction reduces by 1). It should also be noted that carries with it the dimensions .
Multi-paths and multi-surfaces
Given an oriented curve , then can be denoted by the Dirac delta vector field . If is continuous and starts at and ends at , then it can be proven using Gauss's Divergence Theorem that .
Given a collection of oriented paths, then the vector field effectively denotes the "superposition" of . This superposition is referred to as a "multi-path". Not all paths have to have a weight of 1. With multi-path , the weights on and are both . This multi-path is an even 50%/50% superposition between and .
Any vector field can be envisioned as a superposition of a possibly infinite number of paths. Each path may have an infinitesimal weight. When a vector field is envisioned as a multi-path, the decomposition into individual paths is not unique. When vector field denotes a multi-path, is the net density of path origin points minus the density of destination points: the path starting point density.
When everywhere, can be envisioned as a superposition of a possibly infinite number of paths that are either closed or extend to infinity. If it is also the case that is for some , then all of the paths have to close and is effectively a "multi-loop". ( is if and only if there exists some threshold and factor such that )

In the image to the right, a divergence free vector field that denotes flow density is decomposed into the superposition of multiple simple loops. 2 dimensional space is depicted as a lattice of infinitely small squares. The vector field is the top-left section. The flow along each horizontal edge, denoted by the direction and number of arrows, is the horizontal component of the vector field at the current edge (or neighboring vertex). The flow along each vertical edge, denoted by the direction and number of arrows, is the vertical component of the vector field at the current edge (or neighboring vertex). The remaining 3 sections show 3 simple loops whose superposition forms the vector field.
Given an oriented surface , then can be denoted by the Dirac delta vector field . If has the counter-clockwise oriented boundary , then it can be proven using Stokes' Theorem that .
Given a collection of oriented surfaces, then the vector field effectively denotes the "superposition" of . This superposition is referred to as a "multi-surface". Not all surfaces have to have a weight of 1. With multi-surface , the weights on and are both . This multi-surface is an even 50%/50% superposition between and .
Any vector field can be envisioned as a superposition of a possibly infinite number of surfaces. Each surface may have an infinitesimal weight. When a vector field is envisioned as a multi-surface, the decomposition into individual surfaces is not unique. When vector field denotes a multi-surface, is the multi-loop that is the counter-clockwise oriented boundary of the multi-surface denoted by .
When everywhere, can be envisioned as a superposition of a possibly infinite number of surfaces that are either closed with no boundaries or extend to infinity. If it is also the case that is for some , then all of the surfaces have to close without extending to infinity and is effectively a "multi closed surface".
Given an oriented curve and a vector field , then the path integral is equivalent to the volume integral . This statement, while intuitive to a certain degree given the definition of , is proven in the box below:
In a general sense, the infinitesimal displacement from a path integral along can be replaced by when the integral is converted to a volume integral over . For example, given a continuous curve which begins at and ends at , it can be derived that: .
Given an oriented surface and a vector field , then the surface integral is equivalent to the volume integral . This statement, while intuitive to a certain degree given the definition of , is proven in the box below:
In a general sense, the infinitesimal surface vector from a surface integral over can be replaced by when the integral is converted to a volume integral over . For example, given an oriented surface which has a total surface vector of , it can be derived that: .
Given a curve and a surface , the net number of times passes through in the preferred direction, denoted by , is given by:
Given vector fields and where denotes a multi-path and denotes a multi-surface, then denotes the total "flux" of multi-path through multi-surface .
If is closed loop and is a closed surface then since every time passes through , must pass through in the opposite direction in order to close itself. More generally, if vector field denotes a multi-loop, which means that and is for some , and vector field denotes a multi closed surface, which means that and is for some , then . An algebraic proof (which is not truly necessary) is given in the box below:
An example application of multi-paths and multi-surfaces is given in the box below:
Given a continuous oriented curve that originates from and terminates at , it has been noted that . It can be derived that:
.
Generalizing to a multi-path vector field , it is the case that: . Recall that is a measure of the "starting point density" of .
Given an oriented surface with counterclockwise boundary , it has been noted that . It can be derived that: . Generalizing to a multi-surface vector field , it is the case that: . Recall that is the counterclockwise boundary density of .
Inverting the divergence operator (the inverse square law)
Given an arbitrary scalar field , the problem of interest is that of finding a vector field that satisfies and . In other words, we want to find a vector field whose divergence is given by and is irrotational. For reasons that will soon become apparent, it will be assumed that is as for some . The "big O" means that .
can be expressed as a linear combination of Dirac delta functions: .
If an irrotational vector field can be determined such that (that is divergence-free everywhere except the origin where the divergence is infinite), then for all : . Since the divergence operator distributes over linear combinations, is an irrotational vector field that satisfies .
An intuitive candidate for an irrotational vector field that is divergence free everywhere except the origin is a radially symmetric vector field where is the distance from the origin, and is the unit vector that points away from the origin (see spherical coordinates). is unknown at this point. The inverse square indicates that the flow diffuses out over a larger area as the distance from the origin increases. It can easily be checked that is irrotational everywhere (including the origin), and is divergence free everywhere except the origin. All that remains is to determine such that . Consider a sphere of radius centered on the origin. The total outwards flow/flux through the surface of this sphere is , so the total flow generated inside the sphere is . Since , the total flow generated inside the sphere is . This gives . Therefore .
In total, is an irrotational vector field that satisfies . The assumption that is as for some implies that the volume integral does not diverge to infinity. Also note that the apparent singularity at does not impact the integral (to be discussed below).
Uniqueness
An important question is if the vector field is the only irrotational vector field that satisfies . If is another possible solution, then is a vector field that is both irrotational and divergence free at all points: and . There is then the following theorem:
is a constant vector , and therefore an irrotational vector field that satisfies is unique up to the addition of a constant vector field.
About Improper Integrals
The volume integral has a pole/singularity when . Its range also extends to infinity. Both of these irregularities have the potential to result in a divergent (infinite) integral.
To analyse whether or not the integral diverges due to the pole/singularity or infinite range, the volume integral will be expressed as the integral of concentric spherical shells centered on :
where denotes the outwards oriented surface of a sphere centered on with radius . denotes a solid sphere centered on with radius .
The inner surface integral does not present any irregularities. The lower bound of denotes the pole, and the upper bound of denotes the infinite range.
The integral where the inner radius is small and the outer radius is large is regular. The goal is to analyse the integral's behavior as and .
Assume that for all for each radius . The magnitude of the inner surface integral is now bounded from above by:
As can be seen, the surface area of cancels out .
The magnitude of is bounded from above by:
Assuming that is bounded everywhere, is bounded everywhere, so it is clear that does not approach infinity as . This settles the pole/singularity at . For the integral to not diverge as , the condition that is as for some is sufficient. This condition implies that is less than a multiple of when becomes sufficiently large. The integral of converges at infinity provided that .
Inverting the gradient operator
Given a vector field , the problem of interest is finding a scalar field such that . It should be noted that does not exist for most vector fields. The gradient theorem implies that for all closed continuous curves , that . It must be the case that for all closed continuous curves : must be conservative. Equivalently, everywhere: should be irrotational.
Given a conservative vector field , can be determined by choosing an origin point , and a constant . For each , a continuous oriented curve that starts at and ends at should be generated. is assigned: . The choice of curve is irrelevant since is conservative/irrotational.
It can be confirmed that satisfies for each point by evaluating the directional derivative along arbitrary curves that pass through . For an arbitrary curve parameterized by that passes through at , the directional derivative of at is . This confirms that .
Spherical volume integral solution
Assume that is as for some . This means that for some , that there exists such that .
This property implies that given a sufficiently large , that any path integral between any two points outside of the sphere that remains outside of the sphere is arbitrarily small. Therefore the origin point can freely shift between points at infinity.
Choose infinity as the origin point and let . Given an arbitrary point , choose a direction quantified by unit length vector . The path travels backwards along a ray that starts at and points in the direction given by . . Since this integral does not depend on the direction , the average over all directions is:
where is an infinitesimal surface portion of the unit sphere that constrains .
Letting the position vector variable be , the new volume differential is .
Lastly, letting gives:
This new formula is a volume integral that expresses the potential as a linear combination of functions that exhibit a degree of spherical symmetry. This formula is similar to the inverse square law for the inverse of the divergence.
Next, the above formula will be derived using a Green's function approach in a manner similar to the inverse square law for the divergence operator.
Green's function solution
This section will derive a formula identical to the formula above using a Green's function approach. While the derivation will be complicated and the result will not be new, the derivation itself will yield many interesting intermediate results. Again, it will be assumed that is as for some . It will also be assumed that is continuous.
Vector field can be expressed as the following linear combination of Dirac delta functions: . This linear combination however does not facilitate the inversion of the gradient since for each , the vector fields , , and are all not conservative, so there do not exist any scalar fields , , and such that , , and . This prevents a simple solution of .
It is first necessary to express as a linear combination of vector fields that are conservative, so that for each component/basis vector field, a scalar field exists where the gradient is the component vector field. In mathematical terms should be decomposed into the following linear combination:
where for each , vector fields , , and are all conservative. Specifically a vector valued function is required that is linear with respect to :
. In essence, is effectively a linear combination of , , and where the coefficients are the components of . The linear combination that must be decomposed into is: .
A candidate function that exhibits a degree of spherical symmetry has the form:
where is the projection of onto , and is the perpendicular component of relative to . and are real valued functions that scale the components of relative to the displacement . and have yet to be determined.
and have to be chosen such that provided that satisfies all of the required conditions (most importantly is conservative) and that is always a conservative vector field with as the position parameter.
Using the assumption that is continuous, for an arbitrarily small , it can be assumed that for . can be added as an additional parameter to , , and to get:
The condition that becomes: .
It can be proven with difficulty that if where is an arbitrary monotone decreasing function and and , then choosing
and
will satisfy the condition .
being conservative, continuous, and vanishing at infinity are all important.
For to always be a conservative vector field with as the position parameter, for all . Choosing and will make conservative. Hence
and
Lastly, a scalar valued function should be chosen that satisfies . One possible is:
Therefore one possible solution is . This is identical to the solution given in the previous section.
Inverting the curl operator (the Boit-Savart law)
Given a vector field , the problem of interest is finding a divergence free vector field such that and . Since the curl is always divergence free, always, it is required that be divergence free everywhere: .
Green's function solution
The Green's function solution that will be presented here will be very similar to the Green's function solution given for inverting the gradient. It will be assumed that is as for some . It will also be assumed that is continuous.
Vector field can be expressed as the following linear combination of Dirac delta functions: . This linear combination however does not facilitate the inversion of the curl since for each , the vector fields , , and are all not divergence free, so there do not exist any vector fields , , and such that , , and . This prevents a simple solution of .
Using identical reasoning as was used for inverting the gradient, a vector valued function is required such that:
- is linear with respect to so that
- .
- is divergence free with respect to as the input parameter.
It can again be proven with difficulty that if where is an arbitrary monotone decreasing function and , and , then choosing and will satisfy the condition .
being divergence free, continuous, and vanishing at infinity are all important.
For to always be a divergence free vector field with as the position parameter, for all . Choosing and will make divergence free. Hence and
Lastly, a vector valued function should be chosen that satisfies and . One possible is:
Therefore one possible solution is .
Summary
Let be a continuous scalar field such that is as for some . An irrotational vector field that satisfies and is
Let be a continuous conservative () vector field that is as for some . A scalar field that satisfies is
Let be a continuous divergence free () vector field that is as for some . A vector field that satisfies and is
Example Applications
Electromagnetism
Maxwell's Equations for electromagnetism are [1]:
- Gauss's Law of Electric Fields:
- Faraday's Law:
- Gauss's Law of Magnetic Fields:
- Ampere's Law with Maxwell's correction:
and are vector fields that denote the electric and magnetic field respectively. is a scalar field that denotes the charge density. is a vector field that denotes the current density. is a constant that denotes the electric permittivity of free space[1], and is a constant that denotes the magnetic permeability of free space[1].
When there is no changes in , , , and with respect to time, Maxwell's equations are reduced to:
Coulomb's Law
Solving for the electric field from and gives: . This formula is referred to as "Coulomb's Law".
Biot-Savart Law
Solving for the magnetic field from and gives: . This formula is referred to as the "Biot-Savart Law".
Gravitational Fields
According to Newton's inverse square law of gravity, the attractive force between masses and is where is the distance between and , and is the gravitational constant. The gravitational field (force per unit mass or acceleration) generated by a point mass of located at is
Given a scalar field that denotes the density of mass at each point , then the total gravitational field is: . From this formula, it can be seen that the gravitational field satisfies the following equations: and . This form of characterizing the gravitational field can yield interesting results.
Gauss's divergence theorem implies that given a closed surface , that the total inwards flux of a gravitational field is related to the total mass contained by by the equation .
Consider a spherically symmetric mass distribution centered on the origin: . It is clear that the gravitational field is also spherically symmetric: . Given a sphere of radius centered on the origin, the total inwards gravitational flux is , and the total mass contained is . Therefore:
The gravitational field strength at a distance of from the origin is .
Given a solid spherical mass with a uniform density of and a radius of , the radial density function is so the gravitational field strength at a radius of is:
The gravitational field reaches its maximum of at the sphere's surface.

Given a hollow spherical mass of and a radius of , the radial density function is , where is the 1-dimensional Dirac delta function. The gravitational field strength at a radius of is:
Contrary to intuition (and many examples from science fiction), the gravitational field inside a hollow spherical shell or Dyson sphere does not pull towards the inner surface, but is instead 0, as shown in the image to the right. If there is any mass nested inside the spherical shell, the gravitational field of the nested mass takes over completely inside the shell.