Work is path-dependent only with friction
The mistake
Assuming gravitational work depends on the route taken.
Why it feels right
A longer path feels like it should cost more energy.
How to catch it
You integrated gravity along a winding path expecting a path-dependent answer.
The first principle
Conservative forces (gravity, spring) depend only on endpoints. Only non-conservative forces like friction make work path-dependent.
worked mini-example
Work by gravity moving a mass up two different frictionless ramps to the same height?
Common wrong move
Different — the ramps differ.
Correct
Same: −mgh either way (endpoints only).
Test the repair EN-04 · transfer
Make a fresh prediction before referring to the worked example.