Line integrals: path dependence and Stokes
What you are seeing: a vector field in the plane, and two paths from to : the straight line (orange) and the upper semicircular arc (cyan). The line integral is computed on each path using Simpson quadrature. For a conservative field the two values coincide; for a non-conservative field they differ, and the closed-loop integral around the semicircle equals the curl integrated over the enclosed area (Stokes' theorem).
The selector switches between two conservative fields ( and ) and two non-conservative fields ( with curl 2, with curl ). The readout reports both path integrals and their difference (the closed-loop value).
field
conservative
straight, arc:0, 0
closed loop:0
0, 00WHAT TO TRY
- Vary each control and watch the rail readouts respond.
- Compare the diagnostic plot against the live scene.