renamed functions and added extensive comments for clarity; implemented a closed-form solution using floating-point arithmetic and determined where it diverges from the exact solution