structure nodal points are numbered as 12345 starting from the upper support in figure

I clean the memory

kill(all);

I try to define the constraint reactions from equilibrium, in case they are needed to obtain the internal action components, or in case they are explicitly required by the text.
In the case they are not needed nor required, I may skip this passage.

tz : -F+Z1+Z3+Z5 = 0;

r2y : -Z3*c-Z5*2*c = 0;

r2x : (Z1+Z5)*b=0;

linsolve( [ tz,r2y,r2x ] , [Z1,Z3,Z5] ), globalsolve=true;

Bending and torsional moment components, segment 12

The contribution of shear and axial load is neglected being the structure assumed "slender enough".

Mf1 : - Z1 * t;

Mf2 : 0 ;

Mt  : 0 ;

U12 : integrate(Mf1^2/2/E/J+Mf2^2/2/E/J+Mt^2/2/G/Kt, t , 0 , b);

segment 23

Mf1 : (F-Z1) * t;

Mf2 : 0 ;

Mt  : Z1*b ;

U23 : integrate(Mf1^2/2/E/J+Mf2^2/2/E/J+Mt^2/2/G/Kt, t , 0 , c);

segment 54

Mf1 : Z5 * t;

Mf2 : 0 ;

Mt  : 0 ;

U54 : integrate(Mf1^2/2/E/J+Mf2^2/2/E/J+Mt^2/2/G/Kt, t , 0 , b);

segment 43

Mf1 : Z5 * t;

Mf2 : 0 ;

Mt  : Z5 * b ;

U43 : integrate(Mf1^2/2/E/J+Mf2^2/2/E/J+Mt^2/2/G/Kt, t , 0 , c);

total elastic strain energy

U : U12 + U23 + U54 + U43;

Deflection is evaluated based on the second Castigliano Theorem

d : diff(U,F);

A specific dimensioning is defined in order to obtain a numerical deflection result

dim:	[a=800,b=1000,c=600,F=1000,C=500000,
	 E=210000,G=210000/2/(1+3/10),
	 J=(40^4-36^4)*%pi/64,Kt=(40^4-36^4)*%pi/32];

ev(d,dim);
%,numer;