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

Scalar Line Integrals · Tutorial 731 of 999

Scalar Line Integrals on Graphs y Equals g of x

Convert scalar line integrals on graphs into ordinary integrals using the graph’s arc-length factor, then evaluate polynomial examples exactly.

Intermediate 9 min read

What You'll Learn

  • Parameterize a graph \(y=g(x)\) over a specified interval.
  • Derive the arc-length factor \(\sqrt{1+(g'(x))^2}\).
  • Set up scalar line integrals using the field evaluated along the graph.
  • Evaluate polynomial examples with exact substitutions.
  • Identify errors caused by omitting or miscomputing the arc-length factor.

From a Graph to an Ordinary Integral

A curve given by \(y=g(x)\) can look like a familiar graph, but integrating a scalar field along that curve is not usually the same as integrating the field with respect to \(x\). The curve has its own length: moving a small amount horizontally also moves vertically whenever \(g'(x)\) is nonzero. The line integral must account for this extra distance.

This tutorial develops a direct formula for a graph over an interval \([a,b]\). The method is to substitute the graph into the scalar field and multiply by the graph’s arc-length factor. The resulting expression is an ordinary single-variable integral.

Key formula: If \(g\) is continuously differentiable on \([a,b]\), and \(f\) is a continuous scalar field along the graph, then the scalar line integral over the graph segment is $$ \int_C f\,ds = \int_a^b f(x,g(x))\sqrt{1+(g'(x))^2}\,dx. $$

Why the Arc-Length Factor Appears

Let the graph segment run from \(x=a\) to \(x=b\), where \(a<b\). A parameterization that follows the graph is \(\mathbf{r}(t)=(t,g(t))\) for \(a\leq t\leq b\). Its velocity is \(\mathbf{r}'(t)=(1,g'(t))\), so its speed is the length of that velocity vector.

$$ \|\mathbf{r}'(t)\| = \sqrt{1+(g'(t))^2}. $$

By the definition of a scalar line integral along a smooth parameterized curve, the field is evaluated at the curve point and multiplied by the speed. Thus \(f(\mathbf{r}(t))=f(t,g(t))\), and the speed supplies the factor \(\sqrt{1+(g'(t))^2}\). Renaming \(t\) as \(x\) gives the formula above.

Conditions for the formula: The graph is considered over a finite interval \([a,b]\); \(g\) is continuously differentiable there; and \(f(x,g(x))\) is continuous on that interval. Under these conditions the displayed ordinary integral exists. If the graph or field has a discontinuity, the integral requires separate treatment and the formula alone does not guarantee existence.

The factor has a geometric interpretation. Over a small horizontal change \(dx\), the graph changes vertically by approximately \(g'(x)\,dx\). The small length along the graph is therefore approximately $$ ds=\sqrt{(dx)^2+(g'(x)\,dx)^2} =\sqrt{1+(g'(x))^2}\,dx $$ when \(dx\) is taken positive along the interval. A steeper graph has more arc length per unit horizontal distance, which is why the factor is at least \(1\).

A Reliable Setup

For each graph integral, three actions make the setup clear: specify the interval, substitute \(y=g(x)\) into the field, and include the arc-length factor. Only after these steps should the resulting one-variable integral be simplified or evaluated.

1
Record the graph and interval.
Write \(y=g(x)\) for \(a\leq x\leq b\), with \(a<b\).
2
Differentiate the graph function.
Find \(g'(x)\), then form \(\sqrt{1+(g'(x))^2}\).
3
Restrict the field to the graph.
Replace \(y\) by \(g(x)\) in \(f(x,y)\), giving \(f(x,g(x))\).
4
Integrate and check.
Evaluate the resulting ordinary integral, then differentiate an antiderivative or verify any substitution and endpoint values.

Worked Polynomial Examples

Worked Example: A Quadratic Graph with a Convenient Substitution

Evaluate the scalar line integral of \(f(x,y)=2x\) along \(y=x^2\), for \(0\leq x\leq 1\).

Here \(g(x)=x^2\), so \(g'(x)=2x\). The field restricted to the graph remains \(2x\). Therefore, $$ \int_C f\,ds = \int_0^1 2x\sqrt{1+4x^2}\,dx. $$ Set \(u=1+4x^2\). Then \(du=8x\,dx\), so \(2x\,dx=\frac14\,du\). The endpoints become \(u=1\) at \(x=0\) and \(u=5\) at \(x=1\). Thus $$ \int_0^1 2x\sqrt{1+4x^2}\,dx = \frac14\int_1^5 u^{1/2}\,du = \frac14\left[\frac23u^{3/2}\right]_1^5 = \frac{5\sqrt5-1}{6}. $$ Check the antiderivative in the original variable: $$ \frac{d}{dx}\left(\frac{(1+4x^2)^{3/2}}{6}\right) = \frac16\cdot\frac32(1+4x^2)^{1/2}\cdot8x = 2x\sqrt{1+4x^2}. $$ It differentiates to the integrand, and its endpoint difference is \((5\sqrt5-1)/6\).

Worked Example: A Cubic Graph and a Matching Field

Evaluate the scalar line integral of \(f(x,y)=3x^3\) along \(y=x^3\), for \(0\leq x\leq 1\).

For \(g(x)=x^3\), \(g'(x)=3x^2\), so the arc-length factor is \(\sqrt{1+9x^4}\). The field is already a function of \(x\), and hence $$ \int_C f\,ds = \int_0^1 3x^3\sqrt{1+9x^4}\,dx. $$ Let \(u=1+9x^4\). Then \(du=36x^3\,dx\), which means \(3x^3\,dx=\frac1{12}\,du\). The transformed endpoints are \(1\) and \(10\). Consequently, $$ \int_0^1 3x^3\sqrt{1+9x^4}\,dx = \frac1{12}\int_1^{10}u^{1/2}\,du = \frac1{12}\cdot\frac23\left(10^{3/2}-1\right) = \frac{10\sqrt{10}-1}{18}. $$ For a check, differentiate \(F(x)=\frac1{18}(1+9x^4)^{3/2}\): $$ F'(x) = \frac1{18}\cdot\frac32(1+9x^4)^{1/2}\cdot36x^3 = 3x^3\sqrt{1+9x^4}. $$ This is exactly the integrand, and \(F(1)-F(0)=(10\sqrt{10}-1)/18\).

Worked Example: A Constant Field on a Curved Graph

Evaluate the integral of the constant scalar field \(f(x,y)=1\) along \(y=x^2\), for \(0\leq x\leq 1\).

The graph derivative is \(2x\), so $$ \int_C 1\,ds = \int_0^1\sqrt{1+4x^2}\,dx. $$ An antiderivative is $$ F(x)=\frac{x}{2}\sqrt{1+4x^2}+\frac14\ln\left(2x+\sqrt{1+4x^2}\right). $$ To check, differentiating the first term gives $$ \frac12\sqrt{1+4x^2}+\frac{2x^2}{\sqrt{1+4x^2}}, $$ and differentiating the logarithmic term gives \(1/(2\sqrt{1+4x^2})\). Combining these terms over the common denominator \(\sqrt{1+4x^2}\) gives \(\sqrt{1+4x^2}\), as required. Evaluating at the endpoints yields $$ F(1)-F(0) = \frac{\sqrt5}{2}+\frac14\ln(2+\sqrt5). $$ The field equals \(1\), but the answer is greater than \(1\): the graph segment has more length than its horizontal interval.

Polynomial Data Do Not Guarantee a Polynomial Integral

In the examples, the graph functions and fields are polynomials, but the arc-length factor contains a square root. The ordinary integrand therefore need not be a polynomial, and it need not have a simple polynomial antiderivative. For instance, the constant field on \(y=x^2\) produces \(\sqrt{1+4x^2}\), not a polynomial. The method still gives the correct setup; the remaining one-variable integral may require a substitution or a logarithmic expression.

When a substitution is used, its differential and transformed bounds must agree. In the first example, \(u=1+4x^2\) increases from \(1\) to \(5\). Keeping the original bounds \(0\) and \(1\) after changing to \(u\) would mix variables and produce an invalid integral. Either transform the bounds, as shown, or convert the antiderivative back to \(x\) before evaluating.

A Common Mistake: Integrating with Respect to Horizontal Distance

A frequent error is to replace \(ds\) by \(dx\), as though every small horizontal step had the same length as the corresponding piece of the curve. For the constant field on \(y=x^2\) from \(0\) to \(1\), this mistaken calculation gives $$ \int_0^1 1\,dx=1. $$ That is the length of the horizontal interval, not the length of the graph. Since \(g'(x)=2x\), the correct calculation is $$ \int_C 1\,ds = \int_0^1\sqrt{1+4x^2}\,dx = \frac{\sqrt5}{2}+\frac14\ln(2+\sqrt5). $$ The missing factor would only equal \(1\) everywhere if \(g'(x)=0\) throughout the interval, meaning the graph is horizontal. More generally, check that the square root contains \(1+(g'(x))^2\), not merely \(1+g'(x)\) and not just \(1\).

Why This Formula Is Useful

Many curves in applications are naturally described as graphs, and many scalar quantities are distributed along those curves. The formula converts a geometric integral into a familiar single-variable calculation while preserving the distance measured along the curve. It also separates two ingredients that should not be confused: the scalar field’s value at each point and the amount of curve length represented by each horizontal increment.

A useful quick check is that \(\sqrt{1+(g'(x))^2}\geq 1\). For a nonnegative field, the graph integral should therefore be at least as large as the integral of the restricted field with respect to \(x\), whenever that comparison is meaningful. If a calculation on a sloping graph produces a factor smaller than \(1\), revisit the derivative or the arc-length calculation.

Check Your Understanding

For each question, identify the graph, field restriction, and arc-length factor before evaluating.

  1. What is the arc-length factor for the graph \(y=4x^2\)?
  2. Set up, but do not evaluate, the scalar line integral of \(f(x,y)=x+y\) along \(y=x^3\), for \(0\leq x\leq 1\).
  3. For \(y=2x+1\), what constant arc-length factor appears when integrating with respect to \(x\)?
  4. Why is \(\int_a^b f(x,g(x))\,dx\) generally not the scalar line integral along the graph?
  5. In a substitution \(u=1+9x^4\) over \(0\leq x\leq1\), what are the transformed endpoints?