Work done by a variable force

Pull open a spring-loaded gym expander and the first few centimetres feel almost free — then it fights back harder with every extra centimetre, until your arms are shaking at full stretch. A rocket climbing off the pad feels the same kind of shifting resistance in reverse: its engine thrust barely changes, but its mass keeps shrinking as fuel burns, so the net force pushing it forward keeps changing too. None of these forces sit still at one value the way "push a box with 20 newtons" does in a textbook diagram. The moment a force's strength depends on where the object currently is, the tidy formula W=Fdcos⁡θW = Fd\cos\theta — built for one constant push over one straight displacement — simply has nothing fixed to multiply. This article is about the fix, and it turns out to be one of the most useful tricks in all of mechanics: chop the motion into pieces so tiny that the force barely changes across any one of them, add up the work done in every piece, and then let the pieces shrink to zero width. What survives that limit is a definite integral, W=∫F dxW = \int F\,dx, and a picture worth remembering for the rest of the course — work is the area under the force-versus-position graph. The same graphical logic that finds the area of an odd-shaped plot of land will find the work done by a spring, a variable electric force, or a fuel-burning rocket, using nothing beyond the algebra and elementary calculus already in your toolkit. By the end you will be able to set up and evaluate ∫F(x) dx\int F(x)\,dx for polynomial forces, read positive and negative work straight off a graph, and see exactly how the familiar spring energy formula U=12kx2U = \tfrac12 kx^2 falls out of a triangle's area — the same triangle you will meet again when potential energy is introduced properly in the next article.

Key takeaways
  • A variable force is one whose magnitude (and/or direction) changes as the object moves, so the constant-force formula W=Fdcos⁡θW = Fd\cos\theta cannot be applied directly.
  • The fix is to divide the path into tiny displacements Δx\Delta x, treat FF as constant over each one, and sum: W≈∑iF(xi) ΔxiW \approx \sum_i F(x_i)\,\Delta x_i.
  • Letting Δx→0\Delta x \to 0 turns the sum into a definite integral, the exact result: W=∫xixfF(x) dxW = \displaystyle\int_{x_i}^{x_f} F(x)\,dx.
  • Graphically, this integral is the area under the force-displacement (F-x) graph between the start and end positions — no calculus notation needed if the shape is a triangle or rectangle.
  • Area above the x-axis counts as positive work (force helping the motion); area below the axis counts as negative work (force opposing it), and the two must be added algebraically, never as raw magnitudes.
  • The spring force F=kxF = kx gives a straight line through the origin, so the work done stretching it by xx is the area of a triangle, 12×x×kx=12kx2\tfrac12 \times x \times kx = \tfrac12 kx^2 — the origin of the spring potential-energy formula.
  • Key idea: when force depends on position, work is not "force times distance" but the area swept out under the F-x graph, computed exactly as the definite integral W = ∫F(x) dx.
The core insight

Work done by a force that changes with position equals the area under its force-displacement graph, computed exactly by breaking the path into infinitesimal steps and integrating, W=∫xixfF(x) dxW = \int_{x_i}^{x_f} F(x)\,dx, which for a straight-line graph like the spring force F=kxF = kx reduces to a simple triangle area, 12kx2\tfrac12 kx^2.

Where it fits in the syllabus

Work by a variable force sits inside the CBSE Class 11 unit Work, Energy and Power, directly after work by a constant force, and it is squarely in the prescribed 2025-26 scope: the syllabus explicitly lists W=∫F dxW = \int F\,dx as the general definition of work, built on top of the area-under-the-FF-xx-graph picture. Nothing here goes beyond elementary integration of simple polynomial forces — no advanced integration techniques and no forces beyond the ones you can plot by hand. This topic is the load-bearing bridge of the whole chapter: the very next articles use exactly this area idea to derive the work-energy theorem for a variable force, define potential energy, and justify U=12kx2U = \tfrac12 kx^2 for a spring, so getting comfortable with "work equals area" here pays off repeatedly.

The physical picture

Picture an object moving along a straight line (call it the x-axis) while a force F(x)F(x) acts on it, and that force's strength depends on the object's current position xx. Slice the total displacement from xix_i to xfx_f into a large number of tiny steps, each of width Δx\Delta x, chosen small enough that FF hardly changes across any single step. Over one such step the force behaves almost like a constant force, so the work done in that step is well approximated by F(xi) ΔxiF(x_i)\,\Delta x_i — exactly the constant-force formula, applied locally. Summing over every step gives an approximate total work:

W≈∑iF(xi) ΔxiW \approx \sum_i F(x_i)\,\Delta x_i

where: F(xi)F(x_i) is the force evaluated at the start of the ii-th step, and Δxi\Delta x_i is that step's tiny width; the sum runs over every step between xix_i (initial position) and xfx_f (final position). This is only approximate because FF is not perfectly constant even over a small Δx\Delta x — but the approximation gets better and better as the steps shrink. Now let every Δx\Delta x shrink toward zero while the number of steps grows without bound. The approximate sum becomes exact, and by definition that limit is a definite integral:

W=∫xixfF(x) dxW = \int_{x_i}^{x_f} F(x)\,dx

where: the integral sign is simply "the limit of a sum of infinitely many infinitesimally thin strips," F(x)F(x) is the force as a function of position, and dxdx is an infinitesimally small displacement. Geometrically, this is nothing more exotic than the area under the F-x graph between xix_i and xfx_f — the same idea used to find the area under any curve by adding up thin vertical strips. If you can sketch FF against xx, you can read off the work as an area, using triangle and rectangle formulas whenever the graph is made of straight lines, or by counting graph squares (or integrating) when it curves. Direction matters as much as magnitude here. If the graph lies above the x-axis over some stretch of the motion, the force there points along the direction of motion and that stretch contributes positive work — energy is being fed into the object. If the graph dips below the axis, the force opposes the motion over that stretch and it contributes negative work — energy is being taken out. The total work is the algebraic sum of these signed areas, never the sum of their bare sizes.

Figure
A force versus position graph showing a straight line rising from the origin with the region beneath it divided into six thin vertical strips of equal width, each strip capped by a rectangle approximating the curve, illustrating how summing many thin rectangle areas approaches the exact triangular area under the line as the strip width shrinks
Work as area under the F-x graph — thin strips approach the exact area position x force F(x) Δx F(x) = kx 0 x = 0 x = x F(xi) As the strips get thinner the staircase hugs the line and the strip sum becomes the exact triangle area, half base times height

A recurring example throughout the chapter is the restoring force of a stretched spring, F=kxF = kx (the magnitude you must apply to hold the spring at extension xx, matching Hooke's law Fspring=−kxF_{\text{spring}} = -kx in the opposite sense), where kk is the spring or force constant. Plotting the applied force against extension gives exactly the straight line shown above, and the strips in the figure are previewing the general method you will use for every variable-force problem in this course.

Derivation AWork done by a force that depends on position

The goal of this derivation is to show, starting from nothing but the constant-force formula W=FΔxW = F\Delta x for one tiny step and the ordinary idea of a limit, that the total work done by a force whose magnitude changes with position is exactly the definite integral W=∫xixfF(x) dxW = \int_{x_i}^{x_f} F(x)\,dx, and that this integral is identical to the area enclosed between the F-x graph and the x-axis. No result beyond elementary one-dimensional integration is used, and the argument works for any force function F(x)F(x) that can be plotted, not just straight lines.

Step 1. Split the displacement into tiny steps. Divide the total displacement from xix_i to xfx_f into NN small intervals, each of width Δx=(xf−xi)/N\Delta x = (x_f - x_i)/N. Choose NN large enough that Δx\Delta x is tiny compared with the distance over which F(x)F(x) changes appreciably; then over any single interval, FF is nearly constant and can be taken as its value F(xi)F(x_i) at the start of that interval.

Step 2. Approximate the work in each step and sum. Because FF is nearly constant over one interval, the work done in that interval is approximately the constant-force formula applied locally, F(xi) ΔxF(x_i)\,\Delta x. This is exactly the area of a thin rectangle of height F(xi)F(x_i) and width Δx\Delta x — one of the strips in the figure above. Adding the contributions of all NN strips gives the total work as an approximate sum, W≈∑i=1NF(xi) ΔxW \approx \sum_{i=1}^{N} F(x_i)\,\Delta x, which is also the total area of all the rectangles, an approximation to the true area under the curve.

Step 3. Take the limit as the strips shrink. The approximation in Step 2 has an error in every strip, because FF is never perfectly constant across a finite Δx\Delta x; but that error shrinks as Δx\Delta x shrinks, and vanishes entirely in the limit Δx→0\Delta x \to 0 (equivalently N→∞N \to \infty). By the definition of the definite integral, this limit of a sum of thin rectangles is written W=∫xixfF(x) dxW = \int_{x_i}^{x_f} F(x)\,dx. The sum has become exact, and the staircase of rectangles has become the smooth curve itself, so the area of the rectangles has become the true area under the graph.

Step 4. Read off the sign convention. Because each strip's contribution F(xi) ΔxF(x_i)\,\Delta x can be positive or negative depending on the sign of F(xi)F(x_i), the integral automatically adds signed contributions: strips where the graph lies above the x-axis (force along the direction of motion) add positive work, and strips where the graph dips below the axis (force opposing motion) subtract work. The net work between xix_i and xfx_f is therefore the algebraic sum of areas above and below the axis, never their combined magnitude — a point worth re-checking on every problem where the force changes sign partway through the motion.

Worked examples

Board level - work done stretching a spring by the area method

A spring with force constant k=200 N/mk = 200\ \text{N/m} is stretched from its natural length by x=0.15 mx = 0.15\ \text{m}. Using the area-under-the-graph method, find the work done by the external agent stretching the spring, and check it against the general spring energy formula.

Step 1. Identify the graph shape. To hold the spring at extension xx, the applied force must balance the spring's restoring force at every instant, so F=kxF = kx: a straight line through the origin with slope kk. Stretching the spring from x=0x = 0 to x=0.15 mx = 0.15\ \text{m} therefore sweeps out a triangular region under the graph, exactly the shape derived in Step 3 of the derivation above.

Step 2. Compute the force at maximum extension. Fmax⁡=kx=200×0.15=30 NF_{\max} = kx = 200 \times 0.15 = 30\ \text{N}. This is the height of the triangle; the base is the extension itself, x=0.15 mx = 0.15\ \text{m}.

Step 3. Find the area of the triangle. W=12×base×height=12×x×Fmax⁡=12×0.15×30W = \tfrac12 \times \text{base} \times \text{height} = \tfrac12 \times x \times F_{\max} = \tfrac12 \times 0.15 \times 30.

W=2.25 JW = 2.25\ \text{J}

Step 4. Cross-check with the integral form. W=∫00.15kx dx=[12kx2]00.15=12(200)(0.15)2=2.25 JW = \int_0^{0.15} kx\,dx = \left[\tfrac12 kx^2\right]_0^{0.15} = \tfrac12(200)(0.15)^2 = 2.25\ \text{J}, matching Step 3 exactly. The work done stretching the spring is 2.25 J, and this is precisely how the spring potential-energy formula U=12kx2U = \tfrac12 kx^2 is obtained — a result the next articles in this chapter will use directly.

Competitive level - variable force with a nonlinear term, plus average force

A block on a frictionless track is pushed along the x-axis by a force F(x)=(3x2−2x+7) NF(x) = (3x^2 - 2x + 7)\ \text{N}, where xx is in metres. Find the work done as the block moves from x=0x = 0 to x=5 mx = 5\ \text{m}, and find the average force over this displacement.

Step 1. Set up the integral. Since FF is not linear, the region under the graph is a curved area, not a simple triangle, so the definite integral must be evaluated term by term.

W=∫05(3x2−2x+7) dxW = \int_{0}^{5} (3x^2 - 2x + 7)\,dx

Step 2. Integrate term by term using the power rule. ∫(3x2−2x+7) dx=x3−x2+7x\displaystyle\int(3x^2 - 2x + 7)\,dx = x^3 - x^2 + 7x, so W=[x3−x2+7x]05W = \left[x^3 - x^2 + 7x\right]_0^5.

Step 3. Evaluate at the limits. At x=5x = 5: (5)3−(5)2+7(5)=125−25+35=135(5)^3 - (5)^2 + 7(5) = 125 - 25 + 35 = 135. At x=0x = 0, every term vanishes.

W=135−0=135 JW = 135 - 0 = 135\ \text{J}

Step 4. Find the average force. The average force over a displacement is defined as the constant force that would do the same total work, Fˉ=W/d=135/5=27 N\bar F = W/d = 135/5 = 27\ \text{N}. Note this is not the same as the force evaluated at the midpoint x=2.5 mx = 2.5\ \text{m}, which gives F(2.5)=3(6.25)−2(2.5)+7=18.75−5+7=20.75 NF(2.5) = 3(6.25) - 2(2.5) + 7 = 18.75 - 5 + 7 = 20.75\ \text{N} — for a nonlinear force, the midpoint value and the true (work-weighted) average generally disagree, because the graph is not symmetric about the midpoint. Answer: W=135 JW = 135\ \text{J}, and the average force over the displacement is 27 N27\ \text{N}. Timing note: this problem should take under two minutes once the power rule is automatic. Integrate term by term (3x2→x33x^2 \to x^3, −2x→−x2-2x \to -x^2, 7→7x7 \to 7x), plug in the upper limit only if the lower limit is zero (it kills every term), then divide by the displacement for the average force. The one trap examiners exploit is exactly the one in Step 4 — do not casually substitute the midpoint position into F(x)F(x) and call it the average force; that shortcut only works when FF is linear in xx.

Common traps

  • Plugging some "typical-looking" force value into W=Fdcos⁡θW = Fd\cos\theta instead of integrating or computing the graph area — there is no shortcut around setting up ∫F dx\int F\,dx (or an equivalent area calculation) once FF genuinely depends on xx.
  • Forgetting that area below the x-axis represents negative work and adding up magnitudes instead of respecting sign — a force that first helps then opposes the motion can have a net work far smaller than either portion's size alone.
  • Mixing up the variable of integration: the area-under-the-graph method here is with respect to displacement xx, not time — that distinction becomes important later when comparing with power, P=dW/dtP = dW/dt, which is a rate with respect to time.
  • Assuming every F-x graph is a straight line: many problems (like the competitive example above) give a curved graph, and the area must then be found by integration or by counting graph squares, never by a triangle or rectangle formula alone.
  • Confusing the average force Fˉ=W/d\bar F = W/d with the force evaluated at the midpoint position — the two coincide only when FF is a linear function of xx.

You should be able to…

  • Explain, in your own words, why W=Fdcos⁡θW = Fd\cos\theta cannot be applied directly when a force's magnitude changes with position.
  • Set up and evaluate W=∫xixfF(x) dxW = \int_{x_i}^{x_f} F(x)\,dx for polynomial force functions using the power rule.
  • Interpret work as the signed area under an F-x graph, using triangle and rectangle formulas for straight-line graphs.
  • Correctly add positive (above-axis) and negative (below-axis) areas to find net work, rather than adding raw magnitudes.
  • Apply the area method to the spring force F=kxF = kx to derive W=12kx2W = \tfrac12 kx^2.
  • Compute the average force Fˉ=W/d\bar F = W/d over a displacement and distinguish it from the force at the midpoint position for nonlinear forces.

Ask the tutor: If summing thin rectangle strips into a definite integral still feels abstract, ask the AI tutor to walk through the spring example strip by strip and watch the staircase area converge to exactly 12kx2\tfrac12 kx^2.

Why can't I just use the force at the halfway point and multiply by the total distance?

Because that only gives the exact work if the force happens to be a straight line (linear in xx) — in that special case the value at the midpoint genuinely equals the work-weighted average force, as you can check for the spring example above. For any curved force, like the 3x2−2x+73x^2 - 2x + 7 example, the midpoint value and the true average diverge, sometimes noticeably, because more of the "area" sits under the steeper or flatter parts of the curve than a straight average would suggest. The safe method is always to integrate (or measure the graph area) rather than guess an average value.

Is the area-under-the-graph method only for straight-line graphs, like the spring?

No — it works for any shape. For straight-line graphs you can use triangle and rectangle formulas directly, which is why the spring example is such a convenient first case. For curved graphs, like a quadratic or cubic force function, you either integrate exactly (as in the competitive worked example) or, if you only have a plotted graph without a formula, estimate the area by counting the small squares of the graph paper beneath the curve. Both approaches are computing exactly the same quantity — the integral ∫F dx\int F\,dx — just with different tools depending on what information you are given.

What happens if the force is constant after all — does this formula still work?

Yes, and it should reduce to the familiar case as a sanity check. If FF does not depend on xx at all, the integral ∫xixfF dx\int_{x_i}^{x_f} F\,dx simply pulls the constant FF outside, leaving F (xf−xi)=FdF\,(x_f - x_i) = F d, exactly the constant-force result W=FdW = Fd (with cos⁡θ=1\cos\theta = 1 for a force purely along the direction of motion). The area-under-the-graph picture agrees too: a constant FF plotted against xx is a horizontal line, and the area under a horizontal line over a displacement dd is just the rectangle F×dF \times d. The variable-force formula is the general case; the constant-force formula is what it becomes when the graph happens to be flat.

Why does this topic matter beyond just solving integrals — where does it show up later?

This is the calculation engine behind potential energy. The spring energy formula U=12kx2U = \tfrac12 kx^2, used repeatedly for elastic collisions and oscillations later in the year, is nothing but the triangular area computed in the board-level worked example here. The work-energy theorem for a variable force, covered in the article right before this one, and the general definition of potential energy as "negative work done by a conservative force," both lean on exactly this area-under-the-graph reasoning. Getting comfortable setting up and evaluating ∫F dx\int F\,dx now saves a great deal of re-derivation later.

Before this

Where this leads