# LineIntegrate

LineIntegrate[f,{x,y,}curve]

computes the scalar line integral of the function f[x,y,] over the curve.

LineIntegrate[{p,q,},{x,y,}curve]

computes the 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 function 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 as it moves 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 is given by:
• • where 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 curve.
• The vector line integral of the function F along a curve is given by:
• • where is projection of the vector function 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 over the curve.
• • For a parametric curve ParametricRegion[{r1[u],,rn[u]},], the tangent vector field is taken to be ur[u].
• Special curves in with their assumed tangent orientation include:
• Line[{p1,p2,…}] the orientation follows the points in the order they are given from p1 to p2 etc. HalfLine[{p1,p2}]HalfLine[p,v] the orientation is from p1 to p2 or in the v direction InfiniteLine[{p1,p2}]InfiniteLine[p,v] the orientation is from p1 to p2 or in the v direction Circle[p,r] the orientation is counterclockwise
• Special curves in with their assumed tangent orientation include:
• Line[{p1,p2,…}] the orientation follows the points in the order they are given from p1 to p2 etc. HalfLine[{p1,p2}]HalfLine[p,v] the orientation is from p1 to p2 or in the v direction InfiniteLine[{p1,p2}]InfiniteLine[p,v] the orientation is from p1 to p2 or in the v direction
• Special curves in with their assumed tangent orientation include:
• Line[{p1,p2,…}] the orientation follows the points in the order they are given HalfLine[{p1,p2}]HalfLine[p,v] the orientation is from p1 to p2 the orientation is given by v InfiniteLine[{p1,p2}]InfiniteLine[p,v] the orientation is from p1 to p2 the orientation is given by v
• The following options can be given:
•  AccuracyGoal Automatic digits of absolute accuracy sought Assumptions \$Assumptions assumptions to make about parameters Direction Automatic orientation of the curve GenerateConditions Automatic whether to generate answers that involve conditions on parameters GeneratedParameters None how to name generated parameters Method Automatic method to use PerformanceGoal \$PerformanceGoal aspects of performance to optimize PrecisionGoal Automatic digits of precision sought PrincipalValue False whether to find Cauchy principal values WorkingPrecision Automatic the precision used in internal computations
• LineIntegrate uses a combination of symbolic and numerical methods when the input involves inexact quantities.

# Examples

open allclose all

## Basic Examples(6)

Line integral of a scalar field over a circle:

Line integral of a vector field over a line segment:

Line integral of a vector field over a space curve:

Line integral of a scalar field in two dimensions:

Curve over which to integrate:

A contour plot of and the curve:

The line integral:

Line integral of a vector field in two dimensions:

The vector field and the integration path:

The line integral:

Line integral of a vector field in three dimensions:

## Scope(32)

### Basic Uses(4)

Line integral of a scalar field:

Line integral of a vector field in three dimensions:

LineIntegrate works with many special curves:

Line integral over a parametric curve:

### Scalar Functions(11)

Line integral of a scalar field over a curve:

Contour plot of and the curve:

Line integral:

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

Line integral of a scalar field over a parametric curve:

Contour plot of the function and the curve:

Line integral of a scalar field over a circle:

Line integral of a scalar field over a space curve:

Line integral:

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

Contour plot of the function and the curve:

Line integral of a scalar field over a closed polygon:

Contour plot of the function and the curve:

Line integral of a scalar field over an elliptical path:

Contour plot of the function and the curve:

Line integral:

Line integral of a scalar field over a parametric curve:

Line integral:

Line integral of a scalar field over a circle:

Contour plot of and the curve:

Line integral:

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

Contour plot of and the curve:

Line integral:

### Vector Functions(12)

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

Visualization of the vector field and the curve:

Line integral:

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

Line integral:

Line integral of a vector field over a circular arc:

Line integral of a vector field over a line segment:

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

Line integral of a vector field over a curve:

Line integral of a vector field over an elliptical arc:

Line integral of a vector field over a parametric curve:

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

Line integral of a vector field over a parametrized curve:

Line integral of a vector field over an elliptical path:

Line integral of a vector field in higher dimensions:

### Special Curves(4)

Line integral over a circular arc:

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

Line integral over a polygon:

Line integral over the boundary of an annulus:

### Parametric Curves(1)

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

## Options(4)

### Direction(1)

The default Direction for closed circular paths is counterclockwise:

The clockwise direction can be chosen using the option Direction:

### GenerateConditions(1)

LineIntegrate can work with symbolic parameters:

Suppress the conditions on the parameters:

### WorkingPrecision(2)

If a WorkingPrecision is specified, a numerical result is given:

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

## Applications(24)

### College Calculus(10)

Line integral of a function over a line segment:

Line integral of a vector field over a curve:

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

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

Line integral of a vector field along a path:

Line integral of a vector field along a curve:

Work done by the force as a particle moves along the curve :

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

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

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

### Lengths(3)

Circumference of a circle:

Perimeter of a cardioid using a line integral:

The length can also be calculated with RegionMeasure:

Perimeter of an astroid:

### Areas(5)

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

Area of the right-hand loop of the lemniscate computed using a line integral:

Area of the epicycloid of parameters and :

Area of the cardioid using a line integral:

Area of an astroid using a line integral:

### Work by a Force(4)

Work done by the gravitational force as an object is moved on a straight line:

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

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

Work of the electric force as a charge is moved along the axis from to infinity in the electric field of a charge :

### Centroids(2)

Mass of a closed semicircular wire of radius and linear density : coordinate of the center of mass: coordinate of the center of mass:

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

About the axis:

About the axis:

About the axis:

## Properties & Relations(5)

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

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

Find the total mass:

Find the component of the center of mass:

The center of mass can also be obtained using RegionCentroid:

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

The answer can also be computed with MomentOfInertia:

Find the length of an epicycloid:

The same answer can be obtained using ArcLength:

Find the area of an ellipse:

The result can be obtained using RegionMeasure:

## Neat Examples(2)

Length of a catenary:

Integral of a vector field over a Clelia curve: