kill(all);

assume(G>0,K>0,Cw>0,E>0);

here :
-- lowercase l is the overall, twice clamped beam HALF-LENGTH, 
   i.e. the length of an equivalent clamped-free beam
-- uppercase L is the overall, twice clamped beam length, 

L = 2l = eta*d

L:eta*d;

here:
-- lowercase "theta" is the relative rotation between the mispan section, and the two terminals
-- uppercase "Theta" is the relative rotation between the two terminals

Theta = 2 theta

cross-section characteristic length with respect to Vlasov theory of restrained warping

Restrained warping effect is negligible if L/d >> 1 .

tentative solution

phi(x):=A*sinh(x/d)+B*x/d;

tentative solution check

fullratsimp(
    -d^2*diff(phi(x),x,4)+diff(phi(x),x,2)=0
);

imposed counterotation at the two terminals

eq1 : phi(L/2)-phi(-L/2)=Theta;

imposed zero warping at terminals

0=diff(phi(x),x,1);
eq2 : ev(%,x=L/2);

solution

linsolve([eq1,eq2],[A,B]),globalsolve=true;

torsional moments, De Saint Venant and Vlasov portions

T_dSV :         G*K*diff(phi(x),x,1);
T_Vla : - (d^2)*G*K*diff(phi(x),x,3);

plotme:fullratsimp(
[
    ev(T_Vla / (G*K*Theta/L),sols,x=L/2,infeval),
    ev(T_Vla / (G*K*Theta/L),sols,x=  0,infeval),
    ev(T_dSV / (G*K*Theta/L),sols,x=  0,infeval),
    1
]
);
wxplot2d(
    plotme,
    [eta,1,100],
    logx,
    [legend,"T_{tot} = T_{Vla}, ext.","T_{Vla}, midspan","T_{dSV}, midspan","1"], 
    [xlabel, "2l / d_{Vla}"],
    [ylabel, "(T * 2l)/(G * Kt * [2 theta])"],
    [title,"Torsional stiffness, "]  
);

B:-G*K*d^2*phi(x);

diff(B/Theta/G/K,x,2)$
ev(%,sols)$
ev(%,x=L/2);
wxplot2d(
    %,
    [eta,1,100],
    logx,logy,
    [legend,"B/(G * Kt * [2 theta])"], 
    [xlabel, "2l / d_{Vla}"],
    [ylabel,"B/(G * Kt * [2 theta])"],
    [title,"Fattore di scalatura delle tensioni assiali Vlasov di estremità"] 
);

Definition of a stiffening factor due to the Vlasov effect

T : ev(T_Vla,x=eta*d/2);

( T/(G*K*Theta/L));
Amp_Vla : ratsubst(tanh(L/(2*d))*cosh(L/(2*d)),sinh(L/(2*d)),%);

Newton-Raphson procedure for estracting the 

d/L = eta 

ratio from the Vlasov stiffening factor 

residual definition; 

1/x = 1/Amp_Vla

such 1/Amp_Vla function is well defined on the 0.001 <= eta <=1000 range

wxplot2d(1/Amp_Vla,[eta,0.001,1000],[logx]);

wxplot2d(1/Amp_Vla,[eta,0.001,1000],[logx],[logy]);

definition of a Newton procedure:
residual function and its derivatives

res : 1/x-1/Amp_Vla;

define(f(x,eta) ,
    expand(res)
);

define(
        df(x,eta),
        expand(diff(f(x,eta),eta))
    );

define(
    NR(x,eta),
    fullratsimp(eta - f(x,eta)/df(x,eta))
);

stiffening effect due to Vlasov

amp:1.01;

1.0;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;
NR(amp,%),numer;