ODE solver fails with ForwardDiff, but works with central differences for first derivative of an input function

First try ForwardDiff with NaN-safe mode and see if that helps:

https://juliadiff.org/ForwardDiff.jl/latest/user/advanced.html#Fixing-NaN/Inf-Issues-1

1 Like