A
primitive function
for the
sine function
is
. In order to find a primitive function for
, we use integration by parts to get a recursive relation to a power with a smaller exponent. To make this more precise, we work over an interval, the primitive function shall start at
and have the value
there. For
,
with
integration by parts,
we get
![{\displaystyle {}{\begin{aligned}\int _{0}^{x}\sin ^{n}t\,dt&=\int _{0}^{x}\sin ^{n-2}t\cdot \sin ^{2}t\,dt\\&=\int _{0}^{x}\sin ^{n-2}t\cdot {\left(1-\cos ^{2}t\right)}\,dt\\&=\int _{0}^{x}\sin ^{n-2}t\,dt-\int _{0}^{x}{\left(\sin ^{n-2}t\cos t\right)}\cos t\,dt\\&=\int _{0}^{x}\sin ^{n-2}t\,dt-{\frac {\sin ^{n-1}t}{n-1}}\cos t|_{0}^{x}-{\frac {1}{n-1}}{\left(\int _{0}^{x}\sin ^{n}t\,dt\right)}.\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/848ab1d11ca39fa47fc608a9e029121d82d2f76e)
Multiplication with
and rearranging yields
-
![{\displaystyle {}n\int _{0}^{x}\sin ^{n}t\,dt=(n-1)\int _{0}^{x}\sin ^{n-2}t\,dt-\sin ^{n-1}x\cos x\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/cf92420fab7a6873e9b05ec1a243502a92b8bf91)
In particular, for
,
we have
-
![{\displaystyle {}\int _{0}^{x}\sin ^{2}t\,dt={\frac {1}{2}}{\left(x-\sin x\cos x\right)}\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8289de53d7b715814e5e70092eff46f1c5e48740)