function vol = V(x)
r = x(1);
hcyl = x(2);
hcon = x(3);
Vcyl = pi*r^2*hcyl;
Vcon = pi*r^2*hcon/3;
vol = Vcyl + Vcon;
