Exercise "adaptive integration"

  1. Implement an recursive adaptive integrator which estimates the integral with a required absolute (acc) and relative (eps) accuracy.
  2. Calculate ∫01   dx (ln(x)/√[x]) = -4 with acc=eps=0.001 and estimate the number of integrand evaluations.
  3. Calculate ∫01   dx 4√[1-(1-x)2] = π with as many significant digits as possible and estimate the number of integrand evaluations.
  4. Test your implementation on some other interesting integrals.
  5. Implement your own classical quadrature with your favourite set of functions, eg {1/√x,ln(x),√x,1,x,...}, and a corresponding adaptive integrator.
  6. [this one is for later comparison with ordinary diferential equation solver] A definite integral ∫abf(x)dx can be reformulated as an ODE, 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.