Example in #1971 -- example of variational approximation

Basic function used in example #1971.