More stuff on calculating theoretical error bounds

Move that to its own module. Move from newton to brentq so that it works.
Add method to find k for a desired value of epsilon.