The first occurs when we wish to integrate a portion of an experimental curve, such as a chromatographic peak. Obviously we must use the data as provided. The other case occurs when we wish to integrate a known function or an expression which can be evaluated, but we can't find a suitable analytical form for the integral. It is quite easy to set up a loop over X, evaluate the function, and add the contributions to the integral. You can also compute or estimate the derivative of a curve by finite difference methods.
Numerical derivative are quite useful in analyzing spectral peaks.
The onset of a peak can be checked by looking for an increase in the derivative. There are also reasons to evaluate numerical derivatives from known mathematical expressions. The equation of state cannot be solved analytically for V, so there's no easy way to differentiate. The exercise includes a very quick demo of derivatives. It uses numerical derivatives to identify peaks and retention times and in numerically integrates to find peak areas.