The problem started with an equation giving I as a function of V, I=f(V). So if you take the derivative dV/dI you get another function of V giving the incremental resistance for any value of V.
A numerical approximation needs to provide the value dV/dI for any value of V using the same function I=f(V). To calculate dV/dI at V volts the formula is, Incremental Resistance @V = (V-(V+delta V))/(f(V)-f(V+delta V))
For a numerical example choose V=4 and delta V=0.001, then dV/dI= (4.000-4.001)/(f(4.000)-f(4.001)) = 0.001/(f(4.001)-f(4.000))
Why a delta V=0.001? Just choose something reasonable. Generally the smaller the delta the better the accuracy, unless round-off errors become significant. How many digits does your calculator have? Note that one way to improve accuracy is to have the delta symmetrical around the calculation point, dV/dI=0.001/(f(4+0.0005)-f(4-0.0005)).