Exercise Adaptive Integration
- Implement a recursive adaptive integrator which estimates the
integral of a given function on a given interval with a required absolute
(
acc) or relative (eps) accuracy.
- Calculate
∫01
dx (ln(x)/√(x)) = -4
with
acc=eps=0.001 and estimate the number of
integrand evaluations.
- Calculate
∫01
dx 4√(1-(1-x)2) = π
with as many significant digits as possible and estimate the number of
integrand evaluations.
- Test your implementation on some other interesting integrals.
- Generalise your integrator such that it can accept infinite limits.
- [this one is for later comparison with ordinary diferential
equation solver] A definite integral
∫abf(x)dx can be
reformulated as an ordinary differential equation,
y'=f(x), y(a)=0, y(b)=?, which can be solved with your adaptive ODE
solver. Pick an interesing f(x) and compare the effectiveness of
your ODE drivers with your adaptive integrator.
Projects
- Devise some higher order classical quadratures and implement them
in your adaptive integrator.
- Generalise your integrator such that it can integrate complex
functions along a given path in the complex plane.