Physics I: Mechanics › Work & energy › full formula sheet

W = ∫x₁x₂ F(x) dx

Say it: “the work done by a variable force equals the integral of force over displacement — the area under the force-versus-position curve”

Work done by a variable force

When the push keeps changing — springs, rockets, drag — one formula can't cover it. Slice the motion thin, and the area under the curve does the rest.

F(x) is the force as a function of position (N), x₁ and x₂ the start and end positions (m). The integral adds up F Δx over every thin slice — work is still in joules.

Before this lesson: Work (constant force)

Where it comes from

A constant force is a luxury. Stretch a spring and the pull grows with every centimeter; fire a rocket and the thrust fades as fuel burns. No single F fits W = Fd cos θ anymore.

Before reading on: a spring's force grows from 0 to 60 N as you stretch it 0.3 m. Is the work done 60 × 0.3 = 18 J? Think about what the force was at the start of the stretch.

The verdict: 18 J is an overcharge. The force was near zero at the start — you only pushed hard near the end. Using the final force for the whole stretch pretends you fought 60 N from the first millimeter.

The fix is embarrassingly simple: slice the motion into thin pieces. Over a 1 mm slice the force barely changes, so each slice is a constant-force problem: ΔW ≈ F Δx. Add up all the slices and you get the exact answer — and that sum, in the limit of infinitely thin slices, is the integral:

W = ∫x₁x₂ F(x) dxthe sum of every thin slice's F Δx — and the area under the F-vs-x curveSay it: “work equals the integral of F d x from x one to x two”

Derivation

Start from the constant-force rule and let the slices shrink:

ΔWi
≈
F(xi) Δx
Step 1 — freeze each slice. Chop [x₁, x₂] into n thin slices of width Δx. On slice i the force is nearly constant at F(xi), so the constant-force rule applies: ΔWi ≈ F(xi) Δx.
W
≈
Σ F(xi) Δx
Step 2 — add the slices. Total work is the sum of the slice works. Each term is a thin rectangle on the F-vs-x graph — the sum is the total area under the curve, approximated.
=
∫x₁x₂ F(x) dx
Step 3 — shrink to zero. As n → ∞ and Δx → 0, the rectangles hug the curve exactly and the sum becomes the definite integral. ∎

The area picture is the whole game. If F(x) is a straight line, the area is a triangle or trapezoid — no calculus needed. Reserve the integral for curves that aren't made of straight lines.

How to use it

The procedure, every time:

  1. Write F as a function of x. F(x) = 3x, F(x) = 10 + 2x, F(x) = kx — whatever the physics gives you. No function, no integral.
  2. Check the limits. x₁ and x₂ are positions, and their order sets the sign: integrating backward (x₂ < x₁) flips the sign of W.
  3. Look at the graph first. Straight-line F(x)? Use geometry: rectangles, triangles, trapezoids. Curved? Integrate.
  4. Integrate term by term. ∫ xn dx = xn+1/(n+1) handles almost every Physics I case.
  5. Check with the area picture. Sketch F vs x and eyeball the area — it catches sign errors and wrong limits instantly.
Common mistake: plugging the endpoint force into W = Fd (the 18 J trap from the intro). For a varying force, Fd with any single F is wrong — slice it or integrate it.

Worked examples

Four problems, easiest first. Decide each time: geometry or integral?

Example 1 — power law: F(x) = 3x newtons, x = 0 → 4 m

  1. Set up. W = ∫₀⁴ 3x dx. (F grows linearly from 0 to 12 N.)
  2. Integrate. ∫ 3x dx = 3x²/2. Evaluate 0 → 4: 3·16/2 − 0 = 24 J.
  3. Check by area. Triangle with base 4 and height 12: ½ × 4 × 12 = 24 J. ✓
Common mistake: W = Fd = 12 × 4 = 48 J — using the endpoint force for the whole trip. The average force was only 6 N, not 12 N.
Your turn — F(x) = 2x, x = 0 → 5 m. W = ?

Answer: 25 J. ∫₀⁵ 2x dx = x²|₀⁵ = 25 J. (Area check: ½ × 5 × 10 = 25 J.)

Example 2 — offset line: F(x) = 10 + 2x, x = 0 → 3 m

  1. Set up. W = ∫₀³ (10 + 2x) dx. Force runs 10 N → 16 N.
  2. Integrate term by term. 10x + x², evaluated 0 → 3: (30 + 9) − 0 = 39 J.
  3. Check by area. Trapezoid: average height (10+16)/2 = 13, width 3: 13 × 3 = 39 J. ✓
Common mistake: integrating 2x to 2x² (forgetting to divide by 2). ∫ 2x dx = x², not 2x² — the power rule always divides by the new exponent.
Your turn — F(x) = 6 − x, x = 0 → 4 m. W = ?

Answer: 16 J. 6x − x²/2 from 0 to 4: (24 − 8) = 16 J.

Example 3 — pure geometry: force ramps 0 → 50 N over 4 m

  1. Look at the graph. F-vs-x is a straight line from the origin — the area is a triangle. No integral needed.
  2. Area. ½ × base × height = ½ × 4 × 50 = 100 J.
  3. Interpret. Equivalent to a constant 25 N (the average) over 4 m.
Common mistake: reaching for the integral when the picture is a triangle. Geometry is faster and far less error-prone — save calculus for actual curves.
Your turn — force ramps 0 → 30 N over 6 m. W = ?

Answer: 90 J. ½ × 6 × 30 = 90 J.

Example 4 — stretching a spring: F = kx, k = 200 N/m, x = 0 → 0.1 m

  1. Set up. The stretching force grows as F = kx. W = ∫₀0.1 200x dx.
  2. Integrate. 100x² evaluated 0 → 0.1: 100 × 0.01 = 1 J.
  3. Remember the pattern. ∫₀x kx dx = ½kx² — the spring's stored energy, covered fully on the spring potential page.
Common mistake: W = kx² (forgetting the ½) — i.e. charging the full final force over the whole stretch. The triangle's area is half the rectangle's.
Your turn — k = 100 N/m, stretch 0 → 0.2 m. W = ?

Answer: 2 J. ½ × 100 × 0.04 = 2 J.

Memorization tips

  • Say it aloud: “work is the area under the force-versus-position curve.” The picture is the formula.
  • Geometry first: straight-line forces are rectangles, triangles, trapezoids. Only integrate genuine curves.
  • The average-force shortcut: for a force that ramps linearly from F₁ to F₂, W = ½(F₁+F₂)Δx. One line, no calculus.
  • Limits set the sign: integrating from larger x to smaller x gives negative work — that's the force opposing the (backward) motion, not an error.
  • The ½ alarm: whenever force is proportional to x, expect a ½ in the answer. If your spring work has no ½, stop and recheck.
  • Eyeball the area: after integrating, sketch the curve and estimate the area. A factor-of-2 miss shows up immediately.

Final challenge

Five mixed questions — geometry vs integral, signs, and the spring trap. Score 5/5 and variable-force work is yours.

← Back to the Physics I formula sheet

How to learn a formula here

  1. Read each section in order — every section ends with a short quiz. Take it before moving on; the questions test exactly what you just read.
  2. Work the examples with the answers covered, then uncover one step at a time and compare.
  3. Finish with the final challenge — five mixed questions including the classic traps.
  4. Retake what you miss — every quiz reshuffles each attempt, and every answer explains itself.

Frequently asked questions

Why can't I just use W = Fd with the average force?

You can — W = Favgd is exactly right. The trap is using the endpoint force as if it were the average. The integral (or the area) is how you find the true average.

Is work the area under the curve even if F is negative?

Yes — area below the x-axis counts negative, matching the integral's sign. A force opposing the motion gives negative area, i.e. negative work.

When do I actually need calculus here?

When F(x) isn't made of straight lines — F = kx², drag forces like F = cv² rewritten in x, inverse-square gravity. Straight lines are geometry; curves are calculus.

What if the force varies with time instead of position?

Then W = ∫ F dx still holds, but you must convert: dx = v dt, so W = ∫ F(t) v(t) dt. Work is always accumulated over displacement, never over time directly.

How is this related to spring potential energy?

The work you do stretching a spring, ∫ kx dx = ½kx², gets stored as the spring's potential energy U = ½kx². Same area, two names — see the spring potential page.

More from the codex