kill(all)$

fpprintprec:5$

van=facebook.com/LearningCalculus$

grn(x):=cos(x^2)-sin(x^2)$
blu(x):=1/(1+x^4)^3$
red(x):=grn(x)*blu(x)$ red(x)$

integrate(grn(x),x,0,inf);
integrate(blu(x),x,0,inf); float(%);
integrate(red(x),x,0,inf);

quad_qags(grn(x),x,0,40);
quad_qags(blu(x),x,0,40);
quad_qags(red(x),x,0,4);
quad_qags(red(x),x,0,20);
quad_qags(red(x),x,0,200);