Values of $\int_0^L m M dx$

Some day we will have some better figures to help …

In the meantime - have a look at this:

Figure

And also see this:

from sympy import init_printing, var, solve
init_printing()

var('m0 m1 M0 M1 V0 V1 x w EI L')

\[\left ( m_{0}, \quad m_{1}, \quad M_{0}, \quad M_{1}, \quad V_{0}, \quad V_{1}, \quad x, \quad w, \quad EI, \quad L\right )\]

Express virtual moment as a function of $x$, $x = 0$ at left end and increasing rightward. Fairly simple as the virtual moment is always linear, $m_0$ at left end and $m_1$ at the right:

mx = m0 + (m1-m0)*x/L
mx

\[m_{0} + \frac{x \left(- m_{0} + m_{1}\right)}{L}\]

Prove that this gives the correct value at the right end, by substituting $x=L$:

mx.subs({x:L})

\[m_{1}\]

Determine the shear at the left end of the real moment diagram, by solving $\sum M = 0$ about the right end, +ive CW:

V = solve( M0 + V0*L - M1 - w*L*L/2, V0 )[0]
V

\[\frac{\frac{L^{2} w}{2} - M_{0} + M_{1}}{L}\]

Now express real moment as a function of $x$:

Mx = M0 + V*x - w*x*x/2
Mx

\[M_{0} - \frac{w x^{2}}{2} + \frac{x \left(\frac{L^{2} w}{2} - M_{0} + M_{1}\right)}{L}\]

Thats too complex for easy checking. Does it at least deliver the correct value, $M_1$ at $x=L$?

Mx.subs({x:L})

\[M_{1}\]

Now integrate the product of the virtual and the real, for $x$ from $0$ to $L$:

I1 = (mx*Mx).integrate((x,0,L))
I1

\[\frac{L^{3} \left(m_{0} w - m_{1} w\right)}{8} + L M_{0} m_{0} + \frac{L \left(L^{2} m_{0} w - 4 M_{0} m_{0} + 2 M_{0} m_{1} + 2 M_{1} m_{0}\right)}{4} + \frac{L \left(- 2 L^{2} m_{0} w + L^{2} m_{1} w + 2 M_{0} m_{0} - 2 M_{0} m_{1} - 2 M_{1} m_{0} + 2 M_{1} m_{1}\right)}{6}\]

Gnarly! Lets try to simplify:

I2 = I1.simplify()
I2

\[\frac{L \left(L^{2} m_{0} w + L^{2} m_{1} w + 8 M_{0} m_{0} + 4 M_{0} m_{1} + 4 M_{1} m_{0} + 8 M_{1} m_{1}\right)}{24}\]

Thats quite a bit better, but we can see some additional factorizations that sympy may not be able to find on its own. Lets try this one, by factoring out $m_0$ and $m_1$ manually:

I3 = (L/24)*(m0*(w*L*L + 8*M0 + 4*M1) + m1*(w*L*L + 4*M0 + 8*M1))
I3

\[\frac{L \left(m_{0} \left(L^{2} w + 8 M_{0} + 4 M_{1}\right) + m_{1} \left(L^{2} w + 4 M_{0} + 8 M_{1}\right)\right)}{24}\]

And confirm that they are equal:

(I2-I3).simplify()

\[0\]

The Result

So thats it! Here is the formula we will use to give us the integral of the product of the most general virtual moment and a general real moment (subjected to a UDL only):

I3

\[\frac{L \left(m_{0} \left(L^{2} w + 8 M_{0} + 4 M_{1}\right) + m_{1} \left(L^{2} w + 4 M_{0} + 8 M_{1}\right)\right)}{24}\]

And in a format that is suitable for copying and pasting into computer software:

str(I3)

'L*(m0*(L**2*w + 8*M0 + 4*M1) + m1*(L**2*w + 4*M0 + 8*M1))/24'

Special Cases

The following generates the special case values in the table provided by N. Holtz.

var('m M')

\[\left ( m, \quad M\right )\]
virtual_specials = [{m0:m,m1:m},      # m0=m1=m, virtual equal at both ends
                    {m1:0},           # m1=0, virtual 0 at right end
                    {m0:0},           # m0=0, virtual 0 at left end
                    {}]               # general
real_specials = [{w:0,M0:M,M1:M},     # w=0, M0=M1=M, no UDL, end moments equal
                 {w:0,M1:0},          # w=0, M1=0, no UDL, right end moment 0
                 {w:0,M0:0},          # w=0, M0=0, no UDL, left end moment 0
                 {w:0},               # w=0, no UDL, end moments differ
                 {M0:0,M1:0,w:8*M/(L*L)},  # M0=M1=0, UDL, end moments 0
                 {w:-2*M1/(L*L),M0:0},     # M0=0, moment and shear at left end 0
                 {w:2*(M0-M1)/(L*L)},      # shear at left end 0, end moments unequal
                 {}]                       # general

for col,rs in enumerate(real_specials):
    for row,vs in enumerate(virtual_specials):
        s = I3.subs(rs).subs(vs).simplify()
        print(' ')
        print("Column",col+1,"  Row",row+1)
        print(rs)
        print(vs)
        display(s)

 
Column 1   Row 1
{w: 0, M0: M, M1: M}
{m0: m, m1: m}
\[L M m\]
 
Column 1   Row 2
{w: 0, M0: M, M1: M}
{m1: 0}
\[\frac{L M m_{0}}{2}\]
 
Column 1   Row 3
{w: 0, M0: M, M1: M}
{m0: 0}
\[\frac{L M m_{1}}{2}\]
 
Column 1   Row 4
{w: 0, M0: M, M1: M}
{}
\[\frac{L M \left(m_{0} + m_{1}\right)}{2}\]
 
Column 2   Row 1
{w: 0, M1: 0}
{m0: m, m1: m}
\[\frac{L M_{0} m}{2}\]
 
Column 2   Row 2
{w: 0, M1: 0}
{m1: 0}
\[\frac{L M_{0} m_{0}}{3}\]
 
Column 2   Row 3
{w: 0, M1: 0}
{m0: 0}
\[\frac{L M_{0} m_{1}}{6}\]
 
Column 2   Row 4
{w: 0, M1: 0}
{}
\[\frac{L M_{0} \left(2 m_{0} + m_{1}\right)}{6}\]
 
Column 3   Row 1
{w: 0, M0: 0}
{m0: m, m1: m}
\[\frac{L M_{1} m}{2}\]
 
Column 3   Row 2
{w: 0, M0: 0}
{m1: 0}
\[\frac{L M_{1} m_{0}}{6}\]
 
Column 3   Row 3
{w: 0, M0: 0}
{m0: 0}
\[\frac{L M_{1} m_{1}}{3}\]
 
Column 3   Row 4
{w: 0, M0: 0}
{}
\[\frac{L M_{1} \left(m_{0} + 2 m_{1}\right)}{6}\]
 
Column 4   Row 1
{w: 0}
{m0: m, m1: m}
\[\frac{L m \left(M_{0} + M_{1}\right)}{2}\]
 
Column 4   Row 2
{w: 0}
{m1: 0}
\[\frac{L m_{0} \left(2 M_{0} + M_{1}\right)}{6}\]
 
Column 4   Row 3
{w: 0}
{m0: 0}
\[\frac{L m_{1} \left(M_{0} + 2 M_{1}\right)}{6}\]
 
Column 4   Row 4
{w: 0}
{}
\[\frac{L \left(m_{0} \left(2 M_{0} + M_{1}\right) + m_{1} \left(M_{0} + 2 M_{1}\right)\right)}{6}\]
 
Column 5   Row 1
{M0: 0, M1: 0, w: 8*M/L**2}
{m0: m, m1: m}
\[\frac{2 L M m}{3}\]
 
Column 5   Row 2
{M0: 0, M1: 0, w: 8*M/L**2}
{m1: 0}
\[\frac{L M m_{0}}{3}\]
 
Column 5   Row 3
{M0: 0, M1: 0, w: 8*M/L**2}
{m0: 0}
\[\frac{L M m_{1}}{3}\]
 
Column 5   Row 4
{M0: 0, M1: 0, w: 8*M/L**2}
{}
\[\frac{L M \left(m_{0} + m_{1}\right)}{3}\]
 
Column 6   Row 1
{w: -2*M1/L**2, M0: 0}
{m0: m, m1: m}
\[\frac{L M_{1} m}{3}\]
 
Column 6   Row 2
{w: -2*M1/L**2, M0: 0}
{m1: 0}
\[\frac{L M_{1} m_{0}}{12}\]
 
Column 6   Row 3
{w: -2*M1/L**2, M0: 0}
{m0: 0}
\[\frac{L M_{1} m_{1}}{4}\]
 
Column 6   Row 4
{w: -2*M1/L**2, M0: 0}
{}
\[\frac{L M_{1} \left(m_{0} + 3 m_{1}\right)}{12}\]
 
Column 7   Row 1
{w: (2*M0 - 2*M1)/L**2}
{m0: m, m1: m}
\[\frac{L m \left(2 M_{0} + M_{1}\right)}{3}\]
 
Column 7   Row 2
{w: (2*M0 - 2*M1)/L**2}
{m1: 0}
\[\frac{L m_{0} \left(5 M_{0} + M_{1}\right)}{12}\]
 
Column 7   Row 3
{w: (2*M0 - 2*M1)/L**2}
{m0: 0}
\[\frac{L m_{1} \left(M_{0} + M_{1}\right)}{4}\]
 
Column 7   Row 4
{w: (2*M0 - 2*M1)/L**2}
{}
\[\frac{L \left(m_{0} \left(5 M_{0} + M_{1}\right) + 3 m_{1} \left(M_{0} + M_{1}\right)\right)}{12}\]
 
Column 8   Row 1
{}
{m0: m, m1: m}
\[\frac{L m \left(L^{2} w + 6 M_{0} + 6 M_{1}\right)}{12}\]
 
Column 8   Row 2
{}
{m1: 0}
\[\frac{L m_{0} \left(L^{2} w + 8 M_{0} + 4 M_{1}\right)}{24}\]
 
Column 8   Row 3
{}
{m0: 0}
\[\frac{L m_{1} \left(L^{2} w + 4 M_{0} + 8 M_{1}\right)}{24}\]
 
Column 8   Row 4
{}
{}
\[\frac{L \left(m_{0} \left(L^{2} w + 8 M_{0} + 4 M_{1}\right) + m_{1} \left(L^{2} w + 4 M_{0} + 8 M_{1}\right)\right)}{24}\]