I don't get zero (assuming that I have your equations correct now). Perhaps you're not substituting in your values properly. You can use the subs
function to do this automatically:
f = 0.09;
b = 0.0044;
q = 3.73e-9;
L = 1;
Tw = 250;
Tam = 27;
syms c x g
T = 2*c*cosh(x*((f-b*g)/q)^0.5)+g/(f-b*q);
c = solve(subs(T,'x',L/2)==0,c);
z = simplify(int(subs(T,'c',c),x,-L/2,L/2));
g = solve(z==L*(Tw-Tam),g)
which returns
g =
20.135660961656472105004196502187
You can use double
to convert this to floating-point. And you can check that this value of g
does indeed solve your equation:
eval(subs(z-L*(Tw-Tam),'g',g))
which returns 0
.