Tutorials › Calculus I › Piecewise-Linear Rate Graphs And Trapezoid Areas

Accumulation Functions · Tutorial 1035 of 1495

Piecewise-Linear Rate Graphs And Trapezoid Areas

Use signed trapezoid areas to calculate accumulated values from piecewise-linear rate graphs, with careful splitting at corners and sign changes.

Intermediate 9 min read

What You'll Learn

  • Identify the intervals where a piecewise-linear rate has a constant slope.
  • Calculate signed trapezoid contributions from endpoint rates and interval widths.
  • Find and split at zero crossings within linear segments.
  • Combine positive and negative contributions to find an accumulated value.
  • Check calculations using units and an independent whole-segment calculation.

Reading a Rate Graph as Accumulation

A rate graph shows how quickly a quantity changes over time or another input variable. If \(r(t)\) is the rate and \(A(x)\) is the accumulated quantity up to \(x\), then the change in accumulation from \(a\) to \(b\) is the definite integral of the rate over that interval. When the rate graph consists of straight-line segments, that change can be calculated with signed trapezoid areas.

The word signed matters. A portion of the graph above the horizontal axis contributes positively to the accumulation; a portion below it contributes negatively. Adding the ordinary geometric areas of all regions, without regard to their signs, generally gives a different quantity.

Definition: If the rate is \(r(t)\), the accumulated change from \(a\) to \(b\) is \(\int_a^b r(t)\,dt\). If the accumulation at \(a\) is \(A(a)\), then \(A(b)=A(a)+\int_a^b r(t)\,dt\). Positive rate contributes positively, and negative rate contributes negatively.

On a piecewise-linear graph, the rate is linear between consecutive vertices. To calculate an accumulated change reliably, divide the interval at every vertex where the slope changes and at every point where the rate crosses zero. Each resulting piece is a trapezoid or triangle whose signed contribution can be calculated directly.

The Signed Trapezoid Formula

Suppose the rate changes linearly from \(r(a)=r_0\) to \(r(b)=r_1\), with \(a<b\), and there is no change of slope inside this interval. The signed contribution of this segment is

$$ \int_a^b r(t)\,dt = \frac{r_0+r_1}{2}(b-a). $$

This is the trapezoid formula: average the two endpoint rates, then multiply by the interval width. The formula gives a signed area. If both endpoint rates are positive, the contribution is positive; if both are negative, it is negative. If the endpoint rates have opposite signs, the formula gives the net of the positive and negative regions. In practice, split at the zero crossing to see and calculate those contributions separately.

Units: If \(t\) is measured in seconds and \(r(t)\) in metres per second, then \(r(t)\,dt\) and every signed area are measured in metres. A rate multiplied by an interval width has units of accumulated quantity.

Why the Formula Works

When the rate stays on one side of zero, the region between a straight-line graph and the horizontal axis is a trapezoid. Its parallel sides have lengths \(|r_0|\) and \(|r_1|\), and its width is \(b-a\). The geometric area is therefore \(\frac{|r_0|+|r_1|}{2}(b-a)\). Giving it a positive sign above the axis and a negative sign below it yields the signed formula.

The same endpoint formula remains valid when the line crosses zero, but then the graph encloses a positive triangle and a negative triangle. To verify the formula in that case, write the endpoint rates as \(p\) and \(-q\), where \(p,q>0\), and let the full width be \(L\). Because the segment is linear, its zero occurs a fraction \(p/(p+q)\) of the way across. The positive triangle has area \(Lp^2/[2(p+q)]\), and the negative triangle has signed area \(-Lq^2/[2(p+q)]\). Their sum is

$$ \frac{Lp^2}{2(p+q)}-\frac{Lq^2}{2(p+q)} = \frac{L(p^2-q^2)}{2(p+q)} = \frac{L(p-q)}{2} = \frac{L\bigl(p+(-q)\bigr)}{2}. $$

This is exactly the endpoint-average formula for rates \(p\) and \(-q\). Splitting at the zero is still useful: it makes each sign visible and helps prevent accidentally counting a negative contribution as positive.

A Reliable Calculation Process

1
Mark the interval endpoints.
Record the rate values at the start and end of the interval whose accumulated change is required.
2
Find all necessary split points.
Split at every vertex where the slope changes and at every zero crossing that lies inside a segment.
3
Calculate each signed piece.
Use the trapezoid formula on a linear piece, or use triangle areas when a zero crossing separates two triangles.
4
Combine the contributions.
Add positive and negative signed areas, then add the net change to the known starting accumulation if one is given.
5
Check the result.
Confirm the signs, arithmetic, and units. When convenient, compare with the endpoint formula on each whole linear segment.

Worked Examples

Worked Example: Accumulation Across a Change of Slope

A rate graph has vertices \((0,2)\), \((3,8)\), and \((5,0)\), where each ordered pair gives an input and its rate. If \(A(0)=4\), find \(A(5)\).

The slope changes at \(t=3\), so calculate the two linear segments separately. On \(0\leq t\leq 3\), the endpoint rates are \(2\) and \(8\), and the width is \(3-0=3\). Thus the signed contribution is

$$ \frac{2+8}{2}(3)=\frac{10}{2}(3)=5\cdot 3=15. $$

On \(3\leq t\leq 5\), the endpoint rates are \(8\) and \(0\), and the width is \(5-3=2\). The contribution is

$$ \frac{8+0}{2}(2)=\frac{8}{2}(2)=4\cdot 2=8. $$

Both segments are on or above the horizontal axis, so both contributions are positive. The total accumulated change is \(15+8=23\), and therefore

$$ A(5)=A(0)+23=4+23=27. $$

Check: The first trapezoid has parallel sides \(2\) and \(8\) and width \(3\), giving area \(15\). The second has sides \(8\) and \(0\) and width \(2\), giving area \(8\). Their sum is \(23\), so adding the initial value \(4\) gives \(27\), as required.

Worked Example: A Positive and a Negative Contribution

A rate graph has vertices \((1,6)\), \((4,0)\), and \((7,-3)\). If \(A(1)=2\), find \(A(7)\).

The graph changes slope at \(t=4\), which is also where the rate changes sign. On \(1\leq t\leq 4\), the rates are \(6\) and \(0\), and the width is \(3\). This is a positive triangle, with contribution

$$ \frac{6+0}{2}(4-1)=3\cdot 3=9. $$

On \(4\leq t\leq 7\), the rates are \(0\) and \(-3\), and the width is \(3\). This is below the axis, so its signed contribution is negative:

$$ \frac{0+(-3)}{2}(7-4) = \frac{-3}{2}\cdot 3 = -\frac{9}{2}. $$

The net change is \(9-\frac{9}{2}=\frac{18}{2}-\frac{9}{2}=\frac{9}{2}\). Hence

$$ A(7)=2+\frac{9}{2} =\frac{4}{2}+\frac{9}{2} =\frac{13}{2}. $$

Check: The positive triangle has base \(3\) and height \(6\), so its area is \(\frac12(3)(6)=9\). The negative triangle has base \(3\) and height \(3\), so its signed area is \(-\frac12(3)(3)=-\frac92\). Their net is \(\frac92\); adding \(A(1)=2\) gives \(\frac{13}{2}\).

Worked Example: Splitting at Interior Zero Crossings

A piecewise-linear rate graph passes through \((0,-2)\), \((2,2)\), \((5,5)\), and \((7,-1)\). If \(A(0)=0\), find \(A(7)\). The graph changes slope at \(t=2\) and \(t=5\); there are also zero crossings inside two of its segments.

On the segment from \(t=0\) to \(t=2\), the rate goes linearly from \(-2\) to \(2\), so it crosses zero halfway, at \(t=1\). From \(0\) to \(1\), the negative triangle has contribution \(-\frac12(1)(2)=-1\). From \(1\) to \(2\), the positive triangle has contribution \(\frac12(1)(2)=1\). Together these contribute \(-1+1=0\).

From \(t=2\) to \(t=5\), the rate stays positive, rising from \(2\) to \(5\). The trapezoid contribution is

$$ \frac{2+5}{2}(5-2)=\frac{7}{2}\cdot 3=\frac{21}{2}. $$

On the final segment, the rate falls linearly from \(5\) at \(t=5\) to \(-1\) at \(t=7\). The rate drops by \(6\) over \(2\) units, or \(3\) rate units per input unit. It takes \(5/3\) input units to fall from \(5\) to zero, so the crossing is at \(5+\frac53=\frac{20}{3}\). The positive triangle contributes

$$ \frac12\left(\frac53\right)(5)=\frac{25}{6}. $$

The remaining width is \(7-\frac{20}{3}=\frac13\). The negative triangle contributes

$$ -\frac12\left(\frac13\right)(1)=-\frac16. $$

The final segment therefore contributes \(\frac{25}{6}-\frac16=\frac{24}{6}=4\). Combining all pieces gives

$$ A(7)=0+(-1+1)+\frac{21}{2}+4 =\frac{21}{2}+\frac{8}{2} =\frac{29}{2}. $$

Check: Applying the endpoint formula to the whole first linear segment gives \(\frac{-2+2}{2}(2)=0\), matching its two triangles. The second segment contributes \(\frac{21}{2}\), and the last contributes \(\frac{5+(-1)}{2}(2)=4\). Thus the total is \(0+\frac{21}{2}+4=\frac{29}{2}\), in agreement with the split calculation.

Common Pitfall: Treating Every Region as Positive

A frequent error is to calculate the geometric area of every region and add all those areas. For the graph in the second example, that incorrect method gives \(9+\frac92=\frac{27}{2}\) as the accumulated change. But the second triangle lies below the axis: its contribution is \(-\frac92\), not \(+\frac92\). The correct net change is

$$ 9-\frac92=\frac92. $$

Then the starting accumulation must still be included: \(A(7)=2+\frac92=\frac{13}{2}\). A useful habit is to write a sign beside every piece before adding any areas.

What to Keep in Mind

For piecewise-linear rate graphs, accumulation is calculated from signed areas. First locate slope changes and sign changes; then calculate each trapezoid or triangle, keeping contributions below the horizontal axis negative. Combine the signed values to obtain the net change, and add that change to the known starting accumulation. The endpoint trapezoid formula is a quick check on each linear segment, while explicit zero-crossing splits help make the signs clear.

Check Your Understanding

For each question, keep track of both the interval width and the sign of each contribution.

  1. A rate is linear from \(3\) to \(9\) over an interval of width \(4\). What is the signed trapezoid contribution?
  2. A rate is linear from \(-4\) to \(0\) over an interval of width \(2\). What is its signed contribution, and why is its sign negative?
  3. A rate graph has vertices \((0,2)\), \((2,0)\), and \((5,-3)\). Which input values should be used to split the graph when calculating signed areas from \(0\) to \(5\)?
  4. A positive region has area \(12\), and a region below the axis has geometric area \(5\). What is the net accumulated change across both regions?
  5. If the accumulated value at the start of an interval is \(7\), and the signed rate-area over that interval is \(-3\), what is the accumulated value at the end?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon