/

Work Calculus Calculator — Work as an Integral W=∫F(x)dx with Steps

Work Calculus Calculator — Work as an Integral W=∫F(x)dx with Steps
Calculus 2 Tool

Work Calculus Calculator — W = ∫F(x)dx

Calculate work done by variable forces using the definite integral W=∫F(x)dx — solving spring work problems (Hooke's law), chain/rope lifting problems, and liquid pumping problems that are standard in Calculus 2 courses — with full symbolic integration steps using the Fundamental Theorem of Calculus.

Work Calculus Calculator — W = ∫F(x)dx
ba F(x) dx = ?
3x²+2x, [0,4]→80J
10sin(x), [0,π]→20J
5x, [0,3]→22.5J
2eˣ, [0,2]→≈12.78J
100−10x, [0,10]→500J
F in N · x in m → W in J
Error

Work Done by Variable Force — W = ∫F(x)dx

W = — J
Integral Setup — W = ∫F(x)dx
Step-by-Step Working
F(x) vs x Graph — Shaded Area = Work Done

Shaded area under the F(x) curve from x=a to x=b equals the work done W = ∫F(x)dx

Energy Context
x₁x₀ k·x dx = ½k(x₁²−x₀²)
k=200, 0→0.3m → 9J
k=500, 0.1→0.4m → 37.5J
k=1000, 0→0.05m → 1.25J
k=150, 0→0.2m → 3J
k=300, 0.1→0.4m → 22.5J

x = 0 is natural length · positive x = stretched · negative x = compressed

Error

Spring Work — W = ½k(x₁² − x₀²)

W = — J
Calculate to see spring diagram
Step-by-Step — Spring Work Integral
d0 ρg(L−x) dx = ρg(Ld−d²/2)
L=10m, ρ=2, full lift → 980.7J
L=10m, ρ=3, full → 1471J
L=10m, ρ=3, lift 4m
L=5m, ρ=1.5, full lift
Error

Chain Lifting Work — W = ∫ρg(L−x)dx

W = — J
Calculate to see diagram
Step-by-Step — Chain Work Integral
h0 ρg·A(x)·(H−x) dx
Cylinder r=2, h=5, H=7 → ≈2.77MJ
Rectangle 3×4, h=5, H=6
Cone R=4, H_t=6, full
Error

Pumping Work — W = ∫ρg·A(x)·(H−x)dx

W = — J
Calculate to see tank diagram
Step-by-Step — Pumping Work Integral

Enter any F(x) function and bounds to visualize the area under the force-distance curve — this area IS the work done. The shaded region equals W = ∫F(x)dx — the work integral.

3x²+2x [0,4]
5x [0,3]
10sin(x) [0,π]
2eˣ [0,2]
100−10x [0,10]
Error

Work = Area Under Force-Distance Graph

W = — J
F(x) vs x — Area Under Curve = Work Done

Violet shading = positive work (force and displacement in same direction) · Red = negative work

Work as an Integral — Why W = ∫F(x)dx

This work calculus calculator computes work done by variable forces using the work integral W=∫F(x)dx — the fundamental connection between force and energy in calculus. When force is constant, work is simply W = F × d. But when force varies with position — as in spring compression, chain lifting, and liquid pumping — you need the integral of force over the displacement to get the exact work done.

The idea is elegantly simple: divide the path from x=a to x=b into tiny segments dx. On each segment, the force is approximately constant at F(x). The work done on that tiny segment is dW = F(x)dx. Total work = integral of force over all segments:

W = ∫[a to b] F(x) dx = lim(Σ F(xᵢ)Δx) The work formula integral — work = area under the F(x) curve from x=a to x=b

This is the definition of work done by a variable force: W=∫F(x)dx is not just a formula — it is the mathematical limit of summing infinitely many infinitesimal work contributions. The work equation integral answers the question: is work the integral of force? Yes — work is the integral of force with respect to distance.

Geometric meaning: work = area under the F(x) curve from x=a to x=b. When force and displacement point in the same direction (F(x) > 0), the area is positive and the work done is positive. When they oppose each other (F(x) < 0), the area is negative and work done is negative. The work formula calculus makes this precise through the definite integral.

The Force-Distance Graph — Area = Work

The F vs x graph (force-distance graph) is the central visual for understanding variable force work. Every shape under this graph tells a physical story:

  • Constant force (horizontal line): Rectangle with area F × d = W. The simplest case: W = Fd.
  • Spring force F=kx (line through origin): Right triangle with area ½ × base × height = ½ × d × (kd) = ½kd². This is exactly the spring work formula.
  • Variable force (any curve): Irregular area under the curve — computed by the work integral W = ∫F(x)dx.

Positive area (F and displacement same direction) = positive work done on the object. Negative area = negative work (force opposes motion). The area under the force-distance graph is always equal to the total work done by that force — this is why work calculus is so powerful.

Is work the integral of force? Yes. W = ∫[a to b] F(x) dx is the work done by a variable force F(x) as an object moves from position x=a to x=b. The integral of force with respect to distance gives work in Joules (N·m = J).

Spring Work — Hooke's Law W = ½kd²

The spring work problem is the most important example in work calculus 2. Hooke's Law states: F(x) = k × x — the spring force is proportional to displacement from natural length, where k is the spring constant (N/m). At x=0, force is zero; at x=d, force is kd. The force increases linearly.

W = ∫[0 to d] kx dx = [kx²/2]₀ᵈ = ½kd² Hooke's Law work integral — for compression/stretch from natural length to distance d

Why the factor ½? Because force starts at 0 and ends at kd — the average force is kd/2. Work = average force × distance = (kd/2) × d = ½kd². This connects perfectly to the triangular area under the F=kx line. For non-zero starting positions: W = ½k(x₁² − x₀²).

Example 1 — Spring Work: k=150 N/m, compress from 0 to 0.2m

  1. Hooke's Law: F(x) = 150x
  2. Work integral: W = ∫[0 to 0.2] 150x dx
  3. Antiderivative: ∫150x dx = 75x²
  4. Evaluate: W = [75x²]₀^0.2 = 75(0.04) − 0 = 3 J
  5. Check: W = ½ × 150 × (0.2)² = ½ × 150 × 0.04 = 3 J ✓

Example 2 — Spring Work: k=300 N/m, stretch from 0.1m to 0.4m

  1. F(x) = 300x
  2. W = ∫[0.1 to 0.4] 300x dx = [150x²]₀.₁^0.4
  3. W = 150(0.16) − 150(0.01) = 24 − 1.5 = 22.5 J
  4. Check: W = ½ × 300 × (0.16 − 0.01) = 150 × 0.15 = 22.5 J ✓

Example 3 — Car Suspension: k=1000 N/m, compress 0 to 0.05m

  1. F(x) = 1000x, W = ∫[0 to 0.05] 1000x dx
  2. W = [500x²]₀^0.05 = 500(0.0025) = 1.25 J

Lifting a Chain — Linear Mass Density Problems

The lifting chain problem is a classic calculus 2 work problem. A chain of length L and linear mass density ρ (kg/m) lies on the ground. As you lift it, the force needed decreases — less chain remains to be lifted. This is why work done by variable force requires the work integral.

Let x = distance the bottom of the chain has been lifted. The remaining hanging length is (L − x), with weight F(x) = ρg(L − x). The work integral for lifting the entire chain:

W = ∫[0 to L] ρg(L−x) dx = ρg[Lx − x²/2]₀ᴸ = ½ρgL² Chain work formula — full lift of chain with linear density ρ kg/m and length L m

Example 1 — Chain: L=10m, ρ=3 kg/m, lift entire chain

  1. F(x) = ρg(L−x) = 3 × 9.807 × (10−x) = 29.42(10−x) N
  2. W = ∫[0 to 10] 29.42(10−x) dx = 29.42[10x − x²/2]₀^10
  3. W = 29.42(100 − 50) = 29.42 × 50 = 1471 J
  4. Check: W = ½ρgL² = ½ × 3 × 9.807 × 100 = 1471 J ✓
  5. Alternative: lift center of mass (at L/2 = 5m): W = (30kg)(9.807)(5m) = 1471 J ✓

Example 2 — Chain: L=10m, ρ=3 kg/m, lift bottom 4m only

  1. d = 4m (partial lift), F(x) = 29.42(10−x)
  2. W = ∫[0 to 4] 29.42(10−x) dx = 29.42[10x − x²/2]₀^4
  3. W = 29.42(40 − 8) = 29.42 × 32 = 941.4 J

Example 3 — Chain: L=10m, ρ=2 kg/m, lift entire chain

  1. W = ½ρgL² = ½ × 2 × 9.807 × 100 = 980.7 J
  2. Equivalent to lifting center of mass: W = (20kg)(9.807)(5m) = 980.7 J ✓

Pumping Liquid — Tank Geometry Problems

The pumping liquid problem is the hardest standard work calculus 2 problem because it requires deriving F(x) from the tank geometry. The key formula is:

W = ∫[0 to h] ρg · A(x) · (H − x) dx A(x) = cross-section area at height x · (H−x) = distance to pump outlet · ρg = weight density

Example 1 — Cylindrical Tank: r=2m, water to h=5m, pump to H=7m

  1. A(x) = πr² = π(4) = 4π m² (constant)
  2. W = ρg·A·∫[0 to 5] (7−x) dx = 1000×9.807×4π×[7x−x²/2]₀^5
  3. = 123,271 × (35 − 12.5) = 123,271 × 22.5 = 2,773,597 J ≈ 2.77 MJ

Example 2 — Conical Tank: apex at bottom, R=4m at H=6m, full of water, pump to 6m

  1. At height x: radius r(x) = R·x/H_tank = 4x/6 = 2x/3
  2. A(x) = π(2x/3)² = 4πx²/9
  3. W = ρg·(4π/9)·∫[0 to 6] x²(6−x) dx
  4. ∫x²(6−x) dx = ∫(6x²−x³) dx = 2x³ − x⁴/4
  5. Evaluated 0 to 6: 2(216) − 1296/4 = 432 − 324 = 108
  6. W = 1000×9.807×(4π/9)×108 ≈ 1,478,000 J ≈ 1.48 MJ

Example 3 — Rectangular Tank: 3m×4m, water to h=5m, pump to H=6m

  1. A(x) = 3 × 4 = 12 m² (constant)
  2. W = 1000×9.807×12×∫[0 to 5] (6−x) dx = 117,684×[6x−x²/2]₀^5
  3. = 117,684×(30 − 12.5) = 117,684×17.5 = 2,059,470 J ≈ 2.06 MJ

How to Set Up a Work Integral — Step-by-Step

Follow this five-step method for any work calculus problem — spring, chain, pumping, or variable force:

  1. Draw a diagram and label coordinates. Choose x as the direction of motion. Label the start and end positions.
  2. Identify F(x) — the force as a function of position. For springs: F(x)=kx. For chains: F(x)=ρg(L−x). For pumping: F(x)=ρg·A(x)·(H−x).
  3. Identify limits of integration a and b — where motion starts and ends.
  4. Write the work integral: W = ∫[a to b] F(x) dx
  5. Evaluate using the Fundamental Theorem of Calculus: find the antiderivative, evaluate at b, subtract value at a.
Problem TypeF(x) expressionLimitsWork integral W=∫F(x)dx
Spring (Hooke's Law)kx[x₀, x₁]½k(x₁²−x₀²)
Chain lifting (full)ρg(L−x)[0, L]½ρgL²
Chain lifting (partial)ρg(L−x)[0, d]ρg(Ld−d²/2)
Pump (cylinder)ρg·πr²·(H−x)[0, h]ρgπr²(Hh−h²/2)
Pump (cone, apex↓)ρg·π(Rx/H_t)²·(H−x)[0, h]ρgπ(R/H_t)²·(Hh³/3−h⁴/4)
Variable forceany F(x)[a, b]∫[a to b] F(x) dx

Worked Examples — 8 Complete Calculus 2 Work Problems

1. Spring: k=150 N/m, compress from 0 to 0.2m

  1. F(x) = 150x, W = ∫[0 to 0.2] 150x dx = [75x²]₀^0.2
  2. W = 75(0.04) − 0 = 3 J

2. Spring: k=300 N/m, stretch from 0.1m to 0.4m

  1. W = ∫[0.1 to 0.4] 300x dx = [150x²]₀.₁^0.4 = 150(0.16)−150(0.01)
  2. W = 24 − 1.5 = 22.5 J

3. Chain: L=10m, ρ=3 kg/m, lift entirely

  1. W = ½ρgL² = ½ × 3 × 9.807 × 100 = 1471 J

4. Chain: L=10m, ρ=3 kg/m, lift bottom 4m

  1. W = ρg(Ld − d²/2) = 3×9.807×(10×4 − 16/2) = 29.42×32 = 941.4 J

5. Cylindrical tank: r=2m, h=5m water, pump to H=7m above bottom

  1. A=4π, W = 1000×9.807×4π×(7×5 − 25/2) = 123,271×22.5 = 2,773,597 J ≈ 2.77 MJ

6. Conical tank: apex at bottom, base R=4m at height 6m, full, pump to 6m

  1. A(x) = π(4x/6)² = 4πx²/9
  2. W = 1000×9.807×(4π/9)×∫[0 to 6] x²(6−x)dx = 9807×4π/9×108 ≈ 1,478,000 J

7. Variable force: F(x)=3x²+2x from x=1 to x=3

  1. W = ∫[1 to 3] (3x²+2x) dx = [x³+x²]₁^3
  2. W = (27+9) − (1+1) = 36 − 2 = 34 J

8. Variable force: F(x)=10sin(πx/2) from x=0 to x=1

  1. W = ∫[0 to 1] 10sin(πx/2) dx = 10×[−cos(πx/2)/(π/2)]₀^1
  2. W = (20/π)[−cos(π/2)+cos(0)] = (20/π)[0+1] = 20/π ≈ 6.366 J

Common Mistakes in Calculus Work Problems

Mistake 1 — Wrong coordinate system for pumping problems

  • ❌ Wrong: x measured inconsistently — sometimes from top, sometimes from bottom
  • ✅ Correct: Always define x explicitly (e.g., "x = height from tank bottom, 0 ≤ x ≤ h")

Mistake 2 — Wrong "distance to pump" expression

  • ❌ Wrong: If x is height from bottom and pump is at height H, using distance = x
  • ✅ Correct: Distance to pump = H − x (liquid at height x must travel H − x upward)

Mistake 3 — Chain weight not decreasing as chain is lifted

  • ❌ Wrong: Using F = ρgL (constant) for the entire lift
  • ✅ Correct: F(x) = ρg(L−x) — as x increases, less chain hangs below, force decreases

Mistake 4 — Wrong limits of integration

  • ❌ Wrong: ∫[0 to H] for pumping when tank is only filled to height h < H
  • ✅ Correct: ∫[0 to h] — limits represent the physical range of the liquid, not the pump height

Mistake 5 — Forgetting ρ×g (using mass instead of weight)

  • ❌ Wrong: W = ∫ρ·A(x)·(H−x) dx (missing g)
  • ✅ Correct: W = ∫ρg·A(x)·(H−x) dx — weight = mass × g = ρ×A×dx×g

Frequently Asked Questions — Work Calculus

Why is work the integral of force?
Work is the integral of force because when force varies with position, you cannot simply multiply F×d. Instead, divide the path into tiny segments dx where force is approximately constant, compute work on each segment as F(x)dx, and sum all segments: W = ∫F(x)dx. The integral gives the exact total work done by the variable force.
How do you calculate work for a variable force?
For a variable force F(x): (1) Write W = ∫[a to b] F(x) dx. (2) Find the antiderivative F_anti(x). (3) Apply the Fundamental Theorem: W = F_anti(b) − F_anti(a). Units: if F in Newtons and x in meters, W is in Joules. This work calculus calculator handles all steps symbolically.
What is the formula for spring work?
Spring work (Hooke's Law): W = ∫[x₀ to x₁] kx dx = ½k(x₁² − x₀²). From natural length (x₀=0): W = ½kd². The factor ½ appears because spring force increases linearly from 0 to kd — average force is kd/2 — so work = (kd/2)×d = ½kd².
How do you set up a work integral for pumping liquid?
For pumping: (1) Set x = height from tank bottom. (2) Find A(x) = cross-sectional area at height x. (3) Weight of slice at x: dF = ρg·A(x)·dx. (4) Distance to pump outlet at height H: distance = H − x. (5) W = ∫[0 to fill_level] ρg·A(x)·(H−x) dx. The key is identifying A(x) from the tank shape.
What does the area under an F-x graph represent?
The area under the force-distance graph (F vs x graph) from x=a to x=b equals the work done by the force: W = ∫F(x)dx = area under the curve. For constant force: rectangle. For spring F=kx: triangle with area ½kd². For any variable force: the definite integral gives the exact area and hence the exact work done.
What is Hooke's Law?
Hooke's Law states F(x) = k×x — the spring restoring force is proportional to displacement x from natural length, with spring constant k (N/m). Work calculus uses this to derive W = ½kd² by evaluating ∫[0 to d] kx dx = [kx²/2]₀ᵈ = ½kd². Hooke's Law is the foundation of all spring work problems in calculus 2.
How do you find work for a chain lifting problem?
For a chain: (1) Let x = distance bottom has been lifted. (2) Weight of remaining chain = ρg(L−x). (3) W = ∫[0 to d] ρg(L−x) dx = ρg[Lx − x²/2]₀ᵈ. For full lift (d=L): W = ½ρgL². Equivalent to raising the center of mass (at L/2) of the entire chain: W = (ρL)g(L/2) = ½ρgL².
What are the limits of integration in a work problem?
The limits of integration represent the physical range of motion: W = ∫[a to b] F(x) dx. Spring: a=initial displacement, b=final displacement. Chain: a=0 (chain at ground), b=lift distance d. Pumping: a=0 (tank bottom), b=fill level h. Always choose limits that match the physical range of the variable x defined in your setup.

Related Calculators

Work Formulas
W = ∫[a to b] F(x) dx Variable force — work integral
W = ½kd² Spring from x=0 (Hooke's Law)
W = ½k(x₁²−x₀²) Spring, non-zero start
W = ½ρgL² Chain — full lift
W = ρg(Ld−d²/2) Chain — partial lift d
W = ∫ρg·A(x)·(H−x)dx Pump liquid from tank
F(x) = kx Hooke's Law (spring force)
Area under F(x) curve = W Geometric meaning of work integral
Quick Examples
∫(3x²+2x)dx [0,4] → 80J
Spring k=200, 0→0.3m → 9J
Chain L=10, ρ=2 → 980.7J
∫5x dx [0,3] → 22.5J
∫10sin(x) [0,π] → 20J
∫2eˣ [0,2] → ≈12.78J
Written by

Scientific Tools Developer & Research Analyst · SciSolveLab
🧬 Biology ⚗️ Chemistry 📐 Mathematics ⚡ Physics
100+ Calculators
142 Articles
Technical Researcher Scientific Tools

Shahid Ali is the creator and lead developer of SciSolveLab, a platform dedicated to making complex scientific and mathematical computations accessible. With a deep background in physics, thermodynamics, and wave mechanics, Shahid's work is driven by the belief that robust, accurate mathematical tools should be just a click away for students, engineers, and researchers.

Free chemistry, physics, biology & math calculators with step-by-step solutions. Trusted by 100,000+ students. Solve any science problem instantly!

Newsletter

Subscribe to our Newsletter to be updated. We promise not to spam.

Copyright © 2026 SciSolveLab. All Rights Reserved

Scroll to Top