P(a,h):=2*a^2*2+4*a*h*2;

ratsimp(P(a,h));

h(a):=0.5/a^2;

P(a,h(a));

diff(P(a,h(a)),a);

solve([%o5], [a]);

a:1/2^(1/3);

bfloat(%);

h(a);

P(a,h(a));

bfloat(%);

kill(a);

plot2d([P(a,h(a))], [a,0,1], [y,0,50],
 [plot_format, gnuplot],
 [gnuplot_preamble, "set grid;"])$