The bending moment M applied to the beam as shown will create tension stress in the upper portion of the cross section and compression stress in the lower portion.
The flexure formula
will be used to compute bending stresses in the beam.
Rearrange the flexure formula to solve for the moment M: