"Simply Supported Beam with Concentrated Forces
'<hr /><div style = "max-width:180mm;">
'<img style="width:190pt;" alt = "simply-supported-beam-forces.png" class="side" src = "https://calcpad.eu/media/mechanics/beams/simply-supported-beam-forces.png">
'<p><b>Input data</b></p>
'Beam length -'l = ?'m
'Load -'F = ?'kN
'Number of forces -'n = ?
#post
'Number of spacings -'n_1 = n + 1
'<p><b>Internal forces</b></p>
#if '<!--'n%2 ≡ 0'-->
	'Bending -'M_max = (n_1^2 - 1)*F*l/(8*n_1)'kN·m
#else
	'Bending -'M_max = n_1*F*l/8'kN·m
#end if
'Shear -'V_max = n*F/2'kN
'<p><b>Diagrams</b></p>
#hide
PlotWidth = 600
PlotHeight = 150
#show
'Calculate internal forces at'x_1 = ?'m
#pre

#post
a = l/n_1'm
n(x) = max(ceiling(x/a) - 1; 0)
x_F(x) = n(x)*(x  - (n(x) + 1)*a/2)
'Bending
M(x) = V_max*x - F*x_F(x)
$Plot{-M(x) @ x = 0 : l}
M(x_1)'kN·m
'Shear
V(x) = V_max - F*n(x)
$Plot{V(x) @ x = 0 : l}
V(x_1)'kN
#show
'</div>5	10	2	1