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}. \]
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]\).
\( \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).} \)
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.
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\).
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). \]
\(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}. \]
\(\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. \]
\(\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. \]
Scalar integrals accumulate \(f\,ds\); vector integrals measure work \(\mathbf{F}\cdot d\mathbf{r}\) along the path.
Use any smooth \(\mathbf{r}(t)\) that traces the curve once with \(t\) increasing; results are parameterization-invariant.
Yes for work integrals: reversing direction flips the sign; scalar \(\int f\,ds\) is orientation-independent.
Yes. Provide \(\mathbf{r}(t)=(x(t),y(t),z(t))\) and fields in \(\mathbb{R}^3\).
If \(\mathbf{F}\) is conservative (\(\mathbf{F}=\nabla \phi\)) on a simply connected domain; then the integral depends only on endpoints.
Split \(C=\cup C_i\) and sum \(\int_{C_i}\); the result is additive over segments.