Sub topic 2
Work by a variable force and area under the F-x graph
What you need before this chapter
This chapter assumes you can do the following:
- Use W = F d cos θ for a constant force.
- Read a straight-line graph, and find the area of a rectangle, triangle and trapezoid.
- Integrate simple powers, such as ∫x² dx = x³/3.
- Use the dot product of two vectors.
Why the constant-force formula breaks
W = F d cos θ assumes that F has one value for the whole displacement. Many forces do not behave that way:
- A spring pulls harder as it stretches.
- Gravity weakens with height above the Earth.
- A person pushing a trolley may push hard at first and ease off later.
For these forces, no single value of F can be put into the formula. The fix is to split the path into very small steps. Over a step of width dx the force is almost constant, so the work in that step is dW = F dx. Adding up all the steps gives:
W = ∫ F dx, integrated from x₁ to x₂
This is the general definition of work along a straight line. The constant-force formula is the special case in which F can be pulled outside the integral.
Work as area under the F-x graph
In an F-x graph, the horizontal axis is position and the vertical axis is the force component along the displacement. A thin strip of width dx and height F has area F dx, which is the work done in that step. The sum of all the strips is the area between the curve and the x-axis.
So the work done by a force over a displacement equals the area under its F-x graph between the two positions. You do not need calculus if the graph is made of straight lines, because you can use geometry.
| Shape of the graph | Area (work) |
|---|---|
| Horizontal line at height F over width d | F × d |
| Straight line from 0 up to F over width d | ½ F d |
| Straight line from F₁ to F₂ over width d | ½ (F₁ + F₂) d |
| Curve F = kxⁿ from 0 to x | k xⁿ⁺¹ / (n + 1) |
Units check: newton times metre is joule. Read the units from the graph's axes, because many problems give distance in cm or force in kN.
Signs: area below the axis is negative
The vertical axis shows the component of force along the displacement. When that component points opposite to the motion, it is negative and the graph dips below the x-axis. Area below the axis counts as negative work.
- Net work is the area above the axis minus the area below it.
- Total area (ignoring signs) is not the work. It is only a trap in exam options.
- Moving in the negative x direction (dx < 0) also flips the sign of each strip.
Worked example 1: piecewise graph
A force acts along the x-axis. It rises linearly from 0 N at x = 0 to 20 N at x = 4 m, stays at 20 N until x = 6 m, then falls linearly to 0 N at x = 8 m. Find the work done.
- Triangle from 0 to 4 m: ½ × 4 × 20 = 40 J.
- Rectangle from 4 to 6 m: 2 × 20 = 40 J.
- Triangle from 6 to 8 m: ½ × 2 × 20 = 20 J.
Total: 40 + 40 + 20 = 100 J.
Worked example 2: force given as a formula
A force F = 3x² (N, with x in m) acts on a body as it moves from x = 0 to x = 2 m.
W = ∫ 3x² dx from 0 to 2 = [x³] from 0 to 2 = 8 J.
A frequent slip is forgetting to evaluate the antiderivative at the lower limit. It is harmless here because the lower limit is 0, but it is not harmless when the limits are, say, 1 m and 3 m.
Checking by computer
The first function below adds trapezoids between graph points. Because the force is straight between the points, this gives the exact signed area. The second function is a numerical integral, using the midpoint rule, for a force given as a formula.
def work_from_points(points):
"""points: list of (x, F) pairs joined by straight lines."""
total = 0.0
for (x1, f1), (x2, f2) in zip(points, points[1:]):
total += 0.5 * (f1 + f2) * (x2 - x1)
return total
def work_numeric(force, x1, x2, steps=1000):
"""Midpoint-rule estimate of the integral of force(x) dx."""
dx = (x2 - x1) / steps
return sum(force(x1 + (i + 0.5) * dx) for i in range(steps)) * dx
# Worked example 1: rising, flat, falling
print(work_from_points([(0, 0), (4, 20), (6, 20), (8, 0)])) # 100.0
# Worked example 2: F = 3 x^2 from 0 to 2 m
print(round(work_numeric(lambda x: 3 * x**2, 0, 2), 3)) # 8.0
# A force that reverses: +10 N for 2 m, then -5 N for 4 m
print(work_from_points([(0, 10), (2, 10), (2, -5), (6, -5)])) # 0.0The last case gives 20 J of positive work and 20 J of negative work, so the net work is zero even though the force acted over 6 m.
Variable force along a vector path
If the force and displacement are not parallel, the general definition is W = ∫ F · dr. This is the dot product of force and displacement, summed along the path. For motion along the x-axis with a force that has components (Fₓ, Fᵧ), only Fₓ does work, so the F-x graph should show Fₓ. For a force with constant direction at angle θ to the motion, use F cos θ as the vertical axis. NEET problems usually give you the component along the motion already.
Spring force as the standard case
A spring stretched or compressed by x from its natural length exerts a restoring force of magnitude kx, where k is the spring constant. The F-x graph for the force you apply is a straight line from 0 to kx, a triangle with area ½ k x². The work done by you in stretching the spring slowly from 0 to x is therefore ½ k x². The work done by the spring itself is the negative of that, −½ k x², because the spring force points opposite to the displacement. A later chapter turns this into elastic potential energy.
For a stretch from x₁ to x₂, use the trapezoid area ½ k (x₂² − x₁²) rather than ½ k (x₂ − x₁)².
Common errors
- Using the F-t graph. Area under force against time is impulse (change in momentum), not work. Check the horizontal axis before computing.
- Ignoring the sign. Net work is the signed area. A force that reverses can give zero or negative work.
- Averaging wrongly. The average force over a displacement is the area divided by the width. It is the simple mean of the end values only when the graph is a straight line.
- Unit slips. If x is in cm, convert to m before using joules.
- Squaring the interval. For a spring, (x₂ − x₁)² is wrong. The correct quantity is x₂² − x₁².
Link to the next chapters
Once you can compute the work done by the net force, you can connect it to the change in kinetic energy. That connection is the work-energy theorem. The area under the F-x graph then becomes the direct measure of how much a body's kinetic energy changes over the interval.
Exercise
A force acting along the x-axis varies as F = 10 − 2x (N, x in m). Find the work done by the force as the body moves from x = 0 to x = 8 m. Explain why the answer is smaller than the area you would get by ignoring the sign.
Show answer
The force falls linearly from 10 N at x = 0 to 0 at x = 5 m, then becomes negative, reaching −6 N at x = 8 m. Work from 0 to 5 m is the triangle ½ × 5 × 10 = +25 J. Work from 5 to 8 m is the triangle ½ × 3 × 6 = 9 J below the axis, so −9 J. Net work = 25 − 9 = 16 J. The same result comes from integration: [10x − x²] from 0 to 8 = 80 − 64 = 16 J. Adding the areas without the sign gives 34 J, which is wrong, because the force opposes the motion beyond x = 5 m.
Exercise
A spring with k = 200 N/m is stretched from x = 0.1 m to x = 0.3 m. How much work does an external force do on the spring, if the stretch is done slowly?
Show answer
W = ½ k (x₂² − x₁²) = ½ × 200 × (0.09 − 0.01) = 100 × 0.08 = 8 J.