Test Cases for Integration

Revised on Thursday March 25, adding more test cases, etc.

Note: package Numpy provides the numbers \(e\) and \(\pi\), as numpy.e and numpy.pi

A) For initial testing, evaluate some integrals of polynomials of degree from one to four (for which some methods should give exact results), and then

\[ I_1 := \int_{1}^{3} \frac{dx}{x^2} \]

B) Periodic functions are worth exploring; a basic example tht svoid “special, non-generic” features like zero values or zero derivatives at the endpoints

\[ I_2 := \int_{0}^{2\pi} \sin x + \cos x \, dx, \; = 0. \]

Another one that even moreso avoids “spcial” feauer that might produce non-typical results is

\[ I_3 := \int_{0}^{2\pi} e^{\sin x} \, dx \]

There is no formula for the exact value here, so accuracy must be checked wihtt error estimates and such, not by checking again a known exact result.

We will choose some more challenging test cases.