% Illustrate difficult of symbolic integration
% Use Maple to symbolically integrate
% f(x) = 1 / (x^5 - (x^4 + x^3 + x^2 + x)/16 - 1/2)
%   from x=-1 to x=1
disp('result of symbolic integration of ')
disp('1 / (x^5 - (x^4 + x^3 + x^2 + x)/16 - 1/2)')
disp('from x=1 to x=-1.')
disp('Correct answer is that the integral does not exist.')
syms x
int(1/(x^5 - (x^4 + x^3 + x^2 + x)/16 - 1/2), -1, 1)
xnum = (-1:.002:1);
ynum = xnum.^5 - (xnum.^4 + xnum.^3 + xnum.^2 + xnum)/16 - 1/2;
figure(1), hold off, clf, subplot(211)
plot(xnum,ynum), grid
title('Plot of   x^5 - (x^4 + x^3 + x^2 + x)/16 - 1/2')
subplot(212)
plot(xnum,1./ynum),axis([-1 1 -20 20]),grid
title('Plot of Integrand 1/ ( x^5 - (x^4 + x^3 + x^2 + x)/16 - 1/2 )')