kill(all);

I name "1" the application point of the F force, and I replace the intermediate support constraint with its reaction "R": subsequently I will impose the compatibility condition of null horizontal (x) displacement at this node.
To define linear functions along segments, I use a normalized curvilinear abscissa xi, which
it is 0 at the first point of the segment, and 1 at the final point.

The beam structure lays on a plane, and it is loaded fully in-plane. 
No torsional moment is hence induced by the loads, nor a second component of bending moment.

Mf_34: (R-F)*c*xi;

Mf_12: -F*c*xi;
Mf_23: -F*c;
Mf_34: (R-F)*c*xi-F*c;

U: integrate( (Mf_12^2/2/E/J ) *c, xi, 0, 1)
  +integrate( (Mf_23^2/2/E/J ) *a, xi, 0, 1)
  +integrate( (Mf_34^2/2/E/J ) *c, xi, 0, 1);

delta_R: diff(U,R);

linsolve(delta_R=0,R),globalsolve=true;

U: ev(U);

U:fullratsimp(U);

delta_F: diff(U,F);

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,Jp=(40^4-36^4)*%pi/32];

ev(delta_F,dim)$
%,numer;