Simulation

Work by a Variable Force · SimulatorArea Under F(x) Equals KE

Energy & WorkWork-energy theorem

Drag a force-vs-position curve; the area under it computes total work and matches the kinetic energy gained

Published: July 3, 2026

Objective

Verify the work-energy theorem for a non-constant force: show that the area under the F(x) curve from start to finish equals the kinetic energy gained by the block. The model assumes a frictionless horizontal track, a point-mass block, and a force profile set by five draggable control points interpolated with a natural cubic spline.

Setup

  1. Leave all sliders at their defaults (mass = 1.0 kg, peak force = 20 N, track length = 6 m) and note the bell-shaped spline in the F(x) panel. The amber shaded area is zero before the block moves.
  2. Press Start and watch the amber area grow as the block advances. Observe the Work done (J) and Kinetic energy (J) readouts in the control panel.
  3. When the block reaches the track end the sim stops. Record the final Work and KE values and confirm they match.
  4. Press Reset, then drag the middle control point (the peak) upward to roughly 35 N and press Start again. Note the larger final area and higher final KE.
  5. Press Reset and set mass to 3.0 kg (peakForce stays elevated). Note that the same shaped curve gives the same Work but a lower final speed, since KE = ½mv².
The F(x) control points at default settings define a bell-shaped force profile; the amber shaded area (zero at rest) will grow as the block moves right.
At the finish the full area under the curve equals the kinetic energy gained, shown by the Work and KE readouts reaching the same value.
With a doubled peak force the block reaches a higher final speed, illustrating that a taller force profile means more area and more kinetic energy.

Analytical Prediction

With the default settings (mass = 1.0 kg, peakForce = 20 N, trackLength = 6 m), the control points are at (0, 1.81 N), (1.5, 10.98 N), (3, 20 N), (4.5, 10.98 N), (6, 1.81 N). The natural cubic spline through these knots bulges above the straight chords between them, so its integral exceeds the trapezoid estimate over the knots. Trapezoid estimate across the four panels (each 1.5 m wide):

W_trap=1.5·(1.81+10.98)/2 + 1.5·(10.98+20)/2 + 1.5·(20+10.98)/2 + 1.5·(10.98+1.81)/2
=9.59 + 23.23 + 23.23 + 9.59
=65.65 J

The cubic spline adds roughly 2.0 J from the upward bowing between knots:

W_spline67.6 J

At the finish:

KE=½ · m · v² → v = sqrt(2·W/m) = sqrt(2·67.6/1.0) ≈ 11.6 m/s

The Work readout and KE readout should both reach approximately 67.6 J when the block exits the track.

Results Analysis

After pressing Start with the default sliders, watch the Work done (J) and Kinetic energy (J) readouts update each tick. Both values should climb together and converge to the same number at the finish. At the default settings both readouts should read approximately 67 J to 68 J when the block reaches the track end. The amber shaded area in the F(x) panel is the graphical representation of the integral: its extent at x = 6 m corresponds to the work value shown in the HUD. The sky-blue dashed W(x) overlay traces the running integral and should sit visually at the top edge of the amber shading at every position. If you increased the peak force to 35 N in Step 4, the final work will be larger (roughly 35/20 × 67.6 ≈ 118 J) and the block will exit faster.

Source of Error

The simulation models a frictionless horizontal surface; any real block would lose energy to friction and surface deformation, reducing the final KE below the predicted work. The force profile is defined by five control points only, so it cannot represent an arbitrarily complex real-world force distribution. The numerical integration uses Simpson's rule with 2000 steps per evaluation, introducing a quadrature error below 0.1 J across the default slider range. Forward-Euler position integration introduces a velocity drift proportional to the timestep; the residual gap between the Work and KE readouts at the stop frame is therefore purely numerical, not physical, for this sim.

Further Exploration