as a function of x. Counter-clockwise current is taken as positive.