Tutorials › Calculus I › Work Under Piecewise Force Laws

Work and Geometric Applications · Tutorial 1324 of 1495

Work Under Piecewise Force Laws

Learn to split work integrals at every force-law transition and combine the signed contributions correctly.

Advanced 9 min read

What You'll Learn

  • Represent a position-dependent force law using its intervals and transition points.
  • Set up a work integral separately on each interval where the force formula is fixed.
  • Use signed integrals to account for force direction and direction of motion.
  • Combine interval contributions using additivity, including when motion reverses.
  • Check the resulting work and identify common sign errors.

When the Force Law Changes

A force can depend on position according to different rules in different regions. A spring, for example, may behave differently before and after a mechanism engages; a moving object may also pass through regions where different forces act. In such situations, there is no single formula to use over the entire motion.

The calculation follows a reliable principle: divide the motion at every position where the force law changes, integrate the applicable force formula on each interval, and add the results with their signs intact. The sign matters: work can be positive, negative, or zero.

Piecewise Force and Work

Consider motion along a straight position coordinate \(x\), with the force acting along that coordinate. A piecewise force law specifies the force by separate formulas on separate position intervals. For example, one formula might apply from \(x=0\) to \(x=2\), and another from \(x=2\) to \(x=5\).

Definition: If an object moves from position \(x=a\) to position \(x=b\) under a force \(F(x)\) that is piecewise continuous on the interval of motion, its work is $$ W=\int_a^b F(x)\,dx. $$ If the force law changes at one or more positions between \(a\) and \(b\), split the integral at every such transition and use the appropriate formula on each subinterval.

The integral is signed. If the force points in the same direction as the motion, its contribution to work is positive; if it points opposite to the motion, its contribution is negative. Reversing the direction of motion reverses the order of the integral’s limits and therefore reverses the sign of the work for the same force law.

Suppose the motion is from \(a\) to \(b\), where \(a<b\), and the transition points are \(c_1,\ldots,c_n\), ordered so that \(a<c_1<\cdots<c_n<b\). If the force formulas on the successive intervals are \(F_0,\ldots,F_n\), then

$$ W = \int_a^{c_1}F_0(x)\,dx +\int_{c_1}^{c_2}F_1(x)\,dx +\cdots +\int_{c_n}^{b}F_n(x)\,dx. $$

For motion in the opposite direction, the same principle applies, but the integrals must follow the direction from the starting position to the ending position. A force formula’s value at one transition point does not affect the integral: changing a bounded, piecewise continuous function at finitely many individual points does not change its integral. The intervals on either side of the transition, however, must use their respective formulas.

Why Splitting the Integral Works

The key fact is the additivity of the definite integral. For an integrable force and any intermediate position \(c\) between \(a\) and \(b\),

$$ \int_a^b F(x)\,dx = \int_a^c F(x)\,dx+\int_c^b F(x)\,dx. $$

To see why this is appropriate for work, approximate each integral by sums of force times small displacement. The intervals from \(a\) to \(c\) and from \(c\) to \(b\) together make up the full interval from \(a\) to \(b\). Their small displacement contributions therefore combine into the sum for the whole motion. Taking the limit that defines the integral gives the displayed identity. Repeatedly applying it at each transition gives the piecewise formula.

Important consequence: A transition in the force law requires a new formula for the next interval, not a new rule for combining work. Each interval contributes a signed definite integral, and the total work is their sum.

Worked Example: A Force Law with Two Intervals

Worked Example: A Force Law with Two Intervals

An object moves from \(x=0\) m to \(x=5\) m. Its force is \(F(x)=2x+1\) N for \(0\leq x<2\), and \(F(x)=7-x\) N for \(2\leq x\leq5\), where the numerical value of \(x\) is measured in metres. Find the work.

The formula changes at \(x=2\), so split the integral there:

$$ W=\int_0^2(2x+1)\,dx+\int_2^5(7-x)\,dx. $$

For the first interval, an antiderivative of \(2x+1\) is \(x^2+x\). Thus

$$ \int_0^2(2x+1)\,dx =(2^2+2)-(0^2+0) =6. $$

For the second interval, an antiderivative of \(7-x\) is \(7x-\frac{x^2}{2}\). Therefore

$$ \int_2^5(7-x)\,dx =\left(35-\frac{25}{2}\right)-\left(14-\frac{4}{2}\right) =\frac{45}{2}-12 =\frac{21}{2}. $$

Adding the signed contributions gives

$$ W=6+\frac{21}{2}=\frac{33}{2}=16.5\text{ J}. $$

Check: Differentiating the antiderivatives gives \(\frac{d}{dx}(x^2+x)=2x+1\) and \(\frac{d}{dx}(7x-\frac{x^2}{2})=7-x\), the correct force formulas on their respective intervals. Both interval contributions are positive, consistent with positive force over the motion.

Keeping Positive and Negative Contributions

A force can change sign within an interval even when its formula does not change. The integral automatically accounts for this: the part where the force is positive contributes positive work, while the part where the force is negative contributes negative work. Do not replace the force by its absolute value unless the question specifically asks for a quantity other than signed work.

Worked Example: Three Force Intervals and a Sign Change

An object moves from \(x=0\) m to \(x=6\) m. For the numerical value of \(x\) in metres, let

$$ F(x)= \begin{cases} 6-x, & 0\leq x<2,\\ -2, & 2\leq x<4,\\ 3x-14, & 4\leq x\leq6, \end{cases} \qquad\text{with force values in newtons.} $$

Split at both transitions, \(x=2\) and \(x=4\):

$$ W=\int_0^2(6-x)\,dx+\int_2^4(-2)\,dx+\int_4^6(3x-14)\,dx. $$

The first contribution is

$$ \int_0^2(6-x)\,dx =\left[6x-\frac{x^2}{2}\right]_0^2 =(12-2)-0 =10. $$

The second contribution is negative:

$$ \int_2^4(-2)\,dx =[-2x]_2^4 =(-8)-(-4) =-4. $$

For the third interval, an antiderivative of \(3x-14\) is \(\frac{3x^2}{2}-14x\). Hence

$$ \int_4^6(3x-14)\,dx =\left(54-84\right)-\left(24-56\right) =-30-(-32) =2. $$

The force on the last interval is negative until \(3x-14=0\), or \(x=\frac{14}{3}\), and positive after that. Its net contribution over the interval is still the signed integral \(2\). The total work is

$$ W=10+(-4)+2=8\text{ J}. $$

Check: The interval contributions sum to \(8\) J, and the antiderivatives used differentiate to \(6-x\), \(-2\), and \(3x-14\), respectively. In particular, keeping the middle interval’s contribution negative is essential.

Motion in the Reverse Direction

When the ending position is smaller than the starting position, write the limits in the order of the actual motion. If the object crosses a transition, split there and keep the limits oriented from its starting point toward its ending point. This handles direction without changing the definition of work.

Worked Example: Crossing a Transition While Moving Left

An object moves from \(x=4\) m to \(x=1\) m. Its force is \(3\) N for \(0\leq x<2\), and \(-x\) N for \(2\leq x\leq5\), with the numerical value of \(x\) in metres. The motion crosses the transition at \(x=2\). Its work is

$$ W=\int_4^2(-x)\,dx+\int_2^1 3\,dx. $$

On the first part of the motion,

$$ \int_4^2(-x)\,dx =\left[-\frac{x^2}{2}\right]_4^2 =-2-(-8) =6. $$

On the second part, the limits are \(2\) to \(1\), not \(1\) to \(2\), because the object is moving left:

$$ \int_2^1 3\,dx =[3x]_2^1 =3-6 =-3. $$

Thus

$$ W=6+(-3)=3\text{ J}. $$

Check: On the first segment, both the force and the displacement point left, so the work is positive. On the second, the force points right while the motion is left, so the work is negative. The signed total is \(3\) J.

Common Pitfall: Adding Magnitudes Instead of Work

Suppose a force is \(4\) N from \(x=0\) m to \(x=2\) m and \(-3\) N from \(x=2\) m to \(x=5\) m. For motion from \(0\) m to \(5\) m, an incorrect calculation would add the magnitudes of both interval contributions:

$$ \text{Incorrect: } |4(2-0)|+|-3(5-2)|=8+9=17\text{ J}. $$

This is not signed work. The second force points opposite to the motion, so its work must be negative. The correction is

$$ W=\int_0^2 4\,dx+\int_2^5(-3)\,dx =4(2-0)-3(5-2) =8-9 =-1\text{ J}. $$

Check: The object travels \(2\) m under a \(4\) N force in its direction, giving \(8\) J; then it travels \(3\) m against a \(3\) N force, giving \(-9\) J. Their signed sum is \(-1\) J, as calculated.

A Practical Setup

Before evaluating a work integral for a piecewise force, identify the starting and ending positions and mark every transition between them. Then use the force formula that applies on each interval, preserve the order of the limits, and add the resulting signed integrals. This is useful whenever a model changes across position—for example, when a force is switched on, changes strength, or reverses direction at a specified location.

1
Mark the motion interval.
Record the initial and final positions, including which one comes first in the direction of travel.
2
Locate every transition.
Split the motion wherever the applicable force formula changes.
3
Integrate each piece.
Use that interval’s force formula and limits ordered along the motion.
4
Add the signed results.
Do not turn negative work into positive work by taking absolute values.

Check Your Understanding

Use signed work integrals in each question. Keep track of every force-law transition.

  1. A force is \(2\) N on \(0\leq x<3\) and \(-1\) N on \(3\leq x\leq5\). Set up, then evaluate, the work for motion from \(x=0\) to \(x=5\).
  2. Why must a work integral be split at a position where the force formula changes?
  3. A force is \(-4\) N from \(x=1\) to \(x=4\). What is the work when the object moves from \(x=4\) to \(x=1\)? Explain the sign.
  4. If a force changes sign inside an interval where its formula stays the same, should you replace the force by its absolute value when calculating signed work?
  5. For a piecewise continuous force, does changing its value at one transition point alone change the work integral? Briefly explain.

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