From Constant Force to Variable Force
For a constant force, the work along a straight displacement can be found by taking the dot product of the force with the displacement. When the force depends on position, that single dot product is no longer enough: the force can change from one point of the segment to another.
The central idea is to accumulate the small amounts of work made along the path. At each point, only the component of the force in the direction of motion contributes. Parametrizing the segment lets us express both the changing force and the direction of travel using one variable.
Parametrizing the Segment
Let \(\mathbf{A}\) be the starting point and \(\mathbf{B}\) the ending point. The straight segment from \(\mathbf{A}\) to \(\mathbf{B}\) has the parametrization
At \(t=0\), this gives \(\mathbf{r}(0)=\mathbf{A}\), and at \(t=1\), it gives \(\mathbf{r}(1)=\mathbf{B}\). The derivative is constant:
Thus \(\mathbf{r}'(t)\) points in the direction of travel and has the same magnitude as the full displacement. If the position is measured in metres, \(\mathbf{r}'(t)\) has units of metres because \(t\) is dimensionless.
The vector \(\mathbf{F}(\mathbf{r}(t))\) is the force at the point reached at parameter value \(t\). The dot product with \(\mathbf{r}'(t)\) extracts the force component in the direction of motion, scaled by the rate of displacement with respect to \(t\). For the straight segment this becomes
If force is measured in newtons and position in metres, the integrand has units of newton-metres, or joules. The formula requires that the force be defined along the segment and be integrable there; continuity is a standard sufficient condition. The parameter interval runs from the stated starting point to the stated endpoint.
Why the Dot Product Integral Gives Work
The formula follows from adding the work over many short pieces of the motion. For a small displacement \(\Delta\mathbf{r}\), the force is approximately constant over that short piece, so its work is approximately \(\mathbf{F}\cdot\Delta\mathbf{r}\). Partition the parameter interval into small subintervals. On a subinterval of width \(\Delta t\), the segment displacement is exactly \(\mathbf{r}'(t)\Delta t\), since \(\mathbf{r}'(t)=\mathbf{B}-\mathbf{A}\) is constant.
Choose a sample parameter value \(t_i^*\) in each subinterval. The total approximate work is the sum of the force at the sample points dotted with the corresponding displacements:
As the partition is refined, continuity of the force along the segment makes these Riemann sums converge to the integral of the scalar function \(\mathbf{F}(\mathbf{r}(t))\cdot(\mathbf{B}-\mathbf{A})\). That limit is precisely the work formula. The dot product is essential: it measures the part of the force that contributes to displacement, rather than the total force magnitude.
Worked Examples
Worked Example: A Linear Force Along a Segment in the Plane
Let the force, in newtons, be \(\mathbf{F}(x,y)=(x+2y,\,3x-y)\), where coordinates are measured in metres. Find the work from \(\mathbf{A}=(0,0)\) to \(\mathbf{B}=(2,1)\).
First, compute the displacement:
Parametrize the segment and differentiate:
Evaluate the force at the position \((2t,t)\):
Take the dot product with the direction vector:
Therefore,
As a check, the two force components contribute \(\int_0^1 4t(2)\,dt=4\) J and \(\int_0^1 5t(1)\,dt=\frac{5}{2}\) J. Their sum is \(4+\frac{5}{2}=\frac{13}{2}\) J, agreeing with the dot-product calculation.
Worked Example: A Nonlinear Force Along a Segment
Let \(\mathbf{F}(x,y)=(y,x^2)\) in newtons, with coordinates in metres. Find the work from \(\mathbf{A}=(1,0)\) to \(\mathbf{B}=(3,2)\).
The displacement and segment parametrization are
The velocity vector with respect to the parameter is
Substitute the parametrized coordinates into the force. Its first component is \(y=2t\), and its second component is \(x^2=(1+2t)^2=1+4t+4t^2\). Hence
The force component along the displacement is
Integrate term by term and evaluate at both endpoints:
To check, the first component contributes \(\int_0^1 (2t)(2)\,dt=2\) J. The second contributes \(\int_0^1 (1+4t+4t^2)(2)\,dt=2+4+\frac{8}{3}=\frac{26}{3}\) J. Adding gives \(2+\frac{26}{3}=\frac{32}{3}\) J, as obtained above.
Worked Example: Three Force Components Along a Spatial Segment
Let \(\mathbf{F}(x,y,z)=(2x,-y,3)\) in newtons, with coordinates measured in metres. Find the work from \(\mathbf{A}=(0,0,0)\) to \(\mathbf{B}=(1,2,1)\).
The displacement is \((1,2,1)\), so a parametrization and its derivative are
Along this segment, \(x=t\) and \(y=2t\). Thus the force is
The dot product is
Consequently,
The component contributions give an independent check: the first is \(\int_0^1 2t\,dt=1\) J, the second is \(\int_0^1(-2t)(2)\,dt=-2\) J, and the third is \(\int_0^1 3\,dt=3\) J. Their sum is \(1-2+3=2\) J. The negative contribution is valid: that force component acts partly against the displacement.
A Common Mistake: Integrating Force Magnitude
Work is not generally the integral of the force’s magnitude. Magnitude records the total size of the force, but it does not record how the force is directed relative to the motion. The dot product does.
For a concrete comparison, take \(\mathbf{F}(x,y)=(x,y)\) and move from \((0,0)\) to \((2,1)\). The parametrization is \(\mathbf{r}(t)=(2t,t)\), so \(\mathbf{r}'(t)=(2,1)\) and \(\mathbf{F}(\mathbf{r}(t))=(2t,t)\). A mistaken calculation that integrates the force magnitude with respect to \(t\) gives
But the correct work uses the dot product with the displacement rate:
The two values differ because force magnitude alone does not measure the force component along the motion. For this path, the force points along the segment, so its dot product with the displacement rate is larger than its magnitude by the factor \(\sqrt{5}\).
A Reliable Calculation Process
For a position-dependent force along a straight segment, keeping the geometric and algebraic steps in order prevents most setup errors.
Subtract the starting point from the endpoint to obtain \(\mathbf{B}-\mathbf{A}\).
Use \(\mathbf{r}(t)=\mathbf{A}+t(\mathbf{B}-\mathbf{A})\) for \(0\leq t\leq1\), then compute \(\mathbf{r}'(t)\).
Substitute the coordinate functions from \(\mathbf{r}(t)\) into every component of \(\mathbf{F}\).
Form the scalar function \(\mathbf{F}(\mathbf{r}(t))\cdot\mathbf{r}'(t)\), integrate over \(0\leq t\leq1\), and include work units.
This method matters whenever force varies with position: the force sampled at the beginning or end alone cannot generally represent its effect over the whole segment. Integrating the tangential component accounts for that variation while preserving the direction of the motion.
Check Your Understanding
For each question, identify the role of the parametrization, the force evaluation, and the dot product.
- Write a parametrization for the segment from \((2,-1)\) to \((5,3)\), and find its derivative.
- If \(\mathbf{F}(x,y)=(x,y)\) acts along the segment from \((0,0)\) to \((1,2)\), what scalar function of \(t\) must be integrated to find the work?
- Why does the work integrand use a dot product rather than the magnitude of the force?
- For \(\mathbf{F}(\mathbf{r}(t))=(1,t)\) and \(\mathbf{r}'(t)=(2,1)\), compute the work on \(0\leq t\leq1\).
- What condition on the force along the segment is sufficient to ensure that the work integral exists?