Sub topic 13
Work done by a variable force
This chapter assumes you know the dot product, how to integrate simple polynomials, and the constant-force definition W = F d cos θ from the previous chapter. It covers what to do when the force changes along the path.
Why a constant-force formula is not enough
W = F d cos θ needs F to stay the same over the whole displacement. Many real forces do not:
- A spring pulls harder the more you stretch it.
- Gravity weakens with distance from a planet.
- A variable push from a person or engine changes along the path.
The fix is to split the path into pieces small enough that the force is nearly constant on each one. Then you add up the pieces.
The integral definition
Take a force F(x) along the x-axis. Over a tiny displacement dx the work is dW = F(x) dx. Adding all the pieces from x₁ to x₂ gives:
W = ∫ F(x) dx, from x₁ to x₂
If F is the component of the force along the direction of motion, this is also the signed area between the F–x curve and the x-axis. The area counts as positive above the axis and negative below it.
For motion in a plane or in space, use the dot product:
W = ∫ F · dr = ∫ (Fₓ dx + Fy dy + Fz dz)
Only the component of force along the displacement does work. A force that stays perpendicular to the path, such as the normal force on a sliding block or the tension in a swinging string, does zero work. This holds even when the force changes from point to point.
Method 1: area under an F–x graph
When the graph is made of triangles, rectangles, and trapezoids, you do not need calculus.
- Split the region between the curve and the axis into simple shapes.
- Find each area with geometry.
- Give areas below the axis a negative sign.
- Add them up.
For example, a force rises linearly from 0 N to 10 N over the first 2 m, then stays at 10 N for the next 3 m. The triangle gives ½ × 2 × 10 = 10 J. The rectangle gives 10 × 3 = 30 J. The total work is 40 J.
Method 2: integrate a formula F(x)
A force F = 4x − x² (in newtons, with x in metres) acts along the x-axis. The work from x = 0 to x = 3 m is:
W = ∫₀³ (4x − x²) dx = [2x² − x³/3]₀³ = 18 − 9 = 9 J
Now extend the motion to x = 6 m:
W = [2x² − x³/3]₀⁶ = 72 − 72 = 0 J
The force points forward for x < 4 m and backward for x > 4 m. The positive and negative areas cancel exactly. The result is zero even though the force acted over a long path.
The spring force
The most important variable force in JEE is the spring force. Its magnitude is kx, and it points opposite to the stretch. The work done by the spring while the end moves from x₁ to x₂ is:
W_spring = ∫ (−kx) dx = −½k(x₂² − x₁²)
The work you do against the spring, pulling slowly from the natural length to a stretch x, is the opposite sign:
W_you = +½ k x²
Both results depend only on the starting and ending positions, not on the path between them. That is the property of a conservative force, which a later chapter develops.
Method 3: force given as a function of time
Sometimes F is given as a function of time, not position. Use the power relation dW = F v dt, so W = ∫ F v dt. You must find v(t) first.
A 2 kg block starts from rest and feels F = 6t (in newtons) along a straight line.
- Acceleration: a = F/m = 3t.
- Velocity: v = ∫ 3t dt = 1.5t².
- Work in the first 2 s: W = ∫₀² (6t)(1.5t²) dt = 9 ∫₀² t³ dt = 9 × 16/4 = 36 J.
Check with the kinetic energy at t = 2 s. Here v = 1.5 × 4 = 6 m/s, so ½ m v² = ½ × 2 × 36 = 36 J. The two values agree. This agreement is the work-energy theorem, which the next chapter covers in full.
Checking an integral numerically
You can approximate any F(x) integral by summing thin trapezoids. This is useful for checking an answer, or when F(x) has no simple antiderivative.
def work_numeric(F, x1, x2, n=10000):
"""Trapezoid-rule estimate of the work done by F(x) from x1 to x2."""
h = (x2 - x1) / n
total = 0.0
for i in range(n):
xa = x1 + i * h
xb = xa + h
total += 0.5 * (F(xa) + F(xb)) * h
return total
k = 200.0 # spring constant in N/m
print(work_numeric(lambda x: -k * x, 0.0, 0.1)) # spring work, about -1.0 J
print(work_numeric(lambda x: 4 * x - x**2, 0, 3)) # about 9.0 J
print(work_numeric(lambda x: 4 * x - x**2, 0, 6)) # within 1e-6 of 0 JThe first line matches −½ k x² = −½ × 200 × 0.01 = −1 J. The second and third match the hand calculations above.
Work along a curved path
For a force that depends on position in two dimensions, take the dot product term by term. Suppose F = −k(x i + y j) acts on a particle moving from (1, 0) to (0, 2). Then:
W = ∫ (−kx dx − ky dy) = −k [x²/2 + y²/2] from (1, 0) to (0, 2)
W = −k (0 + 2) + k (1/2) = −1.5k
The force always points toward the origin with magnitude k r, so it is a two-dimensional spring force. The work depends only on ri = 1 and rf = 2, giving −½k(rf² − ri²) = −1.5k. The path shape does not matter.
Common errors
- Using F × d for a changing force. This is only valid when F is constant. Use the area or the integral.
- Treating total area as work when F reverses. If the force changes sign, area below the axis must be subtracted. Total area (ignoring signs) is the wrong quantity.
- Mixing up force and displacement direction. The integral uses the component of force along the motion. If the force and path are not parallel, include cos θ or take the dot product.
- Wrong limits. For the spring, the limits are the stretch measured from the natural length, not the length of the spring.
- Integrating with respect to the wrong variable. If F is a function of t, you cannot compute ∫ F dx directly. Convert with dx = v dt first.
Exercise
A force F = (3x² + 2) N acts on a particle along the x-axis. Find the work done on the particle as it moves from x = 1 m to x = 3 m.
Show answer
W = ∫ from 1 to 3 of (3x² + 2) dx = [x³ + 2x] from 1 to 3 = (27 + 6) − (1 + 2) = 33 − 3 = 30 J.
Exercise
A spring has constant k = 400 N/m. Starting from the natural length, you stretch it slowly by 5 cm and then by a further 5 cm, so the final stretch is 10 cm. How much work do you do in the second 5 cm only?
Show answer
W = ½k(x₂² − x₁²) = ½ × 400 × (0.10² − 0.05²) = 200 × (0.0100 − 0.0025) = 200 × 0.0075 = 1.5 J. The second 5 cm costs three times as much as the first (0.5 J), because the spring force is larger there.
Exercise
A 1 kg block starts from rest and feels F = 12t² N along a straight line, with t in seconds. Find the work done by the force in the first 1 s, and check it against the kinetic energy.
Show answer
a = 12t², so v = ∫ 12t² dt = 4t³. W = ∫₀¹ F v dt = ∫₀¹ 12t² · 4t³ dt = 48 ∫₀¹ t⁵ dt = 48/6 = 8 J. At t = 1 s, v = 4 m/s, so ½ m v² = ½ × 1 × 16 = 8 J, which matches.