# 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.

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

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.

There are two unknowns, ${R}_{A}$ and ${R}_{B}$, and two equations of statics:1

$\sum {F}_{y}={R}_{A}+{R}_{B}-wL=0$ $\sum {M}_{A}={R}_{B}L-wL\left(\frac{L}{2}\right)=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}=\frac{wL}{2}$

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:

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.

$\sum {F}_{y}=\frac{wL}{2}-wx-V=0$ $\sum {M}_{x}=M+wx\left(\frac{x}{2}\right)-\left(\frac{wL}{2}\right)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\left(\frac{L}{2}-x\right)$

and

$M=\frac{wx}{2}\left(L-x\right)$

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=\frac{w{L}^{2}}{8}$

at midspan, $x=L/2$.

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

$M=\frac{w\left(12a{\right)}^{2}}{8}=\frac{144w{a}^{2}}{8}=18w{a}^{2}$

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

$M=\frac{w\left(7a{\right)}^{2}}{8}=\frac{49w{a}^{2}}{8}=6.125w{a}^{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=\left\{\begin{array}{ll}\frac{wx}{2}\left[7a-x\right]& \mathrm{for}\phantom{\rule{0.22222em}{0ex}}0\le x\le 7a\\ \frac{w\left(x-7a\right)}{2}\left[12a-\left(x-7a\right)\right]& \mathrm{for}\phantom{\rule{0.22222em}{0ex}}7a

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 $w{a}^{2}$ to nondimensionalize $M$ and by introducing a new variable, $u=x/a$, to nondimensionalize the horizontal coordinate. That gives us

$m=\frac{M}{w{a}^{2}}=\left\{\begin{array}{ll}\frac{u}{2}\left[7-u\right]& \mathrm{for}\phantom{\rule{0.22222em}{0ex}}0\le u\le 7\\ \frac{\left(u-7\right)}{2}\left[12-\left(u-7\right)\right]& \mathrm{for}\phantom{\rule{0.22222em}{0ex}}7

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

First, we define three $m$s, 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.