---
title: "NLineIntegrate"
language: "en"
type: "Symbol"
summary: "NLineIntegrate[f, {x, y, ...} \\[Element] curve] computes the numerical scalar line integral of the function f[x, y, ...] over the curve. NLineIntegrate[{p, q, ...}, {x, y, ...} \\[Element] curve] computes the numerical vector line integral of the vector function {p[x, y, ...], q[x, y, ...], ...}."
keywords: 
- line integral
- path integral
- vector calculus
- Green's theorem
- contour integral
- work of a force
- vector field
- potential
- scalar field
- moment of inertia
- centroid
- area
- college calculus
- path dependence
- conservative force
- non-conservative force
- numerical integral
canonical_url: "https://reference.wolfram.com/language/ref/NLineIntegrate.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "Vector Analysis"
    link: "https://reference.wolfram.com/language/guide/VectorAnalysis.en.md"
  - 
    title: "Symbolic Vectors, Matrices and Arrays"
    link: "https://reference.wolfram.com/language/guide/SymbolicArrays.en.md"
related_functions: 
  - 
    title: "LineIntegrate"
    link: "https://reference.wolfram.com/language/ref/LineIntegrate.en.md"
  - 
    title: "SurfaceIntegrate"
    link: "https://reference.wolfram.com/language/ref/SurfaceIntegrate.en.md"
  - 
    title: "NSurfaceIntegrate"
    link: "https://reference.wolfram.com/language/ref/NSurfaceIntegrate.en.md"
  - 
    title: "ContourIntegrate"
    link: "https://reference.wolfram.com/language/ref/ContourIntegrate.en.md"
  - 
    title: "NContourIntegrate"
    link: "https://reference.wolfram.com/language/ref/NContourIntegrate.en.md"
  - 
    title: "Integrate"
    link: "https://reference.wolfram.com/language/ref/Integrate.en.md"
  - 
    title: "NIntegrate"
    link: "https://reference.wolfram.com/language/ref/NIntegrate.en.md"
  - 
    title: "Region"
    link: "https://reference.wolfram.com/language/ref/Region.en.md"
  - 
    title: "ParametricRegion"
    link: "https://reference.wolfram.com/language/ref/ParametricRegion.en.md"
  - 
    title: "ArcLength"
    link: "https://reference.wolfram.com/language/ref/ArcLength.en.md"
  - 
    title: "Grad"
    link: "https://reference.wolfram.com/language/ref/Grad.en.md"
---
[EXPERIMENTAL]

# NLineIntegrate

NLineIntegrate[f, {x, y, …}∈curve] computes the numerical scalar line integral of the function f[x, y, …] over the curve.

NLineIntegrate[{p, q, …}, {x, y, …}∈curve] computes the numerical vector line integral of the vector function {p[x, y, …], q[x, y, …], …}.

## Details and Options

* Line integrals are also known as curve integrals and work integrals.

* Scalar line integrals integrate scalar functions along a curve. They typically compute things like length, mass and charge for a curve.

* Vector line integrals are used to compute the work done by a vector function along a curve in the direction of its tangent. Typical vector functions include a force field, electric field and fluid velocity field.

* The scalar line integral of the function ``f`` along a ``curve`` $C=\left\{r(u)\in \mathbb{R}^n,a\leq u\leq b\right\}$ is given by:

[image]

* … where $$\left\| r'(u)\right\|$$ is the measure of a parametric curve segment.

* The scalar line integral is independent of the parametrization and orientation of the ``curve``. Any one-dimensional ``RegionQ`` object can be used as a ``curve``.

* The vector line integral of the function ``F`` along a ``curve`` $C=\left\{r(u)\in \mathbb{R}^n,a\leq u\leq b\right\}$ is given by:

[image]

* … where $$F(r(u)).r'(u)$$ is projection of the vector function $F$ onto the tangent direction so only the component in the tangent direction gets integrated.

* The vector line integral is independent of the parametrization of the curve, but it does depend on the orientation of the curve.

* The orientation for a curve is given by a tangent vector field $T(u)$ over the curve.

[image]

* For a parametric curve ``ParametricRegion[{r1[u], …, rn[u]}, …]``, the tangent vector field $T(u)$ is taken to be ``∂ur[u]``.

* Special curves in $\mathbb{R}^2$ with their assumed tangent orientations include:

|         |                                            |                                                                                   |
| ------- | ------------------------------------------ | --------------------------------------------------------------------------------- |
| [image] | Line[{p1, p2, …}]                          | the orientation follows the points in the order they are given from p1 to p2 etc. |
| [image] | HalfLine[{p1, p2}] 	HalfLine[p, v]         | the orientation is from p1 to p2 or in the v direction                            |
| [image] | InfiniteLine[{p1, p2}] 	InfiniteLine[p, v] | the orientation is from p1 to p2 or in the v direction                            |
| [image] | Circle[p, r]                               | the orientation is counterclockwise                                               |

* Special curves in $\mathbb{R}^3$ with their assumed tangent orientations include:

|         |                                            |                                                                                   |
| ------- | ------------------------------------------ | --------------------------------------------------------------------------------- |
| [image] | Line[{p1, p2, …}]                          | the orientation follows the points in the order they are given from p1 to p2 etc. |
| [image] | HalfLine[{p1, p2}] 	HalfLine[p, v]         | the orientation is from p1 to p2 or in the v direction                            |
| [image] | InfiniteLine[{p1, p2}] 	InfiniteLine[p, v] | the orientation is from p1 to p2 or in the v direction                            |

* Special curves in $\mathbb{R}^n$ with their assumed tangent orientations include:

|         |                                            |                                                                |
| ------- | ------------------------------------------ | -------------------------------------------------------------- |
| [image] | Line[{p1, p2, …}]                          | the orientation follows the points in the order they are given |
| [image] | HalfLine[{p1, p2}] 	HalfLine[p, v]         | the orientation is from p1 to p2 the orientation is given by v |
| [image] | InfiniteLine[{p1, p2}] 	InfiniteLine[p, v] | the orientation is from p1 to p2 the orientation is given by v |

* The coordinates along the ``curve`` can be specified using ``VectorSymbol``.  »

* The following options can be given:

|                   |                  |                                             |
| ----------------- | ---------------- | ------------------------------------------- |
| AccuracyGoal      | Infinity         | digits of absolute accuracy sought          |
| MaxPoints         | Automatic        | maximum total number of sample points       |
| MaxRecursion      | Automatic        | maximum number of recursive subdivisions    |
| Method            | Automatic        | method to use                               |
| MinRecursion      | 0                | minimum number of recursive subdivisions    |
| PrecisionGoal     | Automatic        | digits of precision sought                  |
| WorkingPrecision  | MachinePrecision | the precision used in internal computations |

---

## Examples (82)

### Basic Examples (7)

Line integral of a scalar field over a circle:

```wl
In[1]:= NLineIntegrate[2x, {x, y}∈Circle[{0, 0}, 1, {0, Pi / 2}]]

Out[1]= 2.
```

---

Line integral of a vector field over a line segment:

```wl
In[1]:= NLineIntegrate[{x * y, x - y}, {x, y}∈Line[{{0, 0}, {1, 1}}]]

Out[1]= 0.333333
```

---

Line integral of a vector field over a space curve:

```wl
In[1]:= NLineIntegrate[{x ^ 2 y z, 3x y, y ^ 2}, {x, y, z}∈ParametricRegion[{Cos[t], Sin[t], t}, {{t, 0, Pi / 2}}]]

Out[1]= 1.63119
```

---

Line integral of a scalar field in two dimensions:

```wl
In[1]:= f = y ^ 2;
```

Curve over which to integrate:

```wl
In[2]:= reg = ParametricRegion[{{t ^ (5 / 2), t}, 0 <= t <= 2}, {t}];
```

A contour plot of $f$ and the curve:

```wl
In[3]:= Show[ContourPlot[f, {x, 0, 8}, {y, 0, 2}], ...]

Out[3]= [image]
```

The line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 12.9142
```

---

Line integral of a vector field in two dimensions:

```wl
In[1]:= f = {x + 2y, x ^ 2};

In[2]:= reg = Line[{{0, 0}, {2, 3 / 2}, {3, 0}}];
```

The vector field and the integration path:

```wl
In[3]:= VectorPlot[f, {x, 0, 3}, {y, 0, 2}, ...]

Out[3]= [image]
```

The line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 1.5
```

---

Line integral of a vector field in three dimensions:

```wl
In[1]:= f = {z ^ 3, x ^ 3, y ^ 3};

In[2]:= reg = Line[{{1, 1 / 2, 0}, {3, 2, 2}}];

In[3]:= Show[VectorPlot3D[f, {x, 0, 4}, {y, 0, 2}, {z, 0, 2}, Rule[...]], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= 24.3125
```

---

Use ``VectorSymbol`` :

```wl
In[1]:= NLineIntegrate[VectorSymbol["x"].VectorSymbol["x"], VectorSymbol["x"]∈Line[{{0, 0}, {0, 1}}]]

Out[1]= 0.333333
```

Use implicit vector notation:

```wl
In[2]:= NLineIntegrate[x, x∈Line[{{0, 0}, {0, 1}}]]

Out[2]= 0.5
```

### Scope (33)

#### Basic Uses (4)

Line integral of a scalar field:

```wl
In[1]:= f = Exp[x];

In[2]:= NLineIntegrate[f, {x, y}∈Line[{{0, 0}, {2, 3}}]]

Out[2]= 11.518
```

---

Line integral of a vector field in three dimensions:

```wl
In[1]:= f = {x, x - y, z x ^ 2};

In[2]:= NLineIntegrate[f, {x, y, z}∈ParametricRegion[{Sin[t], t, 2t}, {{t, 0, Pi}}]]

Out[2]= 6.9348
```

---

``LineIntegrate`` works with many special curves:

```wl
In[1]:= f = {x ^ 2 y, x};

In[2]:= NLineIntegrate[f, {x, y}∈Annulus[{0, 0}, {1, 2}, {0, Pi / 4}]]//Quiet

Out[2]= -1.23202
```

---

Line integral over a parametric curve:

```wl
In[1]:= f = {Log[x], y};

In[2]:= reg = ParametricRegion[{2t + 1, t ^ 2}, {{t, 0, 1}}];

In[3]:= NLineIntegrate[f, {x, y}∈reg]

Out[3]= 1.79584
```

#### Scalar Functions (11)

Line integral of a scalar field over a curve:

```wl
In[1]:= f = 2Abs[x - y] ^ (3 / 4);

In[2]:= reg = ParametricRegion[{t, t ^ (3 / 2)}, {{t, 0, 8}}];
```

Contour plot of $f$ and the curve:

```wl
In[3]:= Show[ContourPlot[f, {x, 0, 8}, {y, 0, 25}], ...]

Out[3]= [image]
```

Line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 181.377
```

---

Line integral of a scalar field over an arc of a circle:

```wl
In[1]:= f = 1 / (x + Sin[y] + 1) ^ 3;

In[2]:= reg = Circle[{0, 0}, 1, {0, Pi / 2}];

In[3]:= ContourPlot[f, {x, 0, 1}, {y, 0, 1}, Epilog -> reg, ImageSize -> Small]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 0.150608
```

---

Line integral of a scalar field over a parametric curve:

```wl
In[1]:= f = 1 / (x + 1) - y / 5;

In[2]:= reg = ParametricRegion[{3 / 2t ^ 2, 4t}, {{t, -1, 1}}];
```

Contour plot of the function and the curve:

```wl
In[3]:= Show[ContourPlot[f, {x, -1 / 2, 2}, {y, -4, 4}], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 6.17595
```

---

Line integral of a scalar field over a circle:

```wl
In[1]:= f = Sin[1 / (x ^ 3 + y + 1)];

In[2]:= reg = Circle[{2, 3}, 3];

In[3]:= ContourPlot[f, {x, -1, 5}, {y, 0, 6}, Epilog -> reg, ImageSize -> Small]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 3.00069
```

---

Line integral of a scalar field over a space curve:

```wl
In[1]:= f = x + y - z;

In[2]:= reg = ParametricRegion[{t ^ 3 / 3, Sqrt[2]t ^ 2 / 2, t}, {{t, 0, 1}}];
```

Line integral:

```wl
In[3]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[3]= -0.233987
```

---

Line integral of a scalar field over the boundary of an annulus:

```wl
In[1]:= f = 1 / Exp[x + y + 5];

In[2]:= reg = Annulus[{0, 0}, {1, 2}, {0, 3 / 4Pi}];
```

Contour plot of the function and the curve:

```wl
In[3]:= ContourPlot[f, {x, -2, 4}, {y, -1, 5}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 0.0206253
```

---

Line integral of a scalar field over a closed polygon:

```wl
In[1]:= f = Exp[Cos[Abs[x / 2 - y]]];

In[2]:= reg = Line[{{0, 0}, {1, 2}, {0, 1}, {0, 0}}];
```

Contour plot of the function and the curve:

```wl
In[3]:= ContourPlot[f, {x, 0, 1}, {y, 0, 2}, Epilog -> reg, AspectRatio -> Automatic]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 8.80999
```

---

Line integral of a scalar field over an elliptical path:

```wl
In[1]:= f = 2 x y;

In[2]:= reg = Circle[{0, 0}, {1, 1 / Sqrt[2]}];
```

Contour plot of the function and the curve:

```wl
In[3]:= ContourPlot[f, {x, -1, 1}, {y, -1, 1}, Epilog -> reg, ImageSize -> Small]

Out[3]= [image]
```

Line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg]//Quiet

Out[4]= -5.551115123125783`*^-17
```

---

Line integral of a scalar field over a parametric curve:

```wl
In[1]:= f = x / 2 + Sin[y] ^ 2;

In[2]:= reg = ParametricRegion[{6Cos[t] - Cos[6t], 6Sin[t] - Sin[6t]}, {{t, 0, 2Pi}}];

In[3]:= Show[ContourPlot[f, {x, -10, 10}, {y, -10, 10}], RegionPlot[reg, BoundaryStyle -> Red], ImageSize -> Small]

Out[3]= [image]
```

Line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg, MaxRecursion -> 20]

Out[4]= 21.1214
```

---

Line integral of a scalar field over a circle:

```wl
In[1]:= f = ArcTan[(y / x) ^ 2];

In[2]:= reg = Circle[{0, 0}, 4];
```

Contour plot of $f$ and the curve:

```wl
In[3]:= ContourPlot[f, {x, -4, 4}, {y, -4, 4}, Epilog -> reg, ImageSize -> Small]

Out[3]= [image]
```

Line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 19.7392
```

---

Line integral of a scalar field over the boundary of a sector of a disk:

```wl
In[1]:= f = Cos[x - y];

In[2]:= reg = Disk[{0, 0}, 3, {0, 3Pi / 4}];
```

Contour plot of $f$ and the curve:

```wl
In[3]:= ContourPlot[f, {x, -3, 3}, {y, -1, 5}, ...]

Out[3]= [image]
```

Line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= -2.27712
```

#### Vector Functions (12)

Line integral of a vector field in three dimensions over a parametrized curve:

```wl
In[1]:= f = {2x, x, 1};

In[2]:= reg = ParametricRegion[{Sin[t], Cos[t], t}, {{t, 0, 2Pi}}];
```

Visualization of the vector field and the curve:

```wl
In[3]:= Show[VectorPlot3D[f, {x, -1, 1}, {y, -1, 1}, {z, 0, 7}, ...], ...]

Out[3]= [image]
```

Line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= 3.14159
```

---

Line integral of a vector field over a curve in two dimensions:

```wl
In[1]:= f = {Sin[x], y};

In[2]:= reg = ParametricRegion[{t ^ 2, t ^ 3}, {{t, 0, 1}}];

In[3]:= Show[VectorPlot[f, {x, 0, 1}, {y, 0, 1}, Rule[...]], ...]

Out[3]= [image]
```

Line integral:

```wl
In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 0.959698
```

---

Line integral of a vector field over a circular arc:

```wl
In[1]:= f = {x * (x ^ 2 + y ^ 2), y * (x ^ 2 + y ^ 2)};

In[2]:= reg = Circle[{0, 0}, 1, {0, Pi / 2}];

In[3]:= VectorPlot[f, {x, 0, 1}, {y, 0, 1}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]//Quiet

Out[4]= 0.
```

---

Line integral of a vector field over a line segment:

```wl
In[1]:= f = {Sqrt[x ^ 2 + y ^ 2], Sqrt[Abs[x + y]]};

In[2]:= reg = Line[{{0, 0}, {2, 2}, {4, 0}}];

In[3]:= VectorPlot[f, {x, -1, 5}, {y, -1, 3}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 7.98799
```

---

Line integral of a vector field over a parametrized curve in three dimensions:

```wl
In[1]:= f = {x, x ^ 2 y ^ 2, 0};

In[2]:= reg = ParametricRegion[{Cos[t] ^ 2, Cos[t]Sin[t], Sqrt[Cos[t](1 - Cos[t])]}, {{t, 0, 2Pi}}];

In[3]:= Show[VectorPlot3D[f, {x, -1, 1}, {y, -1, 1}, {z, 0, 1}, Rule[...]], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= 0.0981748
```

---

Line integral of a vector field over a curve:

```wl
In[1]:= f = {x + y, y + z, z + x};

In[2]:= reg = ParametricRegion[{Sin[t] ^ 2 / Sqrt[2] + Cos[t] ^ 2, (1 - 1 / Sqrt[2])Cos[t]Sin[t], Sin[t] / Sqrt[2]}, {{t, 0, 2Pi}}];

In[3]:= Show[VectorPlot3D[f, {x, 0, 1}, {y, -1, 1}, {z, -1, 1}, ...], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= -0.134753
```

---

Line integral of a vector field over an elliptical arc:

```wl
In[1]:= f = {x, Sin[x y ^ 2]};

In[2]:= reg = Circle[{0, 0}, {2, 1}, {0, Pi}];

In[3]:= VectorPlot[f, {x, -2, 2}, {y, -1 / 2, 3 / 2}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 0.737448
```

---

Line integral of a vector field over a parametric curve:

```wl
In[1]:= f = {x ^ 2, x ^ 2, Exp[y ^ 2 / 4]};

In[2]:= reg = ParametricRegion[{(2 + Cos[3t])Cos[t], (2 + Cos[3t])Sin[t], Sin[3t]}, {{t, 0, 2Pi}}];

In[3]:= Show[VectorPlot3D[f, {x, -3, 3}, {y, -3, 3}, {z, -1, 1}, ...], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= 12.6203
```

---

Line integral of a vector field over a parametric curve in three dimensions:

```wl
In[1]:= f = {(y - 1) ^ 2z, x ^ 2y, 2x y};

In[2]:= reg = ParametricRegion[{Cos[t], Sin[t] / 2, Sin[t] / 2}, {{t, 0, Pi}}];

In[3]:= Show[VectorPlot3D[f, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Rule[...]], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= 0.0673397
```

---

Line integral of a vector field over a parametrized curve:

```wl
In[1]:= f = {x ^ 2, 1 / 3, z ^ 2};

In[2]:= reg = ParametricRegion[{2 / (1 + t ^ 2), 3t, 2t / (1 + t ^ 2)}, {{t, -10, 10}}];

In[3]:= Show[VectorPlot3D[f, {x, 0, 2}, {y, -30, 30}, {z, -1, 1}, ...], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= 20.0052
```

---

Line integral of a vector field over an elliptical path:

```wl
In[1]:= f = {Sin[x ^ 4 y ^ 2], Sin[y]};

In[2]:= reg = Circle[{0, 1}, {Sqrt[2], 1}];

In[3]:= VectorPlot[f, {x, -2, 2}, {y, 0, 2}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 0.250465
```

---

Line integral of a vector field in higher dimensions:

```wl
In[1]:= f = {x y, x ^ 2t z, y t, z t};

In[2]:= NLineIntegrate[f, {x, y, z, t}∈Line[{{0, 0, 0, 0}, {1, 2, 3, 4}}]]

Out[2]= 29.4667
```

#### Special Curves (4)

Line integral over a circular arc:

```wl
In[1]:= f = Sqrt[x] * Abs[y] ^ (3 / 4);

In[2]:= reg = Circle[{0, 0}, 4, {-Pi / 2, Pi / 2}];

In[3]:= ContourPlot[f, {x, 0, 4}, {y, -4, 4}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 33.6993
```

---

Line integral of a vector field over the boundary of a circular sector of radius 1:

```wl
In[1]:= f = {Exp[Sin[3y]], y + x ^ 2};

In[2]:= reg = Disk[{0, 0}, 1, {0, Pi / 2}];

In[3]:= VectorPlot[f, {x, 0, 1}, {y, 0, 1}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= -0.117371
```

---

Line integral over a polygon:

```wl
In[1]:= f = {1 / (x + 2y) ^ 2, -1 / (x + y)};

In[2]:= reg = Line[{{1, 0}, {0, 1}, {-1, 0}, {0, -1}, {1, 0}}];

In[3]:= VectorPlot[f, {x, -1, 1}, {y, -1, 1}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]//Quiet

Out[4]= -3.38629
```

---

Line integral over the boundary of an annulus:

```wl
In[1]:= f = {-2y, x};

In[2]:= reg = Annulus[{0, 0}, {1, 2}, {0, Pi / 4}];

In[3]:= VectorPlot[f, {x, 0, 2}, {y, 0, 2}, ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg, AccuracyGoal -> 5]

Out[4]= 3.53429
```

#### Parametric Curves (2)

Line integral of a vector field over a spiral in three dimensions:

```wl
In[1]:= f = {y - z, z - x, x - y};

In[2]:= reg = ParametricRegion[{ Cos[t], Sin[t], t}, {{t, 0, 2Pi}}];

In[3]:= Show[VectorPlot3D[f, {x, -1, 1}, {y, -1, 1}, {z, 0, 2Pi}, ...], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= -12.5664
```

---

Line integral of a scalar field over a parametric curve:

```wl
In[1]:= NLineIntegrate[Exp[-x], {x, y}∈ParametricRegion[{2t, 3t}, {{t, 0, Infinity}}]]

Out[1]= 1.80278
```

### Options (8)

#### AccuracyGoal (1)

The option ``AccuracyGoal`` sets the number of digits of accuracy:

```wl
In[1]:= exact = LineIntegrate[{1, x ^ 2}, {x, y}∈Circle[]]

Out[1]= 0

In[2]:= NLineIntegrate[{1, x ^ 2}, {x, y}∈Circle[], AccuracyGoal -> 15] - exact

Out[2]= -7.355227538141662`*^-16
```

The result with default settings only sets a ``PrecisionGoal`` :

```wl
In[3]:= NLineIntegrate[{1, x ^ 2}, {x, y}∈Circle[]] - exact
```

NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in \[FormalT]\$239468 near {\[FormalT]\$239468} = {2.88379}. NIntegrate obtained -7.66748\*10^-16 and 6.36385740047725\`\*^-16 for the integral and error estimates.

```wl
Out[3]= -7.667477763817487`*^-16
```

#### MaxPoints (1)

The option ``MaxPoints`` stops the integration after a specified number of points has been evaluated:

```wl
In[1]:= NLineIntegrate[1 / Sqrt[x ^ 4 + y ^ 4], {x, y}∈Circle[], MaxPoints -> 10]
```

NIntegrate::maxp: The integral failed to converge after 33 integrand evaluations. NIntegrate obtained 7.416018317455614\` and 0.11469735508611181\` for the integral and error estimates.

```wl
Out[1]= 7.41602
```

With default options:

```wl
In[2]:= NLineIntegrate[1 / Sqrt[x ^ 4 + y ^ 4], {x, y}∈Circle[]]

Out[2]= 7.4163
```

#### MaxRecursion (1)

The option ``MaxRecursion`` specifies the maximum number of recursive steps:

```wl
In[1]:= reg = ParametricRegion[{Sin[t], 1}, {{t, 0, Pi}}];

In[2]:= NLineIntegrate[{1 / Sqrt[x], x}, {x, y}∈reg]
```

NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in t near {t} = {3.14159265358978716777886064424740007652546292834661175678162559066}. NIntegrate obtained 2.2125866659672422\`\*^-8 and 1.0493182805081925\`\*^-9 for the integral and error estimates.

```wl
Out[2]= 2.2125866659672422`*^-8
```

Increasing the number of recursions:

```wl
In[3]:= NLineIntegrate[{1 / Sqrt[x], x}, {x, y}∈reg, MaxRecursion -> 20]

Out[3]= 2.2132751187776273`*^-8
```

The exact result is:

```wl
In[4]:= LineIntegrate[{1 / Sqrt[x], x}, {x, y}∈reg]

Out[4]= 0
```

#### Method (1)

The option ``Method`` can take the same values as in ``NIntegrate``. For example:

```wl
In[1]:= NLineIntegrate[{-Sin[y] ^ 3, x ^ 2}, {x, y}∈Circle[], Method -> "TrapezoidalRule", WorkingPrecision -> 15]

Out[1]= 1.54109696443417

In[2]:= NLineIntegrate[{-Sin[y] ^ 3, x ^ 2}, {x, y}∈Circle[], Method -> "NewtonCotesRule", WorkingPrecision -> 15]

Out[2]= 1.54109696015561

In[3]:= NLineIntegrate[{-Sin[y] ^ 3, x ^ 2}, {x, y}∈Circle[], Method -> "ClenshawCurtisRule", WorkingPrecision -> 15]

Out[3]= 1.54109696438290
```

With the default option:

```wl
In[4]:= NLineIntegrate[{-Sin[y] ^ 3, x ^ 2}, {x, y}∈Circle[], WorkingPrecision -> 15]

Out[4]= 1.54109696445681
```

Compare to the truncated exact result:

```wl
In[5]:= LineIntegrate[{-Sin[y] ^ 3, x ^ 2}, {x, y}∈Circle[]]

Out[5]= (1/2) π (3 BesselJ[1, 1] - BesselJ[1, 3])

In[6]:= %//N[#, 15]&

Out[6]= 1.54109696445681
```

#### MinRecursion (1)

The option ``MinRecursion`` forces a minimum number of subdivisions:

```wl
In[1]:= NLineIntegrate[Exp[-100(x ^ 2 + y ^ 2)], {x, y}∈Line[{{-60, -60}, {60, 60}}]]
```

NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in \[FormalT] near {\[FormalT]} = {0.499984}. NIntegrate obtained 0.08862269273656814\` and 0.00006253563251259912\` for the integral and error estimates.

```wl
Out[1]= 0.0886227

In[2]:= NLineIntegrate[Exp[-100(x ^ 2 + y ^ 2)], {x, y}∈Line[{{-60, -60}, {60, 60}}], MinRecursion -> 5]

Out[2]= 0.177245
```

Compare to the exact result:

```wl
In[3]:= LineIntegrate[Exp[-100(x ^ 2 + y ^ 2)], {x, y}∈Line[{{-60, -60}, {60, 60}}]]

Out[3]= (1/10) Sqrt[π] Erf[600 Sqrt[2]]

In[4]:= N[%]

Out[4]= 0.177245
```

#### PrecisionGoal (1)

The option ``PrecisionGoal`` sets the relative tolerance in the integration:

```wl
In[1]:= exact = LineIntegrate[{Exp[-y ^ 2], Sin[x]}, {x, y}∈Circle[{0, 0}, {1, 2}]]

Out[1]= 4 π BesselJ[1, 1]

In[2]:= NLineIntegrate[{Exp[-y ^ 2], Sin[x]}, {x, y}∈Circle[{0, 0}, {1, 2}], PrecisionGoal -> 20, MaxRecursion -> 20, WorkingPrecision -> 20] - exact

Out[2]= 0``19.257287532566455
```

With default settings:

```wl
In[3]:= NLineIntegrate[{Exp[-y ^ 2], Sin[x]}, {x, y}∈Circle[{0, 0}, {1, 2}]] - exact

Out[3]= 4.440892098500626`*^-15
```

#### WorkingPrecision (2)

If a ``WorkingPrecision`` is specified, the computation is done at that working precision:

```wl
In[1]:= NLineIntegrate[1, {x, y}∈Circle[]]

Out[1]= 6.28319

In[2]:= NLineIntegrate[1, {x, y}∈Circle[], WorkingPrecision -> 16]

Out[2]= 6.283185307179586
```

---

The result has finite precision if the integrand has a finite precision:

```wl
In[1]:= NLineIntegrate[{-y, 0.567x}, {x, y}∈Line[{{0, 0}, {2, 4}}]]

Out[1]= -1.732
```

### Applications (27)

#### College Calculus (10)

Line integral of a function $f$ over a line segment:

```wl
In[1]:= f = Exp[x] y ^ 2 z ^ (3 / 2);

In[2]:= reg = Line[{{-1, 3, 1}, {1, 7, 3}}];

In[3]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[3]= 750.123
```

---

Line integral of a vector field over a curve:

```wl
In[1]:= f = {x Sin[y], y Cos[z], z Sin[x]};

In[2]:= reg = ParametricRegion[{Cos[t], Sin[t] ^ 2, -Cos[t]}, {{t, 0, Pi}}];

In[3]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[3]= -0.602337
```

---

Mass of a thin circular wire of radius 1 with linear density $\rho$ :

```wl
In[1]:= ρ = BesselJ[1, x ^ 2 / 2] * y ^ 2;

In[2]:= reg = Circle[{0, 0}, 1];

In[3]:= NLineIntegrate[ρ, {x, y}∈reg]

Out[3]= 0.194443
```

---

Work done by the force field $f$ on a particle that moves along a line segment:

```wl
In[1]:= f = {x - y ^ 3, y - z ^ 3, z - x ^ 3};

In[2]:= reg = Line[{{0, 0, 0}, {1, 2, 3}}];

In[3]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[3]= -9.25
```

---

Line integral of a vector field along a path:

```wl
In[1]:= f = {Cos[x], Sin[y]};

In[2]:= reg = Line[{{0, 0}, {3, 0}, {3, 3}, {0, 3}, {0, 0}}];

In[3]:= NLineIntegrate[f, {x, y}∈reg]

Out[3]= 4.440892098500626`*^-16
```

---

Line integral of a vector field along a curve:

```wl
In[1]:= f = {ArcTan[x ^ 2], y ^ 2};

In[2]:= reg = ParametricRegion[{t, t ^ 2}, {{t, 0, 1}}];

In[3]:= NLineIntegrate[f, {x, y}∈reg]

Out[3]= 0.631236
```

---

Work done by the force $f$ as a particle moves along the curve $\text{reg}$ :

```wl
In[1]:= f = {x ^ 2, y};

In[2]:= reg = ParametricRegion[{t - Sin[t], 1 - Cos[t]}, {{t, 0, 2Pi}}];

In[3]:= NLineIntegrate[f, {x, y}∈reg]

Out[3]= 82.6834
```

---

Line integral of a vector field along the unit circle centered at the origin:

```wl
In[1]:= f = {x + y, x ^ 2};

In[2]:= NLineIntegrate[f, {x, y}∈Circle[]]

Out[2]= -3.14159
```

---

Line integral of a vector field along a circle of radius 2 centered at the origin:

```wl
In[1]:= f = {x ^ 2 / (x ^ 2 + y ^ 2), (y ^ 2 - x ^ 2) / (x ^ 2 + y ^ 2)};

In[2]:= NLineIntegrate[f, {x, y}∈Circle[{0, 0}, 2]]//Quiet

Out[2]= 1.4988010832439613`*^-15
```

---

Numerical value of the line integral of a vector field over a path:

```wl
In[1]:= f = {Exp[Sin[x ^ 2]], Exp[Sqrt[x ^ 2 + y ^ 2]]};

In[2]:= reg = ParametricRegion[{Sin[t ^ 2], Cos[t] ^ 3}, {{t, 0, 2Pi}}];

In[3]:= NLineIntegrate[f, {x, y}∈reg, WorkingPrecision -> 16]

Out[3]= 1.602748156679319
```

#### Lengths (3)

Circumference of a circle:

```wl
In[1]:= NLineIntegrate[1, {x, y}∈Circle[]]

Out[1]= 6.28319
```

---

Perimeter of a cardioid using a line integral:

```wl
In[1]:= reg = ParametricRegion[{(2Cos[t] - Cos[2t]), (2Sin[t] - Sin[2t])}, {{t, 0, 2Pi}}];

In[2]:= RegionPlot[reg, ImageSize -> Small]

Out[2]= [image]

In[3]:= NLineIntegrate[1, {x, y}∈reg]

Out[3]= 16.
```

The length can also be calculated with ``RegionMeasure`` :

```wl
In[4]:= RegionMeasure[reg]

Out[4]= 16
```

---

Perimeter of an astroid:

```wl
In[1]:= reg = ParametricRegion[{Cos[t] ^ 3, Sin[t] ^ 3}, {{t, 0, 2Pi}}];

In[2]:= RegionPlot[reg, ImageSize -> Small]

Out[2]= [image]

In[3]:= NLineIntegrate[1, {x, y}∈reg]

Out[3]= 6.
```

#### Areas (5)

Area of an ellipse with semiaxes of length 2 and 3, calculated using a line integral:

```wl
In[1]:= NLineIntegrate[{-y / 2, x / 2}, {x, y}∈Circle[{0, 0}, {2, 3}]]

Out[1]= 18.8496
```

---

Area of the right-hand loop of the lemniscate $r^2=\cos (2 \phi )$ computed using a line integral:

```wl
In[1]:= f = {-y / 2, x / 2};

In[2]:= reg = ParametricRegion[{Sqrt[Cos[2ϕ]]Cos[ϕ], Sqrt[Cos[2ϕ]]Sin[ϕ]}, {{ϕ, -Pi / 4, Pi / 4}}];

In[3]:= Show[VectorPlot[f, {x, 0, 1}, {y, -1 / 2, 1 / 2}, ...], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y}∈reg]

Out[4]= 0.5
```

---

Area of the epicycloid of parameters $R=2$ and $r=1/2$ :

```wl
In[1]:= R = 2;

In[2]:= r = 1 / 2;

In[3]:= reg = ParametricRegion[{(R + r)Cos[t] - r Cos[(R + r) / r * t], (R + r)Sin[t] - r Sin[(R + r) / r * t]}, {{t, 0, 2Pi}}];

In[4]:= Show[VectorPlot[{-y / 2, x / 2}, {x, -3, 3}, {y, -3, 3}, ...], ...]

Out[4]= [image]

In[5]:= NLineIntegrate[{-y / 2, x / 2}, {x, y}∈reg]

Out[5]= 23.5619
```

---

Area of the cardioid using a line integral:

```wl
In[1]:= reg = ParametricRegion[{(2Cos[t] - Cos[2t]), (2Sin[t] - Sin[2t])}, {{t, 0, 2Pi}}];

In[2]:= RegionPlot[reg, ImageSize -> Small]

Out[2]= [image]

In[3]:= NLineIntegrate[{-y / 2, x / 2}, {x, y}∈reg]

Out[3]= 18.8496
```

---

Area of an astroid using a line integral:

```wl
In[1]:= reg = ParametricRegion[{Cos[t] ^ 3, Sin[t] ^ 3}, {{t, 0, 2Pi}}];

In[2]:= RegionPlot[reg, ImageSize -> Small]

Out[2]= [image]

In[3]:= NLineIntegrate[{-y / 2, x / 2}, {x, y}∈reg]

Out[3]= 1.1781
```

#### Work by a Force (4)

Work done by a force $f$ force as an object is moved on a straight line:

```wl
In[1]:= f = {0, 0, -1};

In[2]:= NLineIntegrate[f, {x, y, z}∈Line[{{0, 0, 0}, {1, 2, 3}}]]

Out[2]= -3.
```

---

Work done by the electric force as a charged particle of charge $q$ is moved from ``{1, 1, 0}`` to ``{2, 2, 0}`` in the electric field of a charged infinite wire of charge density $\lambda$ :

```wl
In[1]:= Subscript[ϵ, 0] = 8.854 * 10 ^ -12;

In[2]:= q = 10 ^ -6;

In[3]:= λ = 10 ^ -5;

In[4]:= f = {(λ * q * x/2Pi Subscript[ϵ, 0](x ^ 2 + y ^ 2)), (λ * q * y/2Pi Subscript[ϵ, 0](x ^ 2 + y ^ 2)), 0};

In[5]:= NLineIntegrate[f, {x, y, z}∈Line[{{1, 1, 0}, {2, 2, 0}}]]

Out[5]= 0.124597
```

---

Work done by an elastic force directed toward the origin as a quarter of an ellipse is traced:

```wl
In[1]:= f = {-2x, -2y};

In[2]:= reg = Circle[{0, 0}, {1, 2}, {0, Pi / 2}];

In[3]:= NLineIntegrate[f, {x, y}∈reg]

Out[3]= -3.
```

---

Work of the electric force as a charge $q$ is moved along the $x$ axis from $x_0$ to infinity in the electric field of a charge $Q$ :

```wl
In[1]:= Subscript[ϵ, 0] = 8.854 * 10 ^ -12;

In[2]:= Q = 2. * 10 ^ -5;

In[3]:= q = 10 ^ -5;

In[4]:= Subscript[x, 0] = 1;

In[5]:= f = {(Q * q * x/4π Subscript[ϵ, 0](x ^ 2 + y ^ 2 + z ^ 2) ^ (3 / 2)), (Q * q * y/4π Subscript[ϵ, 0](x ^ 2 + y ^ 2 + z ^ 2) ^ (3 / 2)), (Q * q * z/4π Subscript[ϵ, 0](x ^ 2 + y ^ 2 + z ^ 2) ^ (3 / 2))};

In[6]:= reg = ParametricRegion[{Subscript[x, 0] + t, 0, 0}, {{t, 0, Infinity}}];

In[7]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[7]= 1.79755
```

#### Centroids (2)

Mass of a closed semicircular wire of radius 2 and unit linear density:

```wl
In[1]:= reg = Disk[{0, 0}, 2, {0, Pi}];

In[2]:= m = NLineIntegrate[1, {x, y}∈reg]

Out[2]= 10.2832
```

$x$ coordinate of the center of mass:

```wl
In[3]:= (1 / m) * NLineIntegrate[x, {x, y}∈reg, AccuracyGoal -> 5]

Out[3]= 7.631588740349012`*^-17
```

$y$ coordinate of the center of mass:

```wl
In[4]:= (1 / m) * NLineIntegrate[y, {x, y}∈reg, AccuracyGoal -> 5]

Out[4]= 0.777969
```

---

Moments of inertia of a helix-shaped wire of unit linear density:

```wl
In[1]:= reg = ParametricRegion[{Cos[t], Sin[t], t / 10}, {{t, 0, 6Pi}}];

In[2]:= ParametricPlot3D[{Cos[t], Sin[t], t / 10}, {t, 0, 6Pi}, ImageSize -> Small]

Out[2]= [image]
```

About the $x$ axis:

```wl
In[3]:= NLineIntegrate[(y ^ 2 + z ^ 2), {x, y, z}∈reg]

Out[3]= 31.9076
```

About the $y$ axis:

```wl
In[4]:= NLineIntegrate[(x ^ 2 + z ^ 2), {x, y, z}∈reg]

Out[4]= 31.9076
```

About the $z$ axis:

```wl
In[5]:= NLineIntegrate[(x ^ 2 + y ^ 2), {x, y, z}∈reg]

Out[5]= 18.9436
```

#### Classical Theorems (3)

A vector field is *conservative* if its line integral depends only on the values at the endpoints, not on the path:

```wl
In[1]:= f = {3 x^2 y, x^3};
```

The field $f$ is the gradient of a scalar function $g$ :

```wl
In[2]:= g = x ^ 3 y;

In[3]:= f == Grad[g, {x, y}]

Out[3]= True
```

All gradients of scalar fields are conservative. For example, the line integral of $f$ over the curve is:

```wl
In[4]:= reg = ParametricRegion[{t ^ 2, Exp[t]}, {{t, 0, 1}}];

In[5]:= NLineIntegrate[f, {x, y}∈reg]

Out[5]= 2.71828
```

This is the same as the difference of the values of $g$ at the endpoints of the curve:

```wl
In[6]:= (g /. {x -> t ^ 2, y -> Exp[t]} /. t -> 1) - (g /. {x -> t ^ 2, y -> Exp[t]} /. t -> 0)//N

Out[6]= 2.71828
```

---

Green's theorem. The line integral of the vector field $f$ over a closed curve is:

```wl
In[1]:= f = {x ^ 4, x * y ^ 2 + 1};

In[2]:= NLineIntegrate[f, {x, y}∈Line[{{0, 0}, {1, 0}, {0, 1}, {0, 0}}]]

Out[2]= 0.0833333
```

This can be related to a surface integral of $g$ over the region enclosed by the curve, where $g$ is defined as:

```wl
In[3]:= g = D[f[[2]], x] - D[f[[1]], y];

In[4]:= NIntegrate[g, {x, y}∈Triangle[{{0, 0}, {1, 0}, {0, 1}}]]

Out[4]= 0.0833333
```

---

Stokes's theorem. The line integral of a vector field $f$ along a closed line in three dimensions is:

```wl
In[1]:= f = {-y + x y ^ 2, x, z};

In[2]:= reg = ParametricRegion[{Cos[t], Sin[t], 0}, {{t, 0, 2Pi}}];

In[3]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[3]= 6.28319
```

This is equal to the surface integral of the ``Curl`` of $f$ on any surface having the curve as its boundary:

```wl
In[4]:= reg2 = ParametricRegion[{Cos[t]Cos[p], Cos[t]Sin[p], Sin[t]}, {{p, 0, 2Pi}, {t, 0, Pi / 2}}];

In[5]:= NSurfaceIntegrate[Curl[f, {x, y, z}], {x, y, z}∈reg2]

Out[5]= 6.28319
```

The surface integral across a different surface with the same boundary is the same:

```wl
In[6]:= NSurfaceIntegrate[Curl[f, {x, y, z}], {x, y, z}∈ParametricRegion[{r Cos[t], r Sin[t], 0}, {{r, 0, 1}, {t, 0, 2Pi}}]]

Out[6]= 6.28319
```

### Properties & Relations (5)

Apply ``N[LineIntegrate[…]]`` to obtain a numerical solution if the symbolic calculation fails:

```wl
In[1]:= f = Sin[x + y + z];

In[2]:= reg = ParametricRegion[{t ^ 2, t ^ 3, t ^ 4}, {{t, 0, 1}}];

In[3]:= LineIntegrate[f, {x, y, z}∈reg]

Out[3]= LineIntegrate[Sin[x + y + z], {x, y, z}∈ParametricRegion[{{t^2, t^3, t^4}, 0 ≤ t ≤ 1}, {t}]]

In[4]:= N[LineIntegrate[f, {x, y, z}∈reg]]

Out[4]= 1.16617

In[5]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[5]= 1.16617
```

---

Find the center of mass of a triangular wire of unit linear density:

```wl
In[1]:= reg = Line[{{0, 0}, {1, 0}, {1, 1}, {0, 0}}];

In[2]:= RegionPlot[reg, ImageSize -> Small]

Out[2]= [image]
```

Find the total mass:

```wl
In[3]:= m = NLineIntegrate[1, {x, y}∈reg]

Out[3]= 3.41421
```

Find the $x$ component of the center of mass:

```wl
In[4]:= 1 / m * NLineIntegrate[x, {x, y}∈reg]

Out[4]= 0.646447
```

Find the $y$ component:

```wl
In[5]:= 1 / m * NLineIntegrate[y, {x, y}∈reg]//Quiet

Out[5]= 0.353553
```

The center of mass can also be obtained using ``RegionCentroid`` :

```wl
In[6]:= RegionCentroid[reg]//N

Out[6]= {0.646447, 0.353553}
```

---

Find the moment of inertia around the $z$ axis of a circular wire of unit linear density centered at the origin in the $x$ - $y$ plane:

```wl
In[1]:= reg = ParametricRegion[{Cos[t], Sin[t], 0}, {{t, 0, 2Pi}}];

In[2]:= NLineIntegrate[(x ^ 2 + y ^ 2), {x, y, z}∈reg]

Out[2]= 6.28319
```

The answer can also be computed with ``MomentOfInertia`` :

```wl
In[3]:= MomentOfInertia[reg, {0, 0, 0}, {0, 0, 1}]//N

Out[3]= 6.28319
```

---

Find the length of an epicycloid:

```wl
In[1]:= reg = ParametricRegion[{6 Cos[t] - Cos[6 t], 6 Sin[t] - Sin[6 t]}, {{t, 0, 2Pi}}];

In[2]:= RegionPlot[reg, ImageSize -> Small]

Out[2]= [image]

In[3]:= NLineIntegrate[1, {x, y}∈reg]//Quiet

Out[3]= 48.
```

The same answer can be obtained using ``ArcLength`` :

```wl
In[4]:= ArcLength[{6 Cos[t] - Cos[6 t], 6 Sin[t] - Sin[6 t]}, {t, 0, 2Pi}]

Out[4]= 48
```

---

Find the area of an ellipse:

```wl
In[1]:= reg = Circle[{0, 0}, {1 / Sqrt[2], 1 / Sqrt[3]}];

In[2]:= NLineIntegrate[{-y / 2, x / 2}, {x, y}∈reg]

Out[2]= 1.28255
```

The result can be obtained using ``RegionMeasure`` :

```wl
In[3]:= RegionMeasure[Disk[{0, 0}, {1 / Sqrt[2], 1 / Sqrt[3]}]]

Out[3]= (π/Sqrt[6])
```

### Neat Examples (2)

Length of a catenary:

```wl
In[1]:= reg = ParametricRegion[{t, Cosh[t]}, {{t, -1, 1}}];

In[2]:= ParametricPlot[{t, Cosh[t]}, {t, -1, 1}, ImageSize -> Small]

Out[2]= [image]

In[3]:= NLineIntegrate[1, {x, y}∈reg]

Out[3]= 2.3504
```

---

Integral of a vector field over a Clelia curve:

```wl
In[1]:= f = {x ^ 2 + y, y ^ 2 + z, z ^ 2 + x};

In[2]:= reg = ParametricRegion[{Cos[t]Cos[3t], Cos[t]Sin[3t], Sin[t]}, {{t, 0, 2Pi}}];

In[3]:= Show[VectorPlot3D[f, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Rule[...]], ...]

Out[3]= [image]

In[4]:= NLineIntegrate[f, {x, y, z}∈reg]

Out[4]= -4.71239
```

## See Also

* [`LineIntegrate`](https://reference.wolfram.com/language/ref/LineIntegrate.en.md)
* [`SurfaceIntegrate`](https://reference.wolfram.com/language/ref/SurfaceIntegrate.en.md)
* [`NSurfaceIntegrate`](https://reference.wolfram.com/language/ref/NSurfaceIntegrate.en.md)
* [`ContourIntegrate`](https://reference.wolfram.com/language/ref/ContourIntegrate.en.md)
* [`NContourIntegrate`](https://reference.wolfram.com/language/ref/NContourIntegrate.en.md)
* [`Integrate`](https://reference.wolfram.com/language/ref/Integrate.en.md)
* [`NIntegrate`](https://reference.wolfram.com/language/ref/NIntegrate.en.md)
* [`Region`](https://reference.wolfram.com/language/ref/Region.en.md)
* [`ParametricRegion`](https://reference.wolfram.com/language/ref/ParametricRegion.en.md)
* [`ArcLength`](https://reference.wolfram.com/language/ref/ArcLength.en.md)
* [`Grad`](https://reference.wolfram.com/language/ref/Grad.en.md)

## Related Guides

* [Vector Analysis](https://reference.wolfram.com/language/guide/VectorAnalysis.en.md)
* [Symbolic Vectors, Matrices and Arrays](https://reference.wolfram.com/language/guide/SymbolicArrays.en.md)

## History

* [Introduced in 2024 (14.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn140.en.md) \| [Updated in 2025 (14.2)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn142.en.md)