Examples
The following example represents 3-segment beam loaded by couple, linearly distributed load and two concentrated forces.

Input:
Length of the beam L: 2.5 Length between pin supports l: 2.0

Number of couples (external moments): 1 Number of concentrated loads: 2 Number of distributed loads: 1

M1 - value of the couple # 1 of 1: -4 a1 - coordinate of this couple: 2.5
F1 - value of the concentrated load # 1 of 2: 4 b1 - coordinate of this concentrated load: 2.5
qL1 - left value of the lineary distributed load # 1 of 1: 1 qR1 - right value of the lineary distributed load # 1 of 1: 2
c1 - left coordinate of this distributed load: 1 d1 - right coordinate of this distributed load: 2

F2 - value of the concentrated load # 2 of 2: -4 b2 - coordinate of this concentrated load: 1

Output:

               Maximum shear force V is 4.0 at x=2.0
               Maximum bending moment M is 4.0 at x=2.5
               Maximum deflection EIv is 0.63055557 at x=2.5
     Reactions:
R1=1/l[-M1+F1(l-b1)+F2(l-b2)+qL1(d1-c1)(l-(c1+d1)/2)+(qR1-qL1)(d1-c1)/2(l-c1-2(d1-c1)/3)]=
1/2.0[4.0+4.0(2.0-2.5)-4.0(2.0-1.0)+1.0(2.0-1.0)(2.0-(1.0+2.0)/2)+(2.0-1.0)(2.0-1.0)/2(2.0-1.0-2(2.0-1.0)/3)]=-0.6666666666666666
R2=1/l[M1+F1b1+F2b2+qL1(d1-c1)(c1+d1)/2+(qR1-qL1)(d1-c1)/2(c1+2(d1-c1)/3)]=
1/2.0[-4.0+4.0*2.5-4.0*1.0+1.0(2.0-1.0)(1.0+2.0)/2+(2.0-1.0)(2.0-1.0)/2(1.0+2(2.0-1.0)/3)]=2.1666666666666665

               The beam has 3 segments.
     Segment #1 (0.0≤x≤1.0).
Shear force:
V=R1=
-0.6666667=
-0.6666667

Bending moment:
M=+R1x=
-0.6666667x=
-0.6666667x

Deflection:
EIv=EIθ0x+R1x3/6=
0.13611111x-0.6666666666666666x3/6=
0.13611111x-0.11111111x3

At x=0.0 V=-0.6666667; M=-1.6666667E-9; EIv=3.4027778E-10;
At x=1.0 V=-0.6666667; M=-0.6666667; EIv=0.025;

There is maximum deflection 0.057984 on this segment at x=0.64

     Segment #2 (1.0≤x≤2.0).
Shear force:
V=R1-F2-qL1(x-c1)-(qR1-qL1)(x-c1)2/(d1-c1)/2=
-0.6666667+4.0-1.0(x-1.0)-(2.0-1.0)(x-1.0)2/(2.0-1.0)/2=
3.3333333-1.0(x-1.0)-0.5(x-1.0)2

Bending moment:
M=+R1x-F2(x-b2)-qL1(x-c1)2/2-(qR1-qL1)(x-c1)3/(d1-c1)/6=
-0.6666667x+4.0(x-1.0)-1.0(x-1.0)2/2-(2.0-1.0)(x-1.0)3/(2.0-1.0)/6=
-0.6666667x+4.0(x-1.0)-0.5(x-1.0)2-0.16666667(x-1.0)3

Deflection:
EIv=EIθ0x+R1x3/6-F2(x-b2)3/6-qL1(x-c1)4/24-(qR1-qL1)(x-c1)5/(d1-c1)/120=
0.13611111x-0.6666666666666666x3/6+4.0(x-1.0)3/6-1.0(x-1.0)4/24-(2.0-1.0)(x-1.0)5/(2.0-1.0)/120=
0.13611111x-0.11111111x3+0.6666667(x-1.0)3-0.041666668(x-1.0)4-0.008333334(x-1.0)5

At x=1.0 V=3.3333333; M=-0.6666667; EIv=0.025;
At x=2.0 V=1.8333334; M=2.0; EIv=-1.4861112E-9;

There is mimimum deflection -0.100025766 on this segment at x=1.63

     Segment #3 (2.0≤x≤2.5).
Shear force:
V=R1+R2-F2-qL1(x-c1)-(qR1-qL1)(x-c1)2/(d1-c1)/2+qR1(x-d1)+(qR1-qL1)(x-d1)2/(d1-c1)/2=
-0.6666667+2.1666667+4.0-1.0(x-1.0)-(2.0-1.0)(x-1.0)2/(2.0-1.0)/2+2.0(x-2.0)-(2.0-1.0)(x-2.0)2/(2.0-1.0)/2=
5.5-1.0(x-1.0)-0.5(x-1.0)2+2.0(x-2.0)+0.5(x-2.0)2

Bending moment:
M=+R1x+R2(l-x)-F2(x-b2)-qL1(x-c1)2/2-(qR1-qL1)(x-c1)3/(d1-c1)/6+qR1(x-d1)2/2+(qR1-qL1)(x-d1)3/(d1-c1)/6=
-0.6666667x+2.1666667(l-x)+4.0(x-1.0)-1.0(x-1.0)2/2-(2.0-1.0)(x-1.0)3/(2.0-1.0)/6+2.0(x-2.0)2/2+(2.0-1.0)(x-2.0)3/(2.0-1.0)/6=
-0.6666667x+2.1666667(l-x)+4.0(x-1.0)-0.5(x-1.0)2-0.16666667(x-1.0)3+1.0(x-2.0)2+0.16666667(x-2.0)3

Deflection:
EIv=EIθ0x+R1x3/6+R2(l-x)3/6-F2(x-b2)3/6-qL1(x-c1)4/24-(qR1-qL1)(x-c1)5/(d1-c1)/120+qR1(x-d1)4/24+(qR1-qL1)(x-d1)5/(d1-c1)/120=
0.13611111x-0.6666666666666666x3/6+2.1666666666666665(l-x)3/6+4.0(x-1.0)3/6-1.0(x-1.0)4/24-(2.0-1.0)(x-1.0)5/(2.0-1.0)/120+2.0(x-2.0)4/24-(2.0-1.0)(x-2.0)5/(2.0-1.0)/120=
0.13611111x-0.11111111x3+2.1666666666666665(l-x)3/6+0.6666667(x-1.0)3-0.041666668(x-1.0)4-0.008333334(x-1.0)5+0.083333336(x-2.0)4+0.008333334(x-2.0)5

At x=2.0 V=4.0; M=2.0; EIv=1.4861112E-9;
At x=2.5 V=4.0; M=4.0; EIv=0.63055557;