Work - Integral Definition: Computing Work Along Arbitrary Paths

By Vegard Gjerde Based on Masterful Learning 12 min read
work-integral-definition work energy classical-mechanics physics learning-strategies calculus

The integral definition of work states that work is the line integral of force along a path: W=FdrW = \int \vec{F} \cdot d\vec{r}. It applies when the path is known and force is expressed as a function of position, allowing you to compute work for variable forces along curved or straight paths. Mastering it requires elaboration, retrieval practice, self-explanation, and problem solving—core strategies in the Unisium Study System.

This formulation generalizes the constant-force definition (W=FΔrW = \vec{F} \cdot \Delta\vec{r}) to situations where force varies continuously with position. It’s essential for computing work done by springs, gravitational fields over large distances, friction on inclines, and any scenario where you cannot treat force as constant over the displacement.

Work integral definition showing equation W equals integral of F dot dr with conditions for path known and force as function of position
The work integral W=FdrW = \int \vec{F} \cdot d\vec{r} valid when the path is known and force is a function of position.

On this page: The Principle | Conditions | Misconceptions | EE Questions | Retrieval Practice | Worked Example | Solve a Problem | FAQ


The Principle

Statement

The work done by a force F\vec{F} on an object moving along a path from position AA to position BB is the line integral of the component of force parallel to the displacement along that path. Mathematically, work is the accumulated product of force and infinitesimal displacement vectors, summed continuously over the entire trajectory.

Mathematical Form

W=ABFdrW = \int_A^B \vec{F} \cdot d\vec{r}

Where:

  • WW = work (energy unit: joules, J)
  • F\vec{F} = force vector as a function of position (newtons, N)
  • drd\vec{r} = infinitesimal displacement vector along the path (meters, m)
  • Fdr\vec{F} \cdot d\vec{r} = dot product, which gives the component of force parallel to displacement

The integral is evaluated along the specific curve or path the object follows from AA to BB.

Alternative Forms

In different contexts, this appears as:

  • 1D motion (straight line along xx-axis): W=xixfFxdxW = \int_{x_i}^{x_f} F_x\,dx
  • Time parametrization: W=titfFvdtW = \int_{t_i}^{t_f} \vec{F} \cdot \vec{v}\,dt (useful when force is easier to express as a function of time)

Conditions of Applicability

Condition: path known; force as function of position

This condition means:

  1. Path known: You must specify the exact trajectory r(t)\vec{r}(t) or curve the object follows. The integral depends on the path, not just the endpoints, unless the force is conservative.
  2. Force as function of position: You need an expression F(r)\vec{F}(\vec{r}) or F(x,y,z)\vec{F}(x, y, z) to perform the integration. If force depends on velocity or time in a complex way, you may need to convert to position dependence or use a different representation.

Practical modeling notes

  • For conservative forces (gravity, springs, electrostatic), work is path-independent and equals the negative change in potential energy. You can use any convenient path or skip the integral and use W=ΔUW = -\Delta U.
  • For non-conservative forces (friction, drag), work is path-dependent. You must integrate along the actual physical path.
  • If the force is constant over the displacement, the integral reduces to W=FΔrW = \vec{F} \cdot \Delta\vec{r} (simpler form).

When This Form Isn’t Usable

  • Force not expressible as F(r)\vec{F}(\vec{r}): If force depends primarily on velocity or time (e.g., velocity-dependent drag), you cannot easily evaluate the position integral. Switch to the time parametrization: W=FvdtW = \int \vec{F} \cdot \vec{v}\,dt.
  • Path unknown: If you don’t know which path the object takes, you cannot evaluate the line integral. For conservative forces, use W=ΔUW = -\Delta U instead. For non-conservative forces, you must determine or specify the path first.
  • Collision/impact scenarios: Often not usable because contact forces and micro-displacements aren’t modeled; prefer impulse-momentum methods and energy accounting with deformation models.

Want the complete framework behind this guide? Read Masterful Learning.


Common Misconceptions

Misconception 1: “Work always equals force times distance”

The truth: The simple formula W=FdW = Fd only applies when force is constant in magnitude and direction, and displacement is along a straight line parallel to the force. For variable forces or curved paths, you must use the integral definition.

Why this matters: Students often try to compute spring work as W=kxxW = kx \cdot x, which is dimensionally wrong and off by a factor of 2. The correct result is W=0xkxdx=12kx2W = \int_0^x kx'\,dx' = \frac{1}{2}kx^2.

Misconception 2: “The integral only matters for curved paths”

The truth: Even on a straight path, if the force magnitude or direction changes with position, you need the integral. For example, a spring force F=kxF = -kx varies with xx even though motion is 1D and straight.

Why this matters: Recognizing when force is position-dependent (not just path-dependent) is critical for choosing the right method.

Misconception 3: “Work by non-conservative forces is always negative”

The truth: Non-conservative forces like friction typically remove energy (negative work), but not always. For example, a person pushing a box does positive work (increasing kinetic energy) even though the applied force is non-conservative. The sign depends on whether force and displacement are aligned (positive work) or opposed (negative work).

Why this matters: Sign errors are common in energy problems. Always check whether force and displacement point in the same or opposite directions.


Elaborative Encoding

Use these questions to build deep understanding. (See Elaborative Encoding for the full method.)

Within the Principle

  • What does the dot product Fdr\vec{F} \cdot d\vec{r} physically represent? Why does the perpendicular component of force contribute zero work?
  • How do the units of the integrand (Nm\text{N} \cdot \text{m}) give the unit of work (joules)?

For the Principle

  • How do you decide whether to use the integral definition or the simpler W=FΔrW = \vec{F} \cdot \Delta\vec{r}?
  • When the force is conservative (e.g., gravity, spring), why can you ignore the path and compute work from potential energy change alone?

Between Principles

  • How does the work integral relate to the constant-force work formula W=FΔrW = \vec{F} \cdot \Delta\vec{r}? (Hint: the integral reduces to the simple formula when force is constant.)

Generate an Example

  • Describe a situation where a force does positive work on part of a path and negative work on another part. How would the integral capture this?

Retrieval Practice

Answer from memory, then click to reveal and check. (See Retrieval Practice for the full method.)

State the principle in words: _____Work is the line integral of force along the path: the accumulated dot product of force and infinitesimal displacement.
Write the canonical equation: _____W=FdrW = \int \vec{F} \cdot d\vec{r}
State the canonical condition: _____path known; force as function of position

Worked Example

Use this worked example to practice Self-Explanation.

Problem

A spring with spring constant k=200N/mk = 200\,\text{N/m} is compressed from its natural length by x=0.15mx = 0.15\,\text{m}. How much work does the spring force do on the object attached to the spring as the spring returns to its natural length?

Step 1: Verbal Decoding

Target: WW (work by spring force)
Given: kk, xix_i, xfx_f
Constraints: spring force; motion along straight line from compressed to natural length

Step 2: Visual Decoding

Draw a 1D axis along the spring. Choose +x+x to the right. Mark xi=0.15mx_i = -0.15\,\text{m} (compressed, left of origin) and xf=0x_f = 0 (natural length, at origin). Draw the spring force Fs\vec{F}_s pointing toward +x+x while the object moves toward +x+x. (So xix_i is negative, xfx_f is zero, and both force and displacement point right.)

Step 3: Physics Modeling

  1. W=xixfFxdxW = \int_{x_i}^{x_f} F_x\,dx
  2. Fx=kxF_x = -kx

Step 4: Mathematical Procedures

  1. W=xixf(kx)dxW = \int_{x_i}^{x_f} (-kx)\,dx
  2. W=k[x22]xixfW = -k \left[ \frac{x^2}{2} \right]_{x_i}^{x_f}
  3. W=k2(xf2xi2)W = -\frac{k}{2} \left( x_f^2 - x_i^2 \right)
  4. W=k2(xi2xf2)W = \frac{k}{2} \left( x_i^2 - x_f^2 \right)
  5. W=200N/m2((0.15m)2(0m)2)W = \frac{200\,\text{N/m}}{2} \left( (0.15\,\text{m})^2 - (0\,\text{m})^2 \right)
  6. W=2.25J\underline{W = 2.25\,\text{J}}

Step 5: Reflection

  • Units: N/mm2=Nm=J\text{N/m} \cdot \text{m}^2 = \text{N} \cdot \text{m} = \text{J}
  • Magnitude: A few joules for a small compression of a stiff spring is reasonable.
  • Limiting case: If xi=0x_i = 0 (no compression), then W=0W = 0, which makes sense—no displacement, no work.

Before moving on: self-explain the model

Try explaining Step 3 out loud (or in writing): why the work integral applies, what the spring force equation means, and how the integral sums up infinitesimal contributions of force over the changing displacement.

Physics model with explanation (what “good” sounds like)

Principle: The work integral applies because the spring force F=kxF = -kx varies with position.

Conditions: The path is known (straight line along xx-axis) and force is a function of position (F(x)=kxF(x) = -kx).

Relevance: We cannot use W=FdW = Fd because FF is not constant. The integral accounts for the fact that the spring force increases in magnitude as the spring is compressed, then decreases to zero at the natural length.

Description: The spring force does positive work because force and displacement are in the same direction: the spring is compressed to the left (x<0x < 0), and the spring force points to the right (restoring force), while the object moves to the right (toward x=0x = 0). The dot product FxdxF_x\,dx is positive throughout.

Goal: We integrate Fx=kxF_x = -kx from xi=0.15mx_i = -0.15\,\text{m} to xf=0x_f = 0 to find the total work. The result W=12kxi2W = \frac{1}{2}kx_i^2 is the change in spring potential energy (spring releases energy as it un-compresses).


Solve a Problem

Apply what you’ve learned with Problem Solving.

Problem

A force Fx=(6N/m2)x2F_x = (6\,\text{N/m}^2)x^2 acts on a particle as it moves along the xx-axis from x=1mx = 1\,\text{m} to x=3mx = 3\,\text{m}. Calculate the work done by this force.

Hint: Set up the 1D work integral W=xixfFxdxW = \int_{x_i}^{x_f} F_x\,dx and integrate the given force function.

Show Solution

Step 1: Verbal Decoding

Target: WW
Given: FxF_x, xix_i, xfx_f
Constraints: 1D motion; force as function of position

Step 2: Visual Decoding

Draw a 1D axis. Choose +x+x to the right. Mark xi=1mx_i = 1\,\text{m} and xf=3mx_f = 3\,\text{m} on the axis. Draw a motion arrow from xix_i to xfx_f. FxF_x is positive throughout. (So both positions are positive and force is parallel to displacement.)

Step 3: Physics Modeling

  1. W=xixfFxdxW = \int_{x_i}^{x_f} F_x\,dx
  2. Fx=(6N/m2)x2F_x = (6\,\text{N/m}^2)x^2

Step 4: Mathematical Procedures

  1. W=xixf(6N/m2)x2dxW = \int_{x_i}^{x_f} (6\,\text{N/m}^2)x^2\,dx
  2. W=(6N/m2)[x33]xixfW = (6\,\text{N/m}^2) \left[ \frac{x^3}{3} \right]_{x_i}^{x_f}
  3. W=(2N/m2)[x3]xixfW = (2\,\text{N/m}^2) \left[ x^3 \right]_{x_i}^{x_f}
  4. W=(2N/m2)(xf3xi3)W = (2\,\text{N/m}^2) \left( x_f^3 - x_i^3 \right)
  5. W=(2N/m2)((3m)3(1m)3)W = (2\,\text{N/m}^2) \left( (3\,\text{m})^3 - (1\,\text{m})^3 \right)
  6. W=(2N/m2)(26m3)W = (2\,\text{N/m}^2)(26\,\text{m}^3)
  7. W=52NmW = 52\,\text{N}\cdot\text{m}
  8. W=52J\underline{W = 52\,\text{J}}

Step 5: Reflection

  • Units: Force coefficient is N/m2\text{N/m}^2, integrated over m3\text{m}^3, giving Nm=J\text{N} \cdot \text{m} = \text{J}
  • Magnitude: The force increases from 6(1)2=6N6(1)^2 = 6\,\text{N} to 6(3)2=54N6(3)^2 = 54\,\text{N} over 2 meters. An average force around 25–30 N gives W5060JW \approx 50{-}60\,\text{J}, which matches.
  • Limiting case: If xi=xfx_i = x_f, the integral limits are the same and W=0W = 0 (no displacement, no work).

PrincipleRelationship to Work Integral
Constant-force work (W=FΔrW = \vec{F} \cdot \Delta\vec{r})Special case: the integral reduces to this when force is constant
Work-energy theoremNet work via this integral equals kinetic energy change: Wnet=ΔKW_{\text{net}} = \Delta K
Conservative forces and potential energyFor conservative forces, W=ΔUW = -\Delta U (path-independent shortcut)
Work (Constant Force)Algebraic form: constant force times displacement.

See Principle Structures for how to organize these relationships visually.


FAQ

What is the integral definition of work?

Work is the line integral of force along a path: W=FdrW = \int \vec{F} \cdot d\vec{r}. It generalizes the constant-force formula to situations where force varies with position.

When does the work integral apply?

It applies when the path is known and force is expressed as a function of position. This is required for variable forces (e.g., springs, position-dependent friction) and when you cannot treat force as constant.

What’s the difference between the work integral and W=FdW = Fd?

W=FdW = Fd is a special case valid only when force is constant in magnitude and direction, and motion is along a straight line. The integral definition handles variable forces and arbitrary paths.

What are the most common mistakes with the work integral?

  1. Forgetting that force must be expressed as F(r)\vec{F}(\vec{r}) (position-dependent) to integrate.
  2. Ignoring the path: for non-conservative forces, work depends on which path the object takes.
  3. Sign errors: not checking whether force and displacement are aligned (positive work) or opposed (negative work).

How do I know when to use the integral vs. the simple W=FΔrW = \vec{F} \cdot \Delta\vec{r}?

Use the integral when force varies with position (e.g., spring force F=kxF = -kx, gravitational force over large distances). Use the simple formula when force is constant over the entire displacement.

Is the work integral path-dependent?

Yes, in general. However, for conservative forces (gravity, springs, electrostatic), work is path-independent and equals the negative change in potential energy, so you can use any convenient path or skip the integral entirely.



How This Fits in Unisium

Unisium helps you master the integral definition of work through structured practice: elaborative encoding questions deepen your understanding of when and why the integral applies, retrieval prompts make the formula and conditions instantly accessible, and worked examples with self-explanation teach you to recognize force-position relationships and set up the integral correctly. Problem-solving sessions give you fluency in evaluating work integrals for springs, variable forces, and energy conservation scenarios.

Ready to master the work integral? Start practicing with Unisium or explore the full learning framework in Masterful Learning.

Masterful Learning book cover

Masterful Learning

The study system for physics, math, & programming that works: encoding, retrieval, self-explanation, principled problem solving, and more.

Read the book (opens in new tab) ISBN 979-8-2652-9642-9

Ready to apply this strategy?

Join Unisium and start implementing these evidence-based learning techniques.

Start Learning with Unisium Read More Guides

Want the complete framework? This guide is from Masterful Learning.

Learn about the book →