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\).
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
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\),
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.
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:
For the first interval, an antiderivative of \(2x+1\) is \(x^2+x\). Thus
For the second interval, an antiderivative of \(7-x\) is \(7x-\frac{x^2}{2}\). Therefore
Adding the signed contributions gives
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
Split at both transitions, \(x=2\) and \(x=4\):
The first contribution is
The second contribution is negative:
For the third interval, an antiderivative of \(3x-14\) is \(\frac{3x^2}{2}-14x\). Hence
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
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
On the first part of the motion,
On the second part, the limits are \(2\) to \(1\), not \(1\) to \(2\), because the object is moving left:
Thus
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:
This is not signed work. The second force points opposite to the motion, so its work must be negative. The correction is
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.
Record the initial and final positions, including which one comes first in the direction of travel.
Split the motion wherever the applicable force formula changes.
Use that interval’s force formula and limits ordered along the motion.
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.
- 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\).
- Why must a work integral be split at a position where the force formula changes?
- 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.
- 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?
- For a piecewise continuous force, does changing its value at one transition point alone change the work integral? Briefly explain.