Show that
\[ \mathrm{sec}^2\left(\tfrac14\pi-\tfrac12 x\right)=\frac{2}{1+\sin x} \,.
\]
Hence integrate \(\dfrac{1}{1+\sin x}\) with respect to \(x\).
By means of the substitution \(y=\pi -x\), show that
\[
\int_0^\pi x \f (\sin x)\, \d x = \frac \pi 2 \int_0^\pi \f(\sin x) \, \d x
,\]
where \(\mathrm{f}\) is any function for which these integrals exist.
Hence evaluate
\[
\int_0^\pi \frac x {1+\sin x} \, \d x
\,.
\]
Evaluate
\[
\int_0^\pi\frac{ 2x^3 -3\pi x^2}{(1+\sin x)^2}\, \d x
.\]