Implemented non-linear flag in finite_difference