Tutorials › Calculus III › Scalar Line Integrals on Graphs x Equals h of y

Scalar Line Integrals · Tutorial 732 of 999

Scalar Line Integrals on Graphs x Equals h of y

Set up scalar line integrals on graphs \(x=h(y)\), derive the arc-length factor, and handle increasing or decreasing \(y\)-traversals correctly.

Intermediate 10 min read

What You'll Learn

  • Parameterize a graph \(x=h(y)\) using \(y\) as the parameter
  • Derive the arc-length factor from the graph’s velocity
  • Set up scalar line integrals using \(dy\) and sorted endpoint bounds
  • Convert a downward traversal without introducing a false negative sign
  • Check a graph-based integral against a direct parameter calculation

Setting Up Integrals on Graphs \(x=h(y)\)

A curve can be represented as \(y=g(x)\) when \(x\) is a convenient parameter. But some curves are more naturally described by giving \(x\) as a function of \(y\). For example, a vertical curve may be easy to express as \(x=h(y)\) even when it cannot be written simply as \(y=g(x)\).

For a scalar field \(f(x,y)\), the scalar line integral along a curve measures the field along the curve, weighted by the small increments of arc length. When the curve is a graph \(x=h(y)\), the arc-length element is expressed in terms of \(dy\). The main details to handle correctly are the square-root factor and the bounds, especially if the curve is traversed while \(y\) decreases.

Key formula: If \(h\) is continuously differentiable on \([a,b]\), the graph \(x=h(y)\), \(a\le y\le b\), has scalar line integral $$ \int_C f\,ds = \int_a^b f\bigl(h(y),y\bigr)\sqrt{1+\bigl(h'(y)\bigr)^2}\,dy. $$ The bounds \(a\) and \(b\) here are the lower and upper \(y\)-values, respectively.

Why the Arc-Length Factor Has This Form

Parameterize the graph by letting \(y\) itself be the parameter. The position on the curve is

$$ \mathbf{r}(y)=\bigl(h(y),y\bigr),\qquad a\le y\le b. $$

The velocity with respect to \(y\) is \(\mathbf{r}'(y)=\bigl(h'(y),1\bigr)\). Its magnitude measures the distance along the curve per unit change in \(y\). Since the arc-length element is speed times parameter increment, the result follows directly.

$$ \left\lVert \mathbf{r}'(y)\right\rVert = \sqrt{\bigl(h'(y)\bigr)^2+1^2} = \sqrt{1+\bigl(h'(y)\bigr)^2}, \qquad ds=\sqrt{1+\bigl(h'(y)\bigr)^2}\,dy. $$

Along the graph, the field is evaluated at the point \(\bigl(h(y),y\bigr)\). Multiplying that value by the arc-length element gives the integral formula. For a continuous field \(f\) and a continuously differentiable \(h\), this setup gives an ordinary definite integral on \([a,b]\).

Derivation: By definition, a scalar line integral along a parametrized curve \(\mathbf{r}(t)\) is the integral of the field value times the speed, \(\int f(\mathbf{r}(t))\lVert\mathbf{r}'(t)\rVert\,dt\). Taking \(t=y\), substituting \(\mathbf{r}(y)=\bigl(h(y),y\bigr)\), and using \(\lVert\mathbf{r}'(y)\rVert=\sqrt{1+(h'(y))^2}\) yields the graph formula.

Worked Example: An Increasing Graph

Worked Example: A Linear Graph Traversed Upward

Compute \(\int_C f\,ds\) for \(x=2y\), \(0\le y\le1\), with \(f(x,y)=x+2\).

Here \(h(y)=2y\), so \(h'(y)=2\), and the arc-length factor is

$$ \sqrt{1+\bigl(h'(y)\bigr)^2} = \sqrt{1+2^2} = \sqrt{5}. $$

On the graph, the field becomes \(f(2y,y)=2y+2\). Therefore,

$$ \begin{aligned} \int_C f\,ds &=\int_0^1 (2y+2)\sqrt{5}\,dy\\ &=\sqrt{5}\int_0^1(2y+2)\,dy\\ &=\sqrt{5}\left[y^2+2y\right]_0^1\\ &=\sqrt{5}\bigl((1+2)-(0+0)\bigr)\\ &=3\sqrt{5}. \end{aligned} $$

Check the antiderivative: \(\frac{d}{dy}(y^2+2y)=2y+2\), the integrand after factoring out \(\sqrt{5}\). Substitution of the endpoints gives \(3\sqrt{5}\), as above. Since \(f\) is positive on this graph segment, the integral is positive.

When the Curve Is Traversed Downward

The graph formula is naturally written with \(y\) increasing from the lower endpoint to the upper endpoint. A traversal in the opposite direction does not make the scalar line integral negative: the arc-length element measures distance and is nonnegative. If a parameter \(t\) increases while \(y\) decreases, the speed includes the absolute rate of change \(|dy/dt|\).

For a downward traversal from \(y=b\) to \(y=a\), where \(a<b\), one may calculate directly in an increasing parameter \(t\), or use the equivalent graph integral with bounds \(a\) to \(b\). If writing the change of variable with \(y\) running from \(b\) down to \(a\), account for the minus sign in \(dy\). Do not treat \(ds\) as a signed differential.

For a downward traversal: The scalar line integral has the same value as for the upward traversal of the same graph segment. In the graph formula, integrate over the interval from the smaller \(y\)-value to the larger one: $$ \int_C f\,ds = \int_a^b f\bigl(h(y),y\bigr)\sqrt{1+\bigl(h'(y)\bigr)^2}\,dy, \qquad a<b. $$

Worked Example: A Downward Traversal

Worked Example: Keeping the Arc-Length Contribution Positive

The curve \(x=2y+1\) is traversed from \((3,1)\) to \((-1,-1)\), so \(y\) decreases from \(1\) to \(-1\). Let \(f(x,y)=y+3\). Compute the scalar line integral.

First use a parameter that increases along the stated traversal: set \(y=1-t\) for \(0\le t\le2\). Then

$$ x=2(1-t)+1=3-2t, \qquad \mathbf{r}(t)=(3-2t,1-t), \qquad \mathbf{r}'(t)=(-2,-1). $$

The speed is \(\sqrt{(-2)^2+(-1)^2}=\sqrt{5}\), and the field along the curve is \(f(\mathbf{r}(t))=(1-t)+3=4-t\). Thus

$$ \begin{aligned} \int_C f\,ds &=\int_0^2(4-t)\sqrt{5}\,dt\\ &=\sqrt{5}\left[4t-\frac{t^2}{2}\right]_0^2\\ &=\sqrt{5}\bigl((8-2)-0\bigr)\\ &=6\sqrt{5}. \end{aligned} $$

For a graph-based check, \(h(y)=2y+1\), \(h'(y)=2\), and \(f(h(y),y)=y+3\). The sorted bounds are \(-1\) to \(1\), so

$$ \begin{aligned} \int_C f\,ds &=\sqrt{5}\int_{-1}^{1}(y+3)\,dy\\ &=\sqrt{5}\left[\frac{y^2}{2}+3y\right]_{-1}^{1}\\ &=\sqrt{5}\left(\left(\frac12+3\right)-\left(\frac12-3\right)\right)\\ &=6\sqrt{5}. \end{aligned} $$

The two calculations agree. The graph check uses the lower \(y\)-value first, even though the actual traversal goes downward.

Worked Example: A Curved Graph

Worked Example: Using the Slope of a Nonlinear Graph

Compute the scalar line integral for \(x=\frac{y^2}{2}\), \(-1\le y\le2\), with \(f(x,y)=\frac{1}{\sqrt{1+y^2}}\).

Here \(h(y)=\frac{y^2}{2}\), so \(h'(y)=y\). Therefore,

$$ ds=\sqrt{1+y^2}\,dy. $$

The field depends only on \(y\), so its value along the graph remains \(1/\sqrt{1+y^2}\). The two factors cancel:

$$ \begin{aligned} \int_C f\,ds &=\int_{-1}^{2} \frac{1}{\sqrt{1+y^2}}\sqrt{1+y^2}\,dy\\ &=\int_{-1}^{2}1\,dy\\ &=[y]_{-1}^{2}\\ &=2-(-1)\\ &=3. \end{aligned} $$

Check the evaluation: the derivative of the antiderivative \(y\) is \(1\), and its endpoint difference is \(2-(-1)=3\). Here \(f\) and the arc-length factor are both positive, consistent with the positive value.

A Common Bounds Mistake

A frequent error is to use the downward endpoint order in an ordinary \(dy\)-integral while leaving out the sign change associated with the decreasing parameter. In the previous example, the integrand in the graph formula is \(F(y)=\sqrt{5}(y+3)\). The incorrect calculation

$$ \int_{1}^{-1}\sqrt{5}(y+3)\,dy=-6\sqrt{5} $$

is not the scalar line integral. It is a signed integral with reversed bounds and does not account for the fact that arc length is positive. The correction is to use sorted bounds, giving \(\int_{-1}^{1}\sqrt{5}(y+3)\,dy=6\sqrt{5}\), or to use the increasing parameter \(t\) as in the worked example. In general, a scalar line integral need not be nonnegative if the field can be negative; the error is introducing a negative sign solely because the curve is traversed downward.

A Reliable Setup

For a graph \(x=h(y)\), first identify the full \(y\)-interval covered by the curve. Differentiate \(h\), form the speed factor, and substitute \(x=h(y)\) into the scalar field. Then integrate over the \(y\)-interval. If the curve is traversed downward, remember that direction does not reverse the sign of a scalar line integral.

1
Record the graph and interval.
Write \(x=h(y)\) and identify the lower and upper \(y\)-values \(a\) and \(b\).
2
Find the arc-length factor.
Compute \(h'(y)\) and then \(\sqrt{1+(h'(y))^2}\).
3
Evaluate the field on the graph.
Replace \(x\) by \(h(y)\) in \(f(x,y)\).
4
Integrate using the \(y\)-interval.
Set up the ordinary integral from \(a\) to \(b\), even if the curve is traversed from \(b\) down to \(a\).

A useful check is to parameterize the curve independently and compare the speed and field value with the graph setup. Both calculations should produce the same scalar line integral; the integral is nonnegative when \(f\ge0\) along the curve.

Check Your Understanding

Use the graph formula, and pay particular attention to the role of the \(y\)-bounds.

  1. For \(x=3y-2\), find the arc-length factor in terms of \(dy\).
  2. Set up, but do not evaluate, the scalar line integral for \(x=y^2\), \(0\le y\le1\), with \(f(x,y)=x+y\).
  3. A graph segment is traversed from \(y=4\) to \(y=1\). Which bounds should be used in the graph formula, and why?
  4. Explain why integrating a positive graph integrand from the larger \(y\)-value to the smaller one gives the wrong scalar line integral if no other sign adjustment is made.
  5. Can a scalar line integral be negative? State a condition that guarantees it is nonnegative.