The fundamental theorem of calculus

This applet is a variant of Applet 6, Complex Integration.  The main differences are that (a) all the functions f(z) have a primitive F(z), and (b) an integral from z_1 to z_2 will start from F(z_1) (and hence end up at F(z_2)) rather than starting at 0 as in Applet 6 (in which case the integral would end up at F(z_2) - F(z_1), as per the fundamental theorem of calculus.

If the mouse is at a location z, and you drag the mouse by small amount dz, then the integral moves from F(z) to F(z + dz).  Since F'(z) = f(z), the net change in the integral is roughly f(z) dz - the same as in Applet 6.  As before, The cyan and green lines indicate the direction the integral would move by if you moved z rightward or upward respectively; they represent the complex numbers f(z) and i f(z) respectively.

When you integrate f on a closed loop, you always get 0 - providing that the function f has an anti-derivative on all of the loop.  In the applet below, there are some cases (when f(z) = 1/z) when the function F(z) sometimes fails to be an anti-derivative, in which case the right-hand screen fails to correctly compute the integral.