How can we use adaptive quadrature to approximate the following integral to $10^{-5}$?
$\int_0^{\pi/2}(6\cos4x+4\sin6x)e^x\,dx$
Thanks
How can we use adaptive quadrature to approximate the following integral to $10^{-5}$?
$\int_0^{\pi/2}(6\cos4x+4\sin6x)e^x\,dx$
Thanks
If you have access to Matlab, just use the quadl
function: http://www.mathworks.com/help/techdoc/ref/quad.html
Gander and Gautschi present MATLAB code for two different adaptive quadrature methods. One is based on Simpson's rule, while the other is based on the Gauss-Lobatto rule with a Kronrod extension (a modification of the usual Gaussian quadrature method). It should be straightforward to modify the code given in that paper to have it evaluate your integral.