I am trying to make a method where the user can provide an analytic gradient function if available, but if not it defaults to using a numeric gradient.
To that effec