In the regions of a positive moment, a portion of the slab works with the beam (both under compression force), so that part should be included in the beam design. However, negative moments develop cracks at the upper part of the beam. So, the cracked part of the concrete section is neglected in the design, and the lower portion is in compression which is rectangular.

Seth Morgan
Construction Superintendent