close all
clear all
clc

V=@(h,B1,B2) h*(B1+sqrt(B1*B2)+B2)/3;

h=[6-0.3,6+0.3];
B1=[8-0.2,8+0.2];
B2=[3-0.1,3+0.1];

b=V(h(end),B1(end),B2(end))
a=V(h(1),B1(1),B2(1))
V1=V((h(1)+h(end))/2,(B1(1)+B1(end))/2,(B2(1)+B2(end))/2)

c=(b-a)/2

d=(a+b)/2