# Integration¶

This chapter doesn’t assume any knowledge about differential geometry. The most versatile way to do integration over manifolds is explained in the differential geometry section.

## General Case¶

We want to integrate a function over a -manifold in , parametrized as:

then the integral of over is:

where is called a Gram matrix and is a Jacobian:

The idea behind this comes from the fact that the volume of the -dimensional parallelepiped spanned by the vectors

is given by

where is an matrix having those vectors as its column vectors.

### Example¶

Let’s integrate a function over the surface of a sphere in 3D (e.g. and ):

Let’s say we want to calculate the surface area of a sphere, so we set and get:

## Special Cases¶

### k = n - 1¶

is a generalization of a vector cross product. The symbol means a determinant of a matrix with one row removed (first term in the sum has first row removed, second term has second row removed, etc.).

### y = f(x, z)¶

in general for we get:

The “” term is missing in the sums above.

### Implicit Surface¶

For a surface given explicitly by

we get:

### Orthogonal Coordinates¶

If the coordinate vectors are orthogonal to each other:

we get:

## Motivation¶

Let the -dimensional parallelepiped P be spanned by the vectors

and let is matrix having these vectors as its column vectors. Then the area of P is

so the definition of the integral over a manifold is just approximating the surface by infinitesimal parallelepipeds and integrating over them.

## Example¶

Let’s calculate the total distance traveled by a body in 1D, whose position is given by :

where , , ... are all the points at which , so each of the integrals in the above sum has either positive or negative integrand.
{"extraction_info": {"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9736706018447876, "perplexity": 688.4066653125744}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-39/segments/1631780060677.55/warc/CC-MAIN-20210928092646-20210928122646-00160.warc.gz"}