function [u] = GLT_Chain(x,p,d,W_a4sp,q_1e)

W_a4 = x(2);
W_b4 = x(3);
A_1 = p(5);
h_1 = p(29);
W_a3 = p(27);
A = p(34);
W_a1 = p(23);
W_a2 = p(25);
q_2 = d(2);

q_3 = ((1)/(W_a3-W_a4))*(A_1*h_1*(A*(W_a4-W_a4sp))-(q_1e)*(W_a1-W_a4)...
    -(q_2)*(W_a2-W_a4));

A = A_1*h_1*A*(W_a4-W_a4sp);
B = q_1e*(W_a1-W_a4);
C = q_2*(W_a2-W_a4);
D = 1/(W_a3-W_a4);

u = q_3;



end