function f_L=doublepane(x,A,Ai,Bi,Ao,Bo)
    f_L=A*(Ai+Bi*x^(1/6))^2*x-...
        (Ao+Bo*(40-x-(Ai/sqrt(A)+Bi/sqrt(A)*x^(1/6))^(8/5)*x^(4/5))^(1/6))^2*...
        (40-x-(Ai/sqrt(A)+Bi/sqrt(A)*x^(1/6))^(8/5)*x^(4/5));

