A bias voltage between tip and sample is applied by an external battery forming a capacitor, C, between the two.
The work done by the battery to maintain a constant voltage, ΔV, between the capacitor plates (tip and sample) is -2U.
Since the tip and sample are often not the same material, and furthermore can be subject to trapped charges, debris, etc., there is a difference between the work functions of the two.
A common form of electric force microscopy involves a noncontact AFM mode of operation.
In this non-contact regime, the electric force gradient causes a shift in the resonance frequency of the cantilever.