Constant forces are the exception rather than the rule in the physical world. A spring stiffens as it stretches, gravity weakens with altitude, and the drag on a falling body grows with speed. Once the applied force changes from point to point, the elementary recipe ##W = F\,d## collapses, because there is no single value of ##F## to multiply by the displacement. The remedy is one of the most elegant ideas in mechanics: slice the motion into infinitesimal steps, treat the force as constant within each step, and add the contributions. That limiting sum is a definite integral, and it converts a bookkeeping problem into geometry — the work done becomes the area under the force–displacement curve.
This lesson develops that idea carefully, beginning with the rectangular-strip approximation and passing to the exact integral ##W = \int_{x_i}^{x_f} F(x)\,dx##. Two worked cases anchor the method: a force that decreases linearly with distance, mirroring the tired woman pushing a trunk across a railway platform, and a force that falls off as the inverse of position. Beyond the core derivation, the discussion widens to force fields, the one-dimensional line integral and its three-dimensional generalisation, sinusoidal and quadratic forces, the sign conventions that make negative work meaningful, and the persistent error of replacing a varying force with its average.
Because this lesson sits between the work–energy theorem for constant forces and its general proof, the treatment is deliberately staged. Everything here prepares the ground for showing that ##K_f - K_i = W## survives when the force varies, a result whose derivation belongs to the next lesson. Learners at senior secondary or introductory undergraduate level will find the mathematics familiar — integration is the only new tool — but the physical reasoning about paths, signs and areas is where genuine understanding is built.
On This Page
From Rectangles to Integrals: The Logic of Variable Work
The starting point is a graph. Plot the force component along the direction of motion against position, and the curve tells you everything the force does. Over a tiny displacement ##\Delta x##, the force barely changes, so the work contributed is approximately ##\Delta W = F(x)\,\Delta x## — the area of a thin rectangle of height ##F(x)## and width ##\Delta x##. Stacking successive rectangles from ##x_i## to ##x_f## gives the total work as the sum ##W \simeq \sum_{x_i}^{x_f} F(x)\,\Delta x##, an approximation that improves as the strips narrow.
Letting ##\Delta x \to 0## turns the sum into a definite integral, and the staircase of rectangles into the smooth region beneath the curve. The exact statement is
This is the central formula of the lesson. It says that work is a signed area: regions above the position axis count positively, regions below count negatively. The integral also handles the awkward case where the force reverses direction mid-path, because the sign of ##F(x)## is carried inside the integrand rather than patched on afterwards.
Reading the Force–Displacement Graph
A force–displacement graph is a compact physical document. Its height at any point gives the instantaneous force, its slope indicates how rapidly the force is changing, and the area between the curve and the axis gives the work. When the curve crosses the axis, the force momentarily vanishes and then reverses, so the work accumulated beyond that crossing subtracts from what came before. Recognising these features lets a student estimate work qualitatively before writing a single integral, which is a powerful check on any algebraic answer.
Consider a force that is constant at 100 N for the first 10 m and then declines linearly to 50 N over the next 10 m. The graph is a rectangle followed by a trapezium. The rectangle contributes ##100 \times 10 = 1000\ \text{J}##; the trapezium contributes ##\tfrac{1}{2}(100 + 50)\times 10 = 750\ \text{J}##. The total work is 1750 J, obtained entirely by geometry, with no calculus required because the pieces are simple shapes.
Why the Average Force Is a Trap
A tempting shortcut is to compute the average force and multiply by the total displacement. For the example above, the arithmetic mean of the two segments is not the correct average, and even the properly weighted mean fails in general. The mean-value theorem for integrals guarantees some value ##\bar{F}## for which ##W = \bar{F}(x_f - x_i)##, but that value depends on the shape of the curve and is rarely the simple arithmetic average. For a linearly varying force the average is the midpoint value, which happens to work; for a quadratic or sinusoidal force it does not.
The error matters because it silently corrupts energy budgets. A spring stretched from 0 to ##x## exerts a force ##kx## that ranges from zero to ##kx##; the arithmetic average is ##kx/2##, and multiplying by ##x## gives ##\tfrac{1}{2}kx^2##, which is correct only by coincidence of linearity. Replace the spring law with ##F = kx^2## and the same shortcut yields ##\tfrac{1}{2}kx^3## instead of the true ##\tfrac{1}{3}kx^3## — a fifty per cent overestimate that no amount of careful arithmetic can repair.
Worked Example: A Linearly Decreasing Force
The reference scenario is worth reconstructing in full because it combines two forces acting simultaneously. A woman pushes a trunk across a rough railway platform, applying 100 N over the first 10 m. She then tires, and her applied force falls linearly with distance until it reaches 50 N at the 20 m mark. Friction, meanwhile, is a constant 50 N directed opposite to the motion. The task is to find the work done by each force over the full twenty metres and to interpret the result physically.
The applied force traces a rectangle of height 100 N and width 10 m, followed by a trapezium whose parallel sides are 100 N and 50 N with a width of 10 m. The rectangle gives 1000 J and the trapezium gives ##\tfrac{1}{2}(100 + 50)\times 10 = 750\ \text{J}##, so the woman does 1750 J of positive work. Friction, acting at ##-50\ \text{N}## across the whole 20 m, does ##(-50)\times 20 = -1000\ \text{J}##. The net work is therefore 750 J, which by the work–energy theorem appears as kinetic energy of the trunk.
Setting Up the Integral Formally
The same answer follows from integration, and doing it formally builds the habit needed for less friendly force laws. For ##0 \le x \le 10##, ##F = 100\ \text{N}##, so the integral is simply ##100 \times 10##. For ##10 < x \le 20##, the force obeys ##F(x) = 100 - 5(x - 10)##, since it drops 50 N over 10 m, giving a slope of ##-5\ \text{N\,m}^{-1}##. Integrating this linear expression from 10 to 20 reproduces the trapezium area of 750 J, confirming that the geometric and calculus routes agree.
Writing the full computation as a single expression makes the structure transparent:
Notice that the force at ##x = 20\ \text{m}## is 50 N, not zero. The woman has not stopped pushing; she has merely weakened. Students often assume a linearly decreasing force must reach zero at the end of the motion, and that assumption distorts the trapezium into a triangle, producing 500 J instead of 750 J for the second segment. Reading the problem statement carefully prevents this.
Interpreting the Negative Work of Friction
Friction's contribution is negative because the force points opposite to the displacement. The area representing frictional work lies below the position axis, and the integral automatically assigns it a minus sign through the negative value of ##F(x)##. This is not a bookkeeping convention but a physical statement: friction removes mechanical energy from the trunk, converting it into thermal energy at the contact surface. The magnitude, 1000 J, quantifies that transfer.
The net work of 750 J is what remains available to accelerate the trunk. If the trunk started from rest, its final kinetic energy would be 750 J, and its final speed would follow from ##\tfrac{1}{2}mv_f^2 = 750##. This is precisely the work–energy theorem at work, and it holds even though one of the forces varied with position — a point the next lesson will prove rigorously rather than assume.
Worked Example: A Force Inversely Proportional to Position
Not every variable force is linear, and the inverse law ##F(x) = k/x## is the standard second example because its integral introduces a logarithm. Suppose a force of this form acts along the positive ##x##-axis with ##k = 200\ \text{N\,m}##, and the object moves from ##x_i = 2\ \text{m}## to ##x_f = 8\ \text{m}##. The work done is the definite integral of ##k/x## over that interval, which evaluates to ##k\ln(x_f/x_i)##. Substituting the numbers gives ##200\ln 4 \approx 200 \times 1.386 \approx 277\ \text{J}##.
The logarithmic dependence carries a physical message. Equal successive doublings of distance contribute equal amounts of work, so moving from 2 m to 4 m does the same work as moving from 4 m to 8 m, namely ##200\ln 2 \approx 139\ \text{J}## each. The force weakens, but the path lengthens in exactly compensating proportion. This behaviour appears in gravitational and electrostatic contexts, where the ##1/r^2## force produces a ##1/r## potential, and the logarithmic case arises for line charges and long cylinders.
Handling the Singularity at the Origin
The function ##k/x## diverges as ##x \to 0##, so an integral starting at the origin is improper and may fail to converge. Physically, no real force grows without bound, and the inverse law is only an approximation valid over a restricted range. When setting up such problems, always check that the interval of integration lies strictly away from the singularity. If it does not, the model has broken down and a different force law must be used near the origin.
For the interval from 2 m to 8 m there is no difficulty, and the logarithm is well behaved. The lesson for problem solvers is to inspect the integrand before integrating: a quick sketch of ##F(x)## reveals divergences, zeros and sign changes that determine whether the integral is straightforward, improper, or physically meaningless. This preliminary scan is the single most effective defence against wasted algebra.
Additional Cases: Quadratic and Sinusoidal Forces
A force ##F = kx^2## with ##k = 3\ \text{N\,m}^{-2}## acting from ##x = 0## to ##x = 2\ \text{m}## does work ##\int_0^2 3x^2\,dx = [x^3]_0^2 = 8\ \text{J}##. The arithmetic-average shortcut would have given ##\tfrac{1}{2}(0 + 12)\times 2 = 12\ \text{J}##, a fifty per cent error, because the parabola bulges below its chord. The exact answer is smaller than the average-force estimate whenever the force curve is concave upward, and larger when it is concave downward — a useful qualitative rule.
A sinusoidal force ##F = F_0\sin(bx)## behaves differently again. Over a full period the positive and negative lobes cancel exactly, so the net work is zero even though the force has been busy throughout. Over a half-period, the work is ##2F_0/b##, a finite positive quantity. This cancellation is the mathematical origin of the statement that conservative forces do no net work around a closed loop, a theme that dominates the study of potential energy later in the course.
Force Fields, Paths and the Line Integral
A force field assigns a force vector to every point in space. Gravity, electrostatics and fluid drag are all fields, and the work done on a particle moving through a field depends on the path taken as well as the endpoints. In one dimension the path is forced — the particle can only move forward or backward along the axis — so the line integral reduces to the ordinary definite integral already derived. The general definition, ##W = \int \vec{F}\cdot d\vec{r}##, is the natural extension, and the dot product ensures that only the component of force along the displacement contributes.
In three dimensions the integral becomes a sum of three one-dimensional integrals, one per coordinate, each weighted by the corresponding component of force. For a path parameterised by time, ##d\vec{r} = \vec{v}\,dt##, and the work becomes ##\int \vec{F}\cdot\vec{v}\,dt##, which is the integral of instantaneous power over time. This equivalence between the spatial and temporal formulations is a recurring theme: work is the accumulation of power, just as displacement is the accumulation of velocity.
Path Dependence and Conservative Forces
For some fields the work depends only on the endpoints, not the route. These are conservative fields, and they admit a potential energy function whose difference equals the negative of the work done. Gravity and the ideal spring are the canonical examples. For other fields — friction, air resistance, viscous drag — the work depends on the path length, and no potential energy can be defined. Recognising which category a force belongs to determines whether energy methods can be used or whether the full integral must be evaluated.
The one-dimensional integral conceals this distinction because there is only one path between two points on a line. The distinction becomes visible only in two or three dimensions, where a particle can wander. A useful test is to compute the work around a closed loop: if it vanishes for every loop, the force is conservative. The sinusoidal force examined earlier passes this test over a full period, which is why it can be associated with a periodic potential.
Sign Conventions and Negative Work
Work is negative whenever the force has a component opposite to the displacement. The integral handles this automatically: if ##F(x)## is negative over a stretch where ##dx## is positive, the contribution is negative. Friction on the sliding trunk is the clearest illustration, contributing ##-1000\ \text{J}## while the woman contributes ##+1750\ \text{J}##. The net work, 750 J, is the algebraic sum, and it is this net value that enters the work–energy theorem.
Students sometimes try to force all work to be positive by taking magnitudes. This destroys the energy accounting. A negative work term represents energy leaving the mechanical system, usually as heat or sound, and omitting the sign produces a spurious energy surplus. The discipline of keeping signs inside the integrand, rather than fixing them afterwards, is the reliable habit.
We Also Published
Springs, Energy Storage and the Work–Energy Theorem
The ideal spring is the archetype of a variable force. Hooke's law states ##F = -kx##, where the minus sign records that the force always opposes the extension. To stretch the spring from 0 to ##x##, an external agent must apply ##+kx##, and the work done by that agent is ##\int_0^x kx'\,dx' = \tfrac{1}{2}kx^2##. This quantity is stored as elastic potential energy and is recovered when the spring is released. The spring force itself does negative work during the stretch, equal in magnitude and opposite in sign.
The spring example also exposes a subtlety about reference points. The integral ##\int_{x_i}^{x_f} kx\,dx = \tfrac{1}{2}k(x_f^2 - x_i^2)## depends only on the endpoints, confirming that the spring force is conservative. Choosing ##x_i = 0## as the natural reference makes the stored energy ##\tfrac{1}{2}kx^2##, but any other reference is equally valid provided it is used consistently. The physics lies in differences of potential energy, never in the absolute value at a single point.
Extending the Theorem to Variable Forces
The work–energy theorem states that the net work done on a particle equals its change in kinetic energy. For a variable force, the proof begins with Newton's second law written as ##F = m\,dv/dt## and uses the chain rule to convert the time derivative into a spatial one: ##m\,dv/dt = mv\,dv/dx##. Integrating both sides with respect to ##x## gives ##\int F\,dx = \int mv\,dv = \tfrac{1}{2}mv_f^2 - \tfrac{1}{2}mv_i^2##, which is exactly ##W = K_f - K_i##.
This derivation is the bridge to the next lesson, where it is presented in full. The essential point for now is that nothing in the argument requires the force to be constant; the integral absorbs the variation. The theorem is therefore an integral form of Newton's second law, trading instantaneous detail for a statement about the cumulative effect of a force over a displacement. That trade is what makes energy methods so powerful in problems where the force law is complicated but the endpoints are known.
Common Pitfalls and How to Avoid Them
The most frequent error is the average-force shortcut, already illustrated with the quadratic law. A second is forgetting that the area below the axis is negative, which leads to adding frictional work instead of subtracting it. A third is misreading the limits of integration, particularly when the force changes form partway along the path, as in the trunk problem where the applied force switches from constant to linear at ##x = 10\ \text{m}##. Each segment needs its own integral.
A fourth pitfall is treating the work done by the applied force and the work done by the net force as interchangeable. They are not. The woman does 1750 J, friction does ##-1000\ \text{J}##, and only the net 750 J changes the trunk's kinetic energy. Confusing the two produces energy statements that violate conservation. A fifth is neglecting units: force in newtons, displacement in metres, work in joules, and the slope of a force–displacement graph in ##\text{N\,m}^{-1}##.
Computational Practice and Real-World Contexts
Numerical integration is the practical fallback when a force law has no elementary antiderivative. The trapezoidal rule approximates the area under ##F(x)## by summing trapezium areas between sample points, and its accuracy improves as the spacing shrinks. The following Python snippet evaluates the work done by the inverse force ##F = k/x## between two limits, comparing the exact logarithmic result with a numerical estimate. Running it with different step counts shows the convergence directly.
import math
def work_inverse(k, xi, xf, n=1000):
dx = (xf - xi) / n
total = 0.0
for i in range(n):
x_left = xi + i * dx
x_right = x_left + dx
f_left = k / x_left
f_right = k / x_right
total += 0.5 * (f_left + f_right) * dx
return total
k = 200.0
exact = k * math.log(8.0 / 2.0)
approx = work_inverse(k, 2.0, 8.0, n=10000)
print(f"Exact: {exact:.3f} J")
print(f"Numerical: {approx:.3f} J")
The output confirms that the numerical estimate converges to 277 J as the step count rises. This is the same limiting process that defines the integral, executed by a machine rather than by hand. In engineering practice, force–displacement data from sensors is almost always integrated numerically, and the trapezoidal rule is the standard first tool. Understanding the underlying limit makes the numerical result trustworthy rather than mysterious.
Where Variable Work Appears in Engineering
Vehicle braking is a variable-force problem: the braking force grows with pedal pressure and with speed-dependent friction, so the stopping distance follows from integrating the deceleration over the path. Wind turbines extract energy from a fluid whose force on the blades varies with wind speed and blade angle, and the annual energy yield is an integral over the wind-speed distribution. Even the compression of a gas in a cylinder is a variable-force process, with the work given by ##\int P\,dV## rather than ##\int F\,dx##.
These contexts share a common structure: a force that changes with position, a path along which it acts, and a need to accumulate the contributions. The mathematics developed here transfers directly. Recognising the pattern is more valuable than memorising any single formula, because the same integral appears under many different physical names — work, energy yield, pressure–volume work, and electrical energy dissipation among them.
Preparing for the General Proof
The next lesson takes the result sketched here and proves it rigorously for an arbitrary variable force. The key step is the chain-rule manipulation ##F = m\,dv/dt = mv\,dv/dx##, followed by integration over position. The present lesson has supplied the integral machinery and the physical intuition; the next supplies the formal theorem and its consequences. Together they complete the bridge from Newton's second law to the energy methods that dominate the rest of the course.
Before moving on, consolidate the essentials: work is the area under the force–displacement curve, computed exactly by ##W = \int_{x_i}^{x_f} F(x)\,dx##; the sign of the integrand carries the sign of the work; piecewise forces require piecewise integrals; and the average-force shortcut is valid only for linear force laws. With these in hand, the general theorem will read as a natural consequence rather than a new idea.
From our network :
- Do You Need a New Router or Is Your Internet Plan the Problem?A practical comparison of the signs that point to router limits versus signs your broadband speed or provider is the bottleneck, so you can decide what to replace before spending money.
- 10 Physics Numerical Problems with Solutions for IIT JEEPrepare for IIT JEE with 10 physics numerical problems, complete with detailed solutions and conceptual explanations. Ideal for mastering kinematics, thermodynamics, electromagnetism, and optics.
- Where to Put Your Wireless Router for Better CoverageA practical, physics-grounded guide to router placement: why the centre of the home beats the corner, how walls and metal sap signal, and how to run a simple survey that proves the improvement.
- 98% of Global MBA Programs Now Prefer GRE Over GMAT Focus EditionExplore why 98% of global MBA programs now prefer the GRE over GMAT Focus. Learn about the shorter GRE format, verbal logic importance, and strategic versatility for students.
- EV 2.0: The Solid-State Battery Breakthrough and Global Factory ExpansionDiscover the impact of the Solid-State Battery Breakthrough on the EV market. Learn about CATL and BYD stock growth, global factory expansion in Europe, and the future of EV 2.0 technology.
- AI-Powered 'Precision Diagnostic' Replaces Standard GRE Score ReportsDiscover the new GRE Precision Diagnostic. Learn how AI-powered behavioral analytics and time-to-solve tracking are replacing standard GRE score reports to empower students.
- Analyzing Trump Deportation Numbers Insights Into The 2026 Immigration Crackdown
- Trump Political Strategy How Geopolitical Stunts Serve As Media Diversions
- How to Print Cheaply: Cutting the Cost per PageA practical, measured guide to lowering what each printed page costs — duplex and draft modes, third-party ink, yield mathematics, and knowing when a new printer beats refills.
RESOURCES
- Work Done by a Varying Force | 5.5 General Physics - YouTubeyoutube.comSep 29, 2023 ... Chad provides a lesson on Work done by a varying force. The lesson begins by revisiting the definition of work.…
- 6.3: Work Done by a Variable Force - Physics LibreTextsphys.libretexts.orgNov 5, 2020 ... The work done by a constant force of magnitude F on a point that moves a displacement d in the…
- Work Done by a Variable Force | CK-12 Foundationflexbooks.ck12.orgThe work done equals the area under the force-displacement curve from x i to x f . Positive work occurs where the force aids…
- Work Done by Variable Force Explained | PDF - Scribdscribd.comIt provides the following key points: 1) To calculate work done by a varying force, the force can be treated as constant over small…
- Work Done by a Variable Force | OER Commonsoercommons.orgWhen a varied force is applied uniformly to mass, the mass accelerates evenly, producing a straight line with a non zero slope. The work…
- Work Done by a time-variable Force - Physics Stack Exchangephysics.stackexchange.comDec 1, 2019 ... The left-hand side is a force (in Newton), the right-hand side is a duration (in seconds). This cannot work, and…
- Work Done By A Variable Force - BYJU'Sbyjus.comThus, for a variable force, the work done can be expressed as a definite integral of force over displacement for any system. Test Your…
- Work done by a variable force - ISC 11 · Physics - Fermifermi.aiWork done by a variable force ... A hand stretching a spring feels the pull grow stronger with every centimetre — the force is…
- Finding work done by variable force : r/AskPhysics - Redditreddit.comNov 21, 2018 ... So the end result is W=ϕ(end)-ϕ(start) (this equation is in essence given in the article for potential energy), with F(r)=-k/r2…
- To find work done by a variable force - Physics Forumsphysicsforums.comOct 20, 2023 ... Printed worked example of work done by a variable force: F = (x +. I am aware of how to…
- Work Done By Variable Force | SATHEE JEE - IIT Kanpursathee.iitk.ac.inWork done by a variable force is the amount of energy transferred to or from an object by a force that changes in magnitude…
- Work (physics) - Wikipediaen.wikipedia.orgWork done by a variable force is the line integral of its scalar tangential ... If the displacement as a variable of time is…
- 7. Work by a Variable Force using Integration - Interactive Mathematicsintmath.comWe learn how to use integration to calculate the work done by a variable force.
- 7.2 Work Done by a Varying Forceuoanbar.edu.iq7.2 Work Done by a Varying Force. Consider a particle being displaced along the x - axis under the action of a force that…
- Work Done by a Variable Force - GeeksforGeeksgeeksforgeeks.orgMar 11, 2026 ... These are called variable forces because they change depending on how or where they're applied. When such a force causes…