Tutorials › Calculus II › Work for Piecewise Force Laws

Work and Variable Forces · Tutorial 466 of 998

Work for Piecewise Force Laws

Calculate work for a force law defined in pieces by integrating each position interval separately and checking breakpoint continuity only when the model calls for it.

Intermediate 10 min read

What You'll Learn

  • Set up work as a position integral for a force that varies by intervals.
  • Split the integral at every breakpoint in a piecewise force law.
  • Add the signed work contributions from each interval.
  • Handle motion in the reverse direction by using reversed integration bounds.
  • Distinguish a required continuity check from an assumption that is not needed.
  • Identify and correct the error of applying one piece of a force law across the entire path.

Why Piecewise Force Laws Need Careful Integration

A force does not always follow one formula over an entire path. A mechanism may switch behavior when an object reaches a boundary, or a material may exert different forces in different regions. In such cases, the work still comes from integrating force with respect to position, but the integral must reflect every change in the force law.

The main practical rule is simple: divide the path wherever the formula changes, integrate each piece over the interval where it applies, and add the signed results. A jump in force at a breakpoint does not automatically make this calculation invalid. Whether the force must be continuous is a separate question about the model.

Key idea: If the force law changes formula at a position, split the work integral there. Check continuity at the breakpoint only if the physical model or stated assumptions require it.

Work Along a Line

Suppose an object moves along a straight line, with position measured by \(x\), and the force component in the direction of that line is \(F(x)\). For motion from position \(a\) to position \(b\), the work is the signed integral of the force over the displacement:

$$ W=\int_a^b F(x)\,dx. $$

If force is measured in newtons and position in metres, work is measured in newton-metres, or joules. A force component opposite the direction of motion contributes negative work. If the object moves from a larger position to a smaller one, the integration bounds are reversed, so the sign is handled by the integral.

For a piecewise force, let the path run from \(a\) to \(b\), with breakpoints \(c_1,\ldots,c_n\) lying between them. On each interval, the force is given by its own formula. The total work is the sum of the integrals over those intervals:

$$ W = \int_a^{c_1} F_1(x)\,dx + \int_{c_1}^{c_2} F_2(x)\,dx +\cdots+ \int_{c_n}^{b} F_{n+1}(x)\,dx. $$

Each formula must be integrated only over the interval on which it is defined. A breakpoint is a position where the applicable formula changes; it is not necessarily a position where the force is zero.

Why Splitting the Integral Works

The splitting rule follows from the additivity of definite integrals. If \(c\) lies between \(a\) and \(b\), then an integrable function satisfies \(\int_a^b F(x)\,dx=\int_a^c F(x)\,dx+\int_c^b F(x)\,dx\). This property lets us compute contributions over separate intervals and sum them without changing the total work.

Justification: A definite integral accumulates the signed contributions across its entire interval. Dividing that interval at a breakpoint divides the accumulation into two parts. Adding those parts recovers the accumulation over the full interval. Applying this argument at each breakpoint gives the piecewise work formula.

For this rule to apply, the force must be integrable on the path. In the common case of a force given by a continuous formula on each of finitely many intervals, with finite one-sided values at the breakpoints, the force is piecewise continuous and is integrable on the bounded path. The force may jump at a breakpoint without preventing the work integral from existing.

Worked Example: A Force That Jumps at a Breakpoint

Worked Example: A Force That Jumps at a Breakpoint

An object moves from \(x=0\,\text{m}\) to \(x=5\,\text{m}\). Its force law is

$$ F(x)= \begin{cases} (3\,\text{N/m})x, & 0\le x<2\,\text{m},\\ (2\,\text{N/m})x+1\,\text{N}, & 2\le x\le5\,\text{m}. \end{cases} $$

Find the work. The formula changes at \(x=2\,\text{m}\), so split the integral there:

$$ W = \int_0^{2\,\text{m}} (3\,\text{N/m})x\,dx + \int_{2\,\text{m}}^{5\,\text{m}} \bigl((2\,\text{N/m})x+1\,\text{N}\bigr)\,dx. $$

For the first interval, an antiderivative is \((3\,\text{N/m})x^2/2\). Thus

$$ \begin{aligned} W_1 &= \left[\frac{3\,\text{N/m}}{2}x^2\right]_0^{2\,\text{m}}\\ &= \frac{3\,\text{N/m}}{2}(2\,\text{m})^2 - \frac{3\,\text{N/m}}{2}(0\,\text{m})^2\\ &=6\,\text{J}. \end{aligned} $$

For the second interval, an antiderivative is \((1\,\text{N/m})x^2+ (1\,\text{N})x\):

$$ \begin{aligned} W_2 &= \left[(1\,\text{N/m})x^2+(1\,\text{N})x\right]_{2\,\text{m}}^{5\,\text{m}}\\ &= \bigl(25\,\text{J}+5\,\text{J}\bigr) - \bigl(4\,\text{J}+2\,\text{J}\bigr)\\ &=30\,\text{J}-6\,\text{J}=24\,\text{J}. \end{aligned} $$

Adding the interval contributions gives

$$ W=W_1+W_2=6\,\text{J}+24\,\text{J}=30\,\text{J}. $$

At the breakpoint, the first formula approaches \(6\,\text{N}\), while the second formula gives \(5\,\text{N}\). The force jumps by \(1\,\text{N}\). That does not invalidate the integral: this force law is integrable on the path. No continuity assumption was specified, so there is no reason to reject the model merely because of the jump.

Check: Differentiating the antiderivatives returns \(3x\,\text{N/m}\) on the first interval and \(2x\,\text{N/m}+1\,\text{N}\) on the second. The interval works, \(6\,\text{J}\) and \(24\,\text{J}\), sum to the reported total of \(30\,\text{J}\).

When Continuity Should Be Checked

Continuity is not a requirement for every piecewise force law. It is relevant when the model says that the force varies continuously, or when the formulas are intended to describe a continuous physical transition. For a breakpoint \(c\), continuity requires that the limiting force from the interval on the left equal the limiting force from the interval on the right, and that the force value at \(c\) agree with that common value.

When continuity is not required, a jump can be part of the model. When continuity is required, compare the formulas at each breakpoint before using the model. This check tests whether the stated formulas satisfy the model’s condition; it does not replace integrating each interval.

Worked Example: A Continuous Force Across a Breakpoint

An object moves from \(0\,\text{m}\) to \(6\,\text{m}\), and the model requires a continuous force. The force law is

$$ F(x)= \begin{cases} (2\,\text{N/m})x+1\,\text{N}, & 0\le x<3\,\text{m},\\ 13\,\text{N}-(2\,\text{N/m})x, & 3\le x\le6\,\text{m}. \end{cases} $$

First check the breakpoint \(x=3\,\text{m}\). The left-hand formula gives

$$ (2\,\text{N/m})(3\,\text{m})+1\,\text{N}=7\,\text{N}. $$

The right-hand formula gives

$$ 13\,\text{N}-(2\,\text{N/m})(3\,\text{m})=7\,\text{N}. $$

Both formulas agree, so the force is continuous at the breakpoint. Now split the work integral there:

$$ W = \int_0^{3\,\text{m}}\bigl((2\,\text{N/m})x+1\,\text{N}\bigr)\,dx + \int_{3\,\text{m}}^{6\,\text{m}}\bigl(13\,\text{N}-(2\,\text{N/m})x\bigr)\,dx. $$

The first antiderivative is \((1\,\text{N/m})x^2+(1\,\text{N})x\), so

$$ \begin{aligned} W_1 &= \left[(1\,\text{N/m})x^2+(1\,\text{N})x\right]_0^{3\,\text{m}}\\ &=(9\,\text{J}+3\,\text{J})-0\,\text{J}\\ &=12\,\text{J}. \end{aligned} $$

The second antiderivative is \((13\,\text{N})x-(1\,\text{N/m})x^2\). Therefore

$$ \begin{aligned} W_2 &= \left[(13\,\text{N})x-(1\,\text{N/m})x^2\right]_{3\,\text{m}}^{6\,\text{m}}\\ &=(78\,\text{J}-36\,\text{J})-(39\,\text{J}-9\,\text{J})\\ &=42\,\text{J}-30\,\text{J}\\ &=12\,\text{J}. \end{aligned} $$

The total work is \(W=12\,\text{J}+12\,\text{J}=24\,\text{J}\).

Check: The derivatives of the two antiderivatives are the stated force formulas, and the formulas match at \(3\,\text{m}\) with force \(7\,\text{N}\). Adding the two interval results gives \(24\,\text{J}\), as required.

Several Breakpoints and Reverse Motion

With more than one breakpoint, use the same procedure repeatedly. List the breakpoints in the order encountered along the path, integrate each formula on its own interval, and add the signed contributions. If the motion is from a larger position to a smaller one, keep the bounds in the actual direction of motion. Reversing the bounds reverses the sign of the work.

Worked Example: Splitting at Two Breakpoints During Reverse Motion

An object moves from \(x=5\,\text{m}\) to \(x=0\,\text{m}\). The force is defined by

$$ F(x)= \begin{cases} 4\,\text{N}, & 0\le x<1\,\text{m},\\ -2\,\text{N}, & 1\le x<3\,\text{m},\\ (1\,\text{N/m})(x-3\,\text{m}), & 3\le x\le5\,\text{m}. \end{cases} $$

The breakpoints are \(x=3\,\text{m}\) and \(x=1\,\text{m}\), in that order as the object travels from \(5\,\text{m}\) down to \(0\,\text{m}\). Split the work accordingly:

$$ W = \int_{5\,\text{m}}^{3\,\text{m}}(1\,\text{N/m})(x-3\,\text{m})\,dx + \int_{3\,\text{m}}^{1\,\text{m}}(-2\,\text{N})\,dx + \int_{1\,\text{m}}^{0\,\text{m}}4\,\text{N}\,dx. $$

For the first interval, an antiderivative is \((1\,\text{N/m})(x-3\,\text{m})^2/2\):

$$ \begin{aligned} W_1 &= \left[\frac{1\,\text{N/m}}{2}(x-3\,\text{m})^2\right]_{5\,\text{m}}^{3\,\text{m}}\\ &=0\,\text{J}-2\,\text{J}\\ &=-2\,\text{J}. \end{aligned} $$

For the second interval, an antiderivative is \((-2\,\text{N})x\):

$$ \begin{aligned} W_2 &=\left[(-2\,\text{N})x\right]_{3\,\text{m}}^{1\,\text{m}}\\ &=(-2\,\text{J})-(-6\,\text{J})\\ &=4\,\text{J}. \end{aligned} $$

For the final interval, an antiderivative is \((4\,\text{N})x\):

$$ \begin{aligned} W_3 &=\left[(4\,\text{N})x\right]_{1\,\text{m}}^{0\,\text{m}}\\ &=0\,\text{J}-4\,\text{J}\\ &=-4\,\text{J}. \end{aligned} $$

Therefore the total work is

$$ W=W_1+W_2+W_3=-2\,\text{J}+4\,\text{J}-4\,\text{J}=-2\,\text{J}. $$

Check: The three antiderivatives differentiate to the force formulas on their respective intervals. The negative contributions on the first and third intervals and the positive contribution on the middle interval combine to \(-2\,\text{J}\). The reversed bounds have been retained throughout, so no extra sign change should be applied afterward.

A Common Mistake: Extending One Formula Too Far

A frequent error is to use the first formula of a piecewise law over the entire path. In the first worked example, extending \(F(x)=(3\,\text{N/m})x\) all the way from \(0\,\text{m}\) to \(5\,\text{m}\) would give

$$ \int_0^{5\,\text{m}}(3\,\text{N/m})x\,dx = \left[\frac{3\,\text{N/m}}{2}x^2\right]_0^{5\,\text{m}} = 37.5\,\text{J}. $$

This calculation is incorrect for the stated force law because the first formula applies only up to \(2\,\text{m}\). From \(2\,\text{m}\) onward, the second formula must be used. The corrected calculation splits at \(2\,\text{m}\) and gives \(6\,\text{J}+24\,\text{J}=30\,\text{J}\).

Practical check: Before integrating, mark every position where the force formula changes. Confirm that each part of the path is covered exactly once and that no formula is used outside its stated interval.

Summary

Work for a piecewise force is found by integrating each force formula over the interval where it applies, then adding the signed contributions. Split at every breakpoint, preserve the actual order of the bounds for reverse motion, and use consistent units. A discontinuity at a breakpoint does not by itself prevent the integral from giving the work. Check continuity when the model requires it, rather than treating continuity as an automatic condition.

Check Your Understanding

For each question, identify the relevant intervals before calculating or reasoning about the work.

  1. A force is given by \(F(x)=2x\) for \(0\le x<1\) and \(F(x)=3\) for \(1\le x\le4\). What integrals give the work from \(x=0\) to \(x=4\)?
  2. Does a jump in a bounded, piecewise continuous force at one breakpoint automatically prevent the work integral from existing? Explain briefly.
  3. A model requires a continuous force at \(x=2\). What values or limits should be compared using the formulas on the two adjoining intervals?
  4. What change in sign should be expected when the same force law is integrated from \(x=b\) to \(x=a\), rather than from \(x=a\) to \(x=b\)?
  5. Why is it incorrect to integrate one piece of a force law over positions where that piece is not defined?

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