f(x):=(x+3)^2*(3-x);

diff(f(x),x,1);

ratsimp(%);

factor(%);

expand(%);

solve([%], [x]);

f(-3);

f(1);

f(0);

f(3);

" Si x appartient a [0;3], alors f(x) appartient a [0;32] ";

"Aire du trapeze ABMN : (BA+NM)/2*h";

A(x):=(6+2*x)/2*(9-x^2)/2;

ratsimp(%);

"A(x)=f(x)/2 donc A admet un minimum sur [0;3] pour x=1";

A(1);

wxplot2d([A(x)], [x,0,3])$

plot2d([A(x)], [x,0,3],
 [plot_format, gnuplot])$