Stokes' theorem is a vast generalization of this theorem in the following sense.

By the choice of F, . In the parlance of differential forms, this is saying that f(x) dx is the exterior derivative of the 0-form (i.e. function) F: dF = f dx. The general Stokes theorem applies to higher differential forms instead of F.

In fancy language, the closed interval [a, b] is a one-dimensional manifold with boundary. Its boundary is the set consisting of the two points a and b. Integrating f over the interval may be generalized to integrating forms on a higher-dimensional manifold. Two technical conditions are needed: the manifold has to be orientable, and the form has to be compactly supported in order to give a well-defined integral.

The two points a and b form the boundary of the open interval. More generally, Stokes' theorem applies to oriented manifolds M with boundary. The boundary ∂M of M is itself a manifold and inherits a natural orientation from that of the manifold. For example, the natural orientation of the interval gives an orientation of the two boundary points. Intuitively, a inherits the opposite orientation as b, as they are at opposite ends of the interval. So, "integrating" F over two boundary points a, b is taking the difference F(b) − F(a).

Let M be a smooth manifold. A (C∞-)singular k-simplex of M is a smooth map from the standard simplex in Rk to M. The free abelian group Sk generated by singular k-simplices is said to consist of singular k-chains of M. These groups, together with boundary map ∂, defines a chain complex. The corresponding homology (resp. cohomology) is called the (C∞-)singular homology (resp. cohomology) of M.

On the other hand, the differential forms, with exterior derivative d as the connecting map, form a cochain complex, which defines de Rham cohomology.

Differential k-forms can be integrated over a k-simplex in a natural way, by pulling back to Rk. Extending by linearity allows one to integrate over chains. This gives a linear map from the space of k-forms to the k-th group in the singular cochain Sk*, the linear functionals on Sk. In other words, a k-form defines a functional

on the k-chains. Stokes' theorem says that this is a chain map from de Rham cohomology to singular cohomology; the exterior derivative d behaves like the "dual" of ∂ on forms. This gives a homomorphism from de Rham cohomology to singular cohomology. On the level of forms, this means

closed forms have zero integral over boundaries and,

exact forms have zero integral over cycles.

de Rham's theorem shows that this homomorphism is in fact an isomorphism. So the converse to 1 and 2 above hold true. In other words, if {ci} are cycles generating the k-th homology group, then for any corresponding real numbers {ai}, there exist a closed form such that

The general form of the Stokes theorem using differential forms is more powerful and easier to use than the special cases. Because in Cartesian coordinates the traditional versions can be formulated without the machinery of differential geometry they are more accessible, older and have familiar names. The traditional forms are often considered more convenient by practicing scientists and engineers but the non-naturalness of the traditional formulation becomes apparent when using other coordinate systems, even familiar ones like spherical or cylindrical coordinates. There is potential for confusion in the way names are applied, and the use of dual formulations.

An illustration of Kelvin-Stokes theorem with surface , its boundary and orientation n.

This is the (dualized) 1+1 dimensional case, for a 1-form (dualized because it is a statement about vector fields). This special case is often just referred to as the Stokes' theorem in many introductory university vector calculus courses. It is also sometimes known as the curl theorem.

The classical Kelvin-Stokes theorem:

which relates the surface integral of the curl of a vector field over a surface in Euclidean three-space to the line integral of the vector field over its boundary, is a special case of the general Stokes theorem (with n = 2) once we identify a vector field with a 1 form using the metric on Euclidean three-space. The curve of the line integral ( ∂Σ ) must have positive orientation, meaning that dr points counterclockwise when the surface normal ( d Σ ) points toward the viewer, following the right-hand rule.

Two of the four Maxwell equations involve curls of 3-D vector fields and their differential and integral forms are related by the Kelvin-Stokes theorem. Caution must be taken to avoid cases with moving boundaries: the partial time derivatives are intended to exclude such cases. If moving boundaries are included, interchange of integration and differentiation introduces terms related to boundary motion not included in the results below: