first version. See how complex step method compares to other methods
tweaked plotting