I am trying to understand how to calculate the bending moment for a cantilever with a uniformly distributed load so that I can build an equation of moments, as shown in this example:
I tried calculating the moment but didn't arrive at their expression. I tried the following: $$M = -\int_0^x wl*dl + \int_0^{L-x} (L-x-l)w*dl $$ where L is the length of the beam, x is the position (for which I am calculating the moment) with respect to the end of the beam, and w is the weight per unit length. I have added the right integral to represent the moments from the forces applied to the right of position x, but from the example above it would seem that only the left integral contributes to the moment: $$M = -\int_0^x wl*dl = -wx^2/2$$ why am I supposed to disregard the moments from the right?