Line Integral Calculator

Compute either \( \int_C f\,ds \) (scalar) or \( \int_C \mathbf F\cdot d\mathbf r \) (vector) along a parametric curve \( \mathbf r(t)=(x(t),y(t)) \), \(t\in[a,b]\).

Choose the type; fields below adapt to your choice.
Parametric x-component of \( \mathbf r(t) \). Use t as the variable.
Parametric y-component of \( \mathbf r(t) \). Use t as the variable.
Start value of parameter \(t\).
End value of parameter \(t\) (must satisfy \(b>a\)).
Only for \( \int_C f\,ds \). Will be evaluated at \( (x(t),y(t)) \).

Helping notes

\( \text{Scalar line integral: } \displaystyle \int_C f\,ds=\int_a^b f(\mathbf r(t))\,\lVert \mathbf r'(t)\rVert\,dt,\ \mathbf r(t)=(x(t),y(t)). \)

\( \text{Vector line integral: } \displaystyle \int_C \mathbf F\cdot d\mathbf r=\int_a^b \big[P(x(t),y(t))\,x'(t)+Q(x(t),y(t))\,y'(t)\big]\,dt. \)

\( \text{Required fields: } x(t),\,y(t),\,a,\,b,\ \text{and either } f(x,y)\text{ (scalar) or } P,Q \text{ (vector).} \)


Equation Preview

Your formula preview will render here…

Results

Integral value

Computation details

First few samples

Curve (shape) preview

What is a Line Integral Calculator?

A Line Integral Calculator computes integrals taken along a curve rather than across an interval. It supports two principal modes: scalar line integrals of the form \(\int_C f\,ds\), which accumulate a scalar field along arc length, and vector line integrals (work integrals) \(\int_C \mathbf{F}\cdot d\mathbf{r}\), which measure the work done by a vector field along a path. The curve \(C\) is described by a parameterization \(\mathbf{r}(t)\) for \(t\in[a,b]\). The calculator transforms the curve integral to an ordinary integral in \(t\), evaluates it symbolically when possible, or numerically with high precision otherwise. It also handles piecewise paths, orientation (direction) of travel, and can detect conservative fields to simplify results via a potential function.

About the Line Integral Calculator

For scalar fields \(f\), the line integral multiplies the field value at the midpoint of an infinitesimal arc by the element of arc length \(ds\). Under a parameterization \(\mathbf{r}(t)\), the arc element is \(ds=\|\mathbf{r}'(t)\|\,dt\), yielding \(\int_a^b f(\mathbf{r}(t))\|\mathbf{r}'(t)\|\,dt\). For vector fields \(\mathbf{F}\), the work integral projects \(\mathbf{F}\) onto the tangent direction, using \(d\mathbf{r}=\mathbf{r}'(t)\,dt\), giving \(\int_a^b \mathbf{F}(\mathbf{r}(t))\cdot \mathbf{r}'(t)\,dt\). If \(\mathbf{F}=\nabla \phi\) is conservative on a simply connected domain, the integral depends only on endpoints and equals \(\phi(B)-\phi(A)\), independent of path. The tool checks these structures, warns about non-smooth parameterizations, and supports curves in \(\mathbb{R}^2\) and \(\mathbb{R}^3\).

How to Use this Line Integral Calculator

  1. Choose mode: Scalar (\(\int_C f\,ds\)) or Vector/Work (\(\int_C \mathbf{F}\cdot d\mathbf{r}\)).
  2. Enter the field: \(f(x,y[,\!z])\) or \(\mathbf{F}=\langle P,Q[,R]\rangle\).
  3. Provide the path parameterization \(\mathbf{r}(t)=(x(t),y(t)[,z(t)])\) and bounds \(t\in[a,b]\). Orientation follows increasing \(t\).
  4. Compute to obtain the transformed integral in \(t\), step-by-step derivation, and the final numeric/symbolic value.
  5. (Optional) For conservative fields, enable endpoint evaluation to return \(\phi(B)-\phi(A)\) when a potential exists.

Core Formulas (LaTeX)

Scalar line integral: \[ \int_C f\,ds = \int_a^b f(\mathbf{r}(t))\,\|\mathbf{r}'(t)\|\,dt,\quad \|\mathbf{r}'(t)\|=\sqrt{x'(t)^2+y'(t)^2[+z'(t)^2] }. \]

Vector line integral (work): \[ \int_C \mathbf{F}\cdot d\mathbf{r}=\int_a^b \mathbf{F}(\mathbf{r}(t))\cdot \mathbf{r}'(t)\,dt. \]

Orientation reversal: \[ \int_{C^{-1}} \mathbf{F}\cdot d\mathbf{r} = -\int_C \mathbf{F}\cdot d\mathbf{r}. \]

Conservative field shortcut: \[ \mathbf{F}=\nabla \phi \ \Rightarrow \ \int_C \mathbf{F}\cdot d\mathbf{r}=\phi(B)-\phi(A). \]

Examples (Illustrative)

Example 1 — Scalar integral along a line

\(f(x,y)=x\), \(C:\mathbf{r}(t)=(t,t),\ t\in[0,1]\). Then \(\|\mathbf{r}'\|=\sqrt{1^2+1^2}=\sqrt{2}\). \[ \int_C f\,ds=\int_0^1 t\cdot \sqrt{2}\,dt=\sqrt{2}\,\frac{t^2}{2}\Big|_0^1=\frac{\sqrt{2}}{2}. \]

Example 2 — Work around the unit circle

\(\mathbf{F}(x,y)=\langle y,x\rangle\), \(C:\mathbf{r}(t)=\langle\cos t,\sin t\rangle,\ t\in[0,2\pi]\). \(\mathbf{r}'=\langle-\sin t,\cos t\rangle\), \(\mathbf{F}(\mathbf{r})=\langle \sin t,\cos t\rangle\). \[ \int_C \mathbf{F}\cdot d\mathbf{r}=\int_0^{2\pi}(\sin t)(-\sin t)+(\cos t)(\cos t)\,dt =\int_0^{2\pi}\big(\cos^2 t-\sin^2 t\big)\,dt=\int_0^{2\pi}\cos(2t)\,dt=0. \]

Example 3 — Conservative field shortcut

\(\mathbf{F}=\langle 2xy,\ x^2\rangle=\nabla(x^2y)\). From \(A=(0,0)\) to \(B=(1,1)\) along any path: \[ \int_C \mathbf{F}\cdot d\mathbf{r}=\phi(B)-\phi(A)=(1^2\cdot1)-0=1. \]

FAQs

What is the difference between scalar and vector line integrals?

Scalar integrals accumulate \(f\,ds\); vector integrals measure work \(\mathbf{F}\cdot d\mathbf{r}\) along the path.

How do I choose a parameterization?

Use any smooth \(\mathbf{r}(t)\) that traces the curve once with \(t\) increasing; results are parameterization-invariant.

Does orientation matter?

Yes for work integrals: reversing direction flips the sign; scalar \(\int f\,ds\) is orientation-independent.

Can the calculator handle 3D curves?

Yes. Provide \(\mathbf{r}(t)=(x(t),y(t),z(t))\) and fields in \(\mathbb{R}^3\).

When can I use a potential function?

If \(\mathbf{F}\) is conservative (\(\mathbf{F}=\nabla \phi\)) on a simply connected domain; then the integral depends only on endpoints.

What if the path is piecewise?

Split \(C=\cup C_i\) and sum \(\int_{C_i}\); the result is additive over segments.

More Math & Algebra Calculators