Tutorials › Calculus II › Setting Up Work for a Variable Force

Work and Variable Forces · Tutorial 453 of 998

Setting Up Work for a Variable Force

Learn to translate a position-dependent force and a specified motion into a correctly oriented work integral, then evaluate and check the result.

Intermediate 10 min read

What You'll Learn

  • Choose a position coordinate and identify the initial and final positions.
  • Express the signed force component along the coordinate as a function of position.
  • Set up work integrals with the correct orientation, including for decreasing position.
  • Apply the integral setup to polynomial and rational force laws.
  • Check work calculations using antiderivatives, signs, and units.

From a Variable Force to a Work Integral

A force that changes with position cannot generally be handled by multiplying one force value by the total displacement. Instead, divide the motion into short intervals. On each interval, the force is approximately constant, so its work is approximately force times displacement. Adding those contributions and taking the limit leads to an integral.

The setup depends on three choices: a position coordinate, the initial and final positions, and the signed component of force along the coordinate. In this tutorial, motion is along one straight coordinate axis, and the force component is given as a function of position. The sign of that component matters: positive force points in the positive coordinate direction, and negative force points in the negative direction.

Definition: Let \(x\) be a position coordinate, let \(a\) be the initial position, and let \(b\) be the final position. If \(F_x(x)\) is the signed force component along the positive \(x\)-direction, the work done by that force during the motion is $$ W=\int_a^b F_x(x)\,dx, $$ provided the force is integrable over the interval of motion. In particular, a continuous force law on the interval is sufficient.

The endpoints are ordered by the motion: \(a\) is where the motion starts and \(b\) is where it ends. Thus \(a\) may be greater than \(b\). The integral is signed, so the direction of travel is included automatically. Work has units of force times distance; in SI units, one joule is one newton-metre.

Why the Integral Has This Form

Suppose the object moves monotonically from \(x=a\) to \(x=b\), and the force component is continuous on the interval. Partition the path into subintervals with endpoints \(x_0=a,x_1,\ldots,x_n=b\). For each subinterval choose a sample point \(x_i^*\) within it. The displacement on that subinterval is \(\Delta x_i=x_i-x_{i-1}\), which is signed. The force is approximately \(F_x(x_i^*)\) there, so the approximate work is the sum of force times signed displacement.

$$ W\approx\sum_{i=1}^{n}F_x(x_i^*)\Delta x_i. $$

As the partition is refined, these sums approach the definite integral. The mesh of the partition is the largest subinterval length, \(\max_i|\Delta x_i|\). The absolute value is essential: it measures the size of each subinterval even when the motion is toward decreasing \(x\).

$$ W=\lim_{\max_i|\Delta x_i|\to 0} \sum_{i=1}^{n}F_x(x_i^*)\Delta x_i =\int_a^b F_x(x)\,dx. $$

This is the Riemann-sum definition of the definite integral applied to work. When \(a>b\), the increments in a partition ordered along the motion are negative. The integral’s orientation therefore records the direction of displacement without requiring a separate sign rule.

A Reliable Setup Process

Before integrating, make the physical and mathematical choices explicit. Use the position coordinate that describes the motion, and express the force component in terms of that same coordinate. If the force law is supplied in terms of some other quantity, it must first be rewritten as a function of position for this setup.

1
Choose the coordinate.
Specify which direction is positive and what position \(x\) measures.
2
Record the endpoints in travel order.
Set \(a\) equal to the initial position and \(b\) equal to the final position, even if \(b<a\).
3
Write the signed force law.
Use \(F_x(x)\), positive or negative according to the chosen coordinate direction.
4
Set up and evaluate the integral.
Use \(\int_a^b F_x(x)\,dx\), retain the orientation, and check the units and sign.

If the force law is rational, also check that its denominator is nonzero throughout the interval. A singularity on the path means the ordinary continuous-force setup does not apply directly; the integral would need to be treated as an improper integral, including a separate convergence check.

Worked Examples

Worked Example: A Polynomial Force During Increasing Position

An object moves from \(x=0\) m to \(x=3\) m. Its force component is \(F_x(x)=(2x+1)\) N, where \(x\) is the numerical position in metres. Set up and calculate the work.

The initial and final positions are \(a=0\) m and \(b=3\) m. The force is already expressed along the positive \(x\)-direction, so the work integral is

$$ W=\int_0^3(2x+1)\,dx\ \text{N}\cdot\text{m}. $$

An antiderivative of \(2x+1\) is \(x^2+x\). Therefore,

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

Check: differentiating \(x^2+x\) gives \(2x+1\), the specified force function. The force is positive over the interval and the motion is toward increasing \(x\), consistent with positive work. The units \(\text{N}\cdot\text{m}\) equal joules.

Worked Example: A Polynomial Force During Decreasing Position

An object moves from \(x=4\) m to \(x=1\) m. Its force component is \(F_x(x)=-(x+1)\) N, with \(x\) measured numerically in metres. Find the work done by this force.

The object moves toward decreasing \(x\), and the force is negative, so force and motion point in the same direction. Keep the initial position as the lower limit’s starting point and the final position as the ending point: \(a=4\), \(b=1\).

$$ \begin{aligned} W &=\int_4^1-(x+1)\,dx\ \text{N}\cdot\text{m}\\ &=\left[-\frac{x^2}{2}-x\right]_4^1\ \text{N}\cdot\text{m}\\ &=\left(-\frac{1^2}{2}-1\right) -\left(-\frac{4^2}{2}-4\right)\ \text{N}\cdot\text{m}\\ &=\left(-\frac{1}{2}-1\right)-(-8-4)\ \text{N}\cdot\text{m}\\ &=-\frac{3}{2}+12\ \text{N}\cdot\text{m}\\ &=\frac{21}{2}\ \text{J}=10.5\ \text{J}. \end{aligned} $$

Check: the derivative of \(-x^2/2-x\) is \(-x-1\), the stated force. Also, the force is negative and \(dx\) is negative along the motion, so their product contributes positive work. The computed value \(10.5\) J has that expected sign.

Worked Example: A Rational Force Law

An object moves from \(x=0\) m to \(x=2\) m under a force component \(F_x(x)=\dfrac{8}{x+2}\) N, where \(x\) is the numerical position in metres. Set up and evaluate the work.

The denominator \(x+2\) is positive for every \(x\) from \(0\) to \(2\), so the force law is continuous throughout the path. The setup is

$$ W=\int_0^2\frac{8}{x+2}\,dx\ \text{N}\cdot\text{m}. $$

An antiderivative is \(8\ln(x+2)\), since the derivative of \(\ln(x+2)\) is \(1/(x+2)\). The logarithm’s argument is positive on the interval.

$$ \begin{aligned} W &=\left[8\ln(x+2)\right]_0^2\ \text{N}\cdot\text{m}\\ &=8\ln(2+2)-8\ln(0+2)\ \text{N}\cdot\text{m}\\ &=8(\ln 4-\ln 2)\ \text{N}\cdot\text{m}\\ &=8\ln 2\ \text{J}. \end{aligned} $$

Numerically, \(8\ln 2\approx 5.545\), so the work is approximately \(5.545\) J to three decimal places. Check: differentiating \(8\ln(x+2)\) gives \(8/(x+2)\). The force is positive and the motion is toward increasing \(x\), which agrees with the positive result.

Orientation, Sign, and a Common Mistake

The signed integral accounts for both the sign of the force and the direction of the motion. A positive value means the force component contributes work in the direction of displacement; a negative value means it contributes work opposite to the displacement. This is the one-dimensional signed-work convention. It is important not to replace the signed force or displacement by its magnitude when setting up the integral.

Common mistake: Reversing the limits without changing the force law changes the sign of the work. In the decreasing-position example, writing \(\int_1^4-(x+1)\,dx\) gives \(-10.5\) J. But the motion starts at \(4\) and ends at \(1\), so the correct integral is \(\int_4^1-(x+1)\,dx=10.5\) J. The incorrect limits describe the opposite direction of travel.

A related setup error is to insert an absolute value and use \(\int_a^b |F_x(x)|\,dx\) automatically. That computes an unsigned accumulation, not the signed work done by the stated force. It may give the right magnitude in a particular case, but it does not preserve the force and motion directions in general.

Why the Setup Matters

Evaluating an integral correctly is only useful if it represents the intended motion. The coordinate determines what counts as positive force; the endpoints determine the direction of travel; and the force function supplies the signed contribution at each position. These choices are what turn a physical description into a mathematical model.

For polynomial force laws, integrating term by term often gives a polynomial antiderivative. For rational force laws, the denominator and interval must be checked before applying an antiderivative formula. In either case, the same setup applies: integrate the signed force component from the initial position to the final position.

For a path whose direction reverses, a single monotone position interval does not describe the full motion in travel order. Split the path at each reversal and set up an integral for each segment, using that segment’s initial and final positions. The contributions are then added with their signs.

Key takeaway: For a force component \(F_x(x)\) along a one-dimensional path, work is \(\int_a^b F_x(x)\,dx\), with \(a\) the initial position and \(b\) the final position. Keep the force signed, preserve the endpoint order, and check that the force law is integrable over the path.

Check Your Understanding

For each question, identify the coordinate direction and endpoint order before evaluating or interpreting the integral.

  1. An object moves from \(x=1\) m to \(x=3\) m under \(F_x(x)=5\) N. What is the work integral, and what is its value?
  2. An object moves from \(x=6\) m to \(x=2\) m under a positive force component \(F_x(x)=x\) N. Should the work be positive or negative? Explain using the signs of force and displacement.
  3. For a force law \(F_x(x)=\dfrac{3}{x-1}\) N on the interval from \(x=0\) m to \(x=2\) m, what feature must be checked before treating it as an ordinary continuous-force integral?
  4. Why is \(\max_i|\Delta x_i|\), rather than \(\max_i\Delta x_i\), used to measure partition mesh when the motion may be toward decreasing position?
  5. A path reverses direction at an intermediate position. Why should its work setup be split into separate integrals at that point?