Moment diagrams for simply supported beams

I thought I’d run through how the moment diagrams in the last post were made. It’ll probably take two articles to get through it all.

Let’s start with the three simple spans.

Three simple spans

Moment diagram for three simple spans

We’ll generate the moment diagram for a single simply supported beam and then apply it to each individual span.

Simply supported beam with uniform load

Note here that w is the uniform intensity of the load along the beam. It can be measured in pounds per foot, kilonewtons per meter, or any units that work out to force per length. The total load on beam is wL.

We start by drawing the free body diagram for the beam, replacing the supports with their associated reaction forces.

Free body diagram of simply supported beam

There are two unknowns, R A and R B, and two equations of statics:1

F y=R A+R BwL=0 M A=R BLwL(L2)=0

The first represents the sum of all the forces in the vertical direction, and the second represents the sum of all the moments about the left end of the beam (Point A). The solution to these two equations is

R A=R B=wL2

You could have gotten this same answer with no algebra by taking account of symmetry. Because the structure is symmetric and the loading is symmetric, the reaction forces must also be symmetric.2 (I guess there’s a little algebra because you need to know that the two equal reactions add up to wL, but that really doesn’t count, does it?)

With the reaction forces determined, we move on to determining the bending moment within the beam. When a structure is in equilibrium, every portion of it is in equilibrium. So we can consider just part of the beam, a section of length x starting at the left end, and draw its free body diagram:

Free body diagram of partial beam

Because we have conceptually cut the beam at a distance x from the left end, we’ve exposed the internal shear, V, and moment, M, and can write the equations of statics for this portion of the beam.

F y=wL2wxV=0 M x=M+wx(x2)(wL2)x=0

In the second equation, we’re taking moments about the right end of this portion.

Solving these two equations gives us

V=w(L2x)

and

M=wx2(Lx)

Although the shear matters in beam design, the moment is typically more important, so we’ll focus on that. The equation for M is that of a parabola, with M=0 at x=0 and x=L and rising to a peak of

M=wL 28

at midspan, x=L/2.

For the middle span of the three-span bridge, L=12a, so

M=w(12a) 28=144wa 28=18wa 2

at its center. And for the two side spans, L=7a, so

M=w(7a) 28=49wa 28=6.125wa 2

at their centers. These are the labeled dots in the moment diagram at the top of the post.

To make the moment diagram in Mathematica,3 we have to start by taking the generic equation for M and rewriting it as three equations that work in the individual spans, where the origin of the x coordinate is at the left end. That will look like this:

M = { w x 2 [ 7 a x ] for 0 x 7 a w ( x 7 a ) 2 [ 12 a ( x 7 a ) ] for 7 a < x 19 a w ( x 19 a ) 2 [ 7 a ( x 19 a ) ] for 19 a < x 26 a

To get Mathematica to plot this, we need to nondimensionalize the moment and the horizontal coordinate so we’re plotting pure numbers, with no w or a terms left in the expressions. We do that by dividing through by wa 2 to nondimensionalize M and by introducing a new variable, u=x/a, to nondimensionalize the horizontal coordinate. That gives us

m = M w a 2 = { u 2 [ 7 u ] for 0 u 7 ( u 7 ) 2 [ 12 ( u 7 ) ] for 7 < u 19 ( u 19 ) 2 [ 7 ( u 19 ) ] for 19 < u 26

Now we’re ready to move to Mathematica for the plotting.

First, we define three ms, one for each span, and then use the Piecewise function within Plot to get a moment diagram that covers all three spans:

    m1 = 1/2*u*(7 - u);

    m2 = (u - 7)/2*(12 - (u - 7));

    m3 = (u - 19)/2*(7 - (u - 19));

    Plot[Piecewise[{{m1, u <= 7}, {m2, 7 < u <= 19}, {m3, u > 19}}],
     {u, 0, 26},
     ImageSize -> Large, 
     PlotStyle -> Thick, 
     Ticks -> {Table[t, {t, 0, 18, 2}], Table[t, {t, 0, 26, 2}]}]

That gives us the moment diagram shown at the top of the post, except for the dots and the labels at the peaks of the parabolas. I added those “by hand” in Preview.

Simply supported beams are called “statically determinate” structures because we can determine all the internal and external forces through statics alone. That won’t be the case for the three-span continuous beam, which we’ll analyze in the next post.


  1. Normally there would be three equations of statics for a plane problem like this, but because there are no forces in the horizontal direction, the horizontal equilibrium equation gives us no information. It’s just 0 = 0. 

  2. “Symmetric” here means symmetric about the midspan of the beam. In other words, the right half of the beam is a mirror image of the left half. 

  3. I could’ve plotted it with Python and Matplotlib, but I want to learn more about Mathematica, so I used this as an opportunity to do so.