Implementation of various numerical methods.