Please post a self-contained MWE, including a using for the library which provides derivative.
using
derivative