Calculating contour integrals with the residue theorem
For a standard contour integral, we can evaluate it by using the residue theorem. This theorem states that

where
is the residue of the function
,
is the contour located on the complex plane. Here,
is the integrand of the function, or part of the integral to be integrated. A residue of order p is defined as follows 
The following examples illustrate how contour integrals can be calculated using the residue theorem. The following two examples have a residue of order p=3 where c=0, i.e., ![{\displaystyle {\text{Res}}(f,0)={\frac {1}{2!}}\lim _{z\to 0}{\frac {d^{2}}{dz^{2}}}\left[z^{3}f(z)\right]}](./_assets_/eb734a37dd21ce173a46342d1cc64c92/0b5c3d6f3b1dff6e2a757aeb750032a913d4a4d0.svg)
Example 1

Example 2

Multivariable contour integrals
To solve multivariable contour integrals (contour integrals on functions of several variables), such as surface integrals, complex volume integrals and higher order integrals, we must use the divergence theorem. For right now, let
be interchangeable with
. These will both serve as the divergence of the vector field written as
. This theorem states that:

In addition, we also need to evaluate
, where
is an alternate notation of
. [1]The divergence of any dimension can be described as

The following examples illustrate the use of divergence theorem in the calculation of multivariate contour integrals.
Example 1
Let the vector field
be bounded by the following conditions

The corresponding double contour integral would be set up as such:


We now evaluate
by setting up the corresponding triple integral:

From this, we can now evaluate the integral as follows:

Example 2
Given the vector field
and
being the fourth dimension. Let this vector field be bounded by the following:

To evaluate this, we use the divergence theorem as stated before, and evaluate
afterwards. Let
, then:
-



From this, we now can evaluate the integral:

Thus, we can evaluate a contour integral of the fourth dimension.