\begin{align} M= & \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\sin^2(x)}{1+e^x}dx \\
=& \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\sin^2(-x)}{1+e^{-x}}dx \\
=& \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\sin^2(x)}{1+e^{-x}}dx \\
\end{align}
\begin{align} M+M= & \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\sin^2(x)}{1+e^x}dx + \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\sin^2(x)}{1+e^{-x}}dx \\
=& \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin^2(x) (\frac{1}{1+e^x} + \frac{1}{1+e^{-x}})dx \\
=&\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin^2(x) (\frac{1}{1+e^x} + \frac{e^x}{e^x+1})dx \\
=&\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin^2(x) (\frac{1+e^x}{e^x+1})dx \\
\end{align}
\[2M = \int_{\frac{-\pi}{2}}^{\frac{\pi}{2}} \sin^2(x) dx \]
\begin{align} M =& \frac{1}{2}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \sin^2(x) dx \\
=& \int_{0}^{\frac{\pi}{2}} \sin^2(x) dx\\
=& \frac{\pi}{4}
\end{align}