Tutorials › Calculus III › Scalar Line Integrals on Line Segments

Scalar Line Integrals · Tutorial 730 of 999

Scalar Line Integrals on Line Segments

Use an endpoint-based parametrization to turn scalar line integrals over straight segments into ordinary definite integrals.

Intermediate 9 min read

What You'll Learn

  • Parametrize a segment from its initial and terminal points.
  • Compute the constant speed and arc-length element for that parametrization.
  • Evaluate scalar line integrals of constant and coordinate-based functions.
  • Handle distance-based integrands using Euclidean distance along a segment.
  • Split an integral when an absolute value changes formula along the segment.
  • Check definite-integral calculations by differentiating their antiderivatives.

From Endpoints to a Parametrization

A line segment is one of the simplest curves to describe, but a scalar line integral along it still requires careful attention to two ingredients: the value of the scalar field at each point of the segment and the amount of arc length associated with that point. A parametrization makes both ingredients explicit.

Let the segment run from a point \(\mathbf{A}\) to a point \(\mathbf{B}\) in \(\mathbb{R}^n\). The parameter \(t\) will run from \(0\) to \(1\). At \(t=0\) the parametrization is at \(\mathbf{A}\), and at \(t=1\) it is at \(\mathbf{B}\).

Definition: For distinct endpoints \(\mathbf{A},\mathbf{B}\in\mathbb{R}^n\), a standard parametrization of the line segment from \(\mathbf{A}\) to \(\mathbf{B}\) is $$ \mathbf{r}(t)=\mathbf{A}+t(\mathbf{B}-\mathbf{A}),\qquad 0\le t\le 1. $$ If \(f\) is a scalar field defined on the segment, its scalar line integral with respect to arc length is $$ \int_C f\,ds=\int_0^1 f(\mathbf{r}(t))\,\|\mathbf{r}'(t)\|\,dt. $$

Here \(\|\cdot\|\) is the Euclidean norm. In two dimensions, if \(\mathbf{A}=(x_0,y_0)\) and \(\mathbf{B}=(x_1,y_1)\), then \(\mathbf{r}(t)=(x_0+t(x_1-x_0),\,y_0+t(y_1-y_0))\). In three dimensions, the same interpolation is applied to all three coordinates.

Why the Formula Works

The parametrization linearly interpolates between the endpoints. Its derivative is the fixed displacement vector from \(\mathbf{A}\) to \(\mathbf{B}\), so the speed is constant. The arc-length element is therefore a constant multiple of \(dt\).

$$ \mathbf{r}'(t)=\mathbf{B}-\mathbf{A}, \qquad \|\mathbf{r}'(t)\|=\|\mathbf{B}-\mathbf{A}\|=L, \qquad ds=L\,dt, $$

where \(L\) is the length of the segment. Substituting into the definition of a scalar line integral gives a useful direct formula.

Result: If \(L=\|\mathbf{B}-\mathbf{A}\|\), then for the segment parametrized from \(\mathbf{A}\) to \(\mathbf{B}\), $$ \int_C f\,ds = L\int_0^1 f\bigl(\mathbf{A}+t(\mathbf{B}-\mathbf{A})\bigr)\,dt. $$ The formula applies when \(f\) is defined along the segment and the resulting one-variable integrand is integrable on \([0,1]\).

The parameter interval is always of length \(1\), but that does not mean the segment has length \(1\). The factor \(L\) converts a small parameter change \(dt\) into the corresponding physical arc length \(ds\). Omitting it generally gives the wrong integral.

Worked Examples

Worked Example: A Constant Integrand

Evaluate \(\int_C 3\,ds\), where \(C\) is the segment from \(A=(1,2)\) to \(B=(4,6)\).

The displacement is \(B-A=(4-1,6-2)=(3,4)\), so the segment length is \(\sqrt{3^2+4^2}=5\). Its parametrization and speed are

$$ \mathbf{r}(t)=(1+3t,\,2+4t),\qquad \mathbf{r}'(t)=(3,4),\qquad \|\mathbf{r}'(t)\|=5. $$

The scalar field has value \(3\) everywhere on the segment. Thus

$$ \int_C 3\,ds =\int_0^1 3(5)\,dt =\int_0^1 15\,dt =15t\Big|_0^1 =15. $$

Check: differentiating the antiderivative \(15t\) gives \(15\), the integrand in the parameter integral. Evaluating it at the endpoints gives \(15(1)-15(0)=15\).

Worked Example: A Coordinate-Based Integrand

Evaluate \(\int_C (x+2y)\,ds\) on the segment from \(A=(1,2)\) to \(B=(4,6)\).

As above, \(\mathbf{r}(t)=(1+3t,2+4t)\) and the speed is \(5\). Substituting the coordinates into the scalar field gives

$$ x+2y=(1+3t)+2(2+4t) =1+3t+4+8t =5+11t. $$

Therefore the line integral is

$$ \begin{aligned} \int_C (x+2y)\,ds &=\int_0^1 (5+11t)(5)\,dt\\ &=\int_0^1 (25+55t)\,dt\\ &=\left(25t+\frac{55}{2}t^2\right)\Big|_0^1\\ &=25+\frac{55}{2} =\frac{105}{2}. \end{aligned} $$

Check: the derivative of \(25t+\frac{55}{2}t^2\) is \(25+55t\), as required. At \(t=1\) the field is \(4+2(6)=16\), consistent with the substituted expression \(5+11t\), which gives \(16\). At \(t=0\) it is \(1+2(2)=5\), also consistent.

Worked Example: Distance from an Endpoint

Let \(C\) be the segment from \(A=(0,0)\) to \(B=(3,4)\). Evaluate the integral of the distance from a point on \(C\) to \(A\) with respect to arc length.

The distance-based scalar field is \(f(x,y)=\sqrt{x^2+y^2}\). The segment has displacement \((3,4)\), length \(5\), and parametrization \(\mathbf{r}(t)=(3t,4t)\). Along the segment, the distance to \(A\) is

$$ f(\mathbf{r}(t)) =\sqrt{(3t)^2+(4t)^2} =\sqrt{9t^2+16t^2} =\sqrt{25t^2} =5t, $$

because \(0\le t\le1\), so \(t\ge0\). Since \(ds=5\,dt\),

$$ \int_C f\,ds =\int_0^1 (5t)(5)\,dt =\int_0^1 25t\,dt =\frac{25}{2}t^2\Big|_0^1 =\frac{25}{2}. $$

Check: the derivative of \(\frac{25}{2}t^2\) is \(25t\), the full parameter integrand. At the endpoint \(B\), the distance from \(A\) is \(5\), matching \(5t\) at \(t=1\); at \(A\), it is \(0\), matching \(5t\) at \(t=0\).

Worked Example: Distance from the Midpoint

Let \(C\) be the segment from \(A=(0,0)\) to \(B=(6,8)\), and let \(M=(3,4)\) be its midpoint. Evaluate the integral of the distance from a point on \(C\) to \(M\) with respect to arc length.

The displacement is \((6,8)\), so the length is \(\sqrt{36+64}=10\). Use \(\mathbf{r}(t)=(6t,8t)\), with speed \(10\). The distance to \(M\) along the segment is

$$ \begin{aligned} \|\mathbf{r}(t)-M\| &=\sqrt{(6t-3)^2+(8t-4)^2}\\ &=\sqrt{36(t-\tfrac12)^2+64(t-\tfrac12)^2}\\ &=10|t-\tfrac12|. \end{aligned} $$

The absolute value changes formula at \(t=\frac12\), so split the integral there:

$$ \begin{aligned} \int_C \|\mathbf{r}-M\|\,ds &=100\int_0^1 |t-\tfrac12|\,dt\\ &=100\left(\int_0^{1/2}(\tfrac12-t)\,dt +\int_{1/2}^1(t-\tfrac12)\,dt\right)\\ &=100\left(\left[\tfrac12t-\tfrac12t^2\right]_0^{1/2} +\left[\tfrac12t^2-\tfrac12t\right]_{1/2}^1\right)\\ &=100\left(\tfrac18+\tfrac18\right) =25. \end{aligned} $$

The factor \(100\) is the product of the \(10\) in the distance and the speed \(10\). Check: the derivatives of the two antiderivatives are \(\frac12-t\) and \(t-\frac12\), respectively, which are the correct integrands on their intervals. The distance is zero at \(t=\frac12\) and \(5\) at either endpoint; this agrees with \(10|t-\frac12|\).

A Reliable Calculation Procedure

For a scalar line integral over a line segment, organize the work so that the field substitution and the arc-length factor remain visible.

1
Record the endpoints.
Write the initial point \(\mathbf{A}\) and terminal point \(\mathbf{B}\), and calculate the displacement \(\mathbf{B}-\mathbf{A}\).
2
Parametrize the segment.
Use \(\mathbf{r}(t)=\mathbf{A}+t(\mathbf{B}-\mathbf{A})\) for \(0\le t\le1\).
3
Find the speed.
Differentiate \(\mathbf{r}(t)\), take its Euclidean norm, and keep the resulting factor in \(ds=\|\mathbf{r}'(t)\|dt\).
4
Substitute into the field.
Replace each coordinate in \(f\) by its expression in \(t\). For a distance field, calculate the distance from the parametrized point explicitly.
5
Integrate and check.
Evaluate the definite integral, splitting at any point where an absolute value changes formula. Check the antiderivative and endpoint values.

Common Pitfalls

A frequent error is to calculate \(f(\mathbf{r}(t))\) correctly but forget the speed. For example, on the segment from \((1,2)\) to \((4,6)\), the integrand \(3\) becomes \(3\), but the line integral is not \(\int_0^1 3\,dt=3\). The speed is \(5\), so the correct calculation is \(\int_0^1 3(5)\,dt=15\).

Another error is to treat \(\sqrt{25t^2}\) as \(5t\) without checking the parameter interval. That simplification is valid here because \(t\in[0,1]\), so \(t\ge0\). In general, \(\sqrt{t^2}=|t|\), not \(t\). Similarly, the midpoint-distance example requires splitting at \(t=\frac12\); using one signed expression for the absolute value over the entire interval would produce an incorrect result.

Key takeaway: A segment parametrization gives the field values along the segment, while its speed supplies the conversion from parameter change to arc length. Keep both factors in the integral.

Check Your Understanding

Use the endpoint parametrization and include the arc-length factor in each setup.

  1. What parametrization describes the segment from \((2,-1)\) to \((5,3)\), and what is its speed?
  2. For the segment from \((0,0)\) to \((2,1)\), set up, but do not evaluate, the integral of \(x+3y\) with respect to arc length.
  3. Why does the distance from the initial endpoint along a segment of length \(L\) equal \(Lt\) under the standard parametrization?
  4. For the segment from \((0,0)\) to \((4,0)\), where does the distance to its midpoint change its absolute-value formula in the parameter interval?
  5. What factor is missing if one integrates \(f(\mathbf{r}(t))\) with respect to \(dt\) instead of using the scalar line-integral formula?