# Ejercicio 9.1

## apartado a)

kill(all)$

f(x):=1/(100 - x^6);

wxplot2d([f(x)], [x,-1,1], [y, 0.0099, 0.0102] , [ylabel, ""] , [legend, "f(x)"] , [style, [lines, 2]] ,
 [gnuplot_preamble, "set size ratio 1; set zeroaxis;"])$

m = m : f(0);       
M = M : f(1);

Integral_aproximada = IA : 2 * (m + M)/2 ;

%, numer;

valor "exacto":

'integrate(f(x), x, -1, 1) = integrate(f(x), x, -1, 1);

%,numer;

## apartado b)

kill(all)$

g(x):=cos(x)/(75 - x^4);

wxplot2d([g(x)], [x,0,1], [y, 0.007, 0.015], [ylabel, ""] , [legend, "g(x)"] , [style, [lines, 2]] ,
 [gnuplot_preamble, "set size ratio 1; set zeroaxis;"])$

m = m : g(1);       
M = M : g(0);

Integral_aproximada = IA : (m + M)/2 ;

%, numer;

valor "exacto":

'integrate(g(x), x, 0, 1) = integrate(g(x), x, 0, 1);

Como puede verse, wxMaxima no siempre da un resultado para calcular una integral definida

## apartado c)

kill(all)$

f(x):=2 + 0.1*x^2/(sqrt(1 + 0.1*x^4));

wxplot2d([f(x)], [x,0,1], [ylabel, ""] , [legend, "f(x)"] , [style, [lines, 2]] ,
 [gnuplot_preamble, "set size ratio 1; set zeroaxis;"])$

m = m : f(0);       
M = M : f(1);

Integral_aproximada = IA : (m + M)/2 ;

%, numer;

valor "exacto":

'integrate(f(x), x, 0, 1) = integrate(f(x), x, 0, 1);