Indefinite Integrals of $trig^2(x)$
Index
\[\begin{aligned}
& \int \sin^2(x) \,\mathrm{d}x = \dfrac{x}{2} - \dfrac{\sin(2x)}{4} + C \\
& \int \cos^2(x) \,\mathrm{d}x = \dfrac{x}{2} + \dfrac{\sin(2x)}{4} + C \\
& \int \tan^2(x) \,\mathrm{d}x = \tan(x) - x + C \\
& \int \cot^2(x) \,\mathrm{d}x = -\cot(x) - x + C \\
& \int \sec^2(x) \,\mathrm{d}x = \tan(x) + C \\
& \int \csc^2(x) \,\mathrm{d}x = -\cot(x) + C
\end{aligned}\]
sin
\[\begin{aligned}
\sin^2(x) &= \dfrac{1-\cos(2x)}{2} \\
\therefore \int \sin^2(x) \,\mathrm{d}x &= \int \dfrac{1-\cos(2x)}{2} \,\mathrm{d}x \\
&= \dfrac{1}{2} \int (1-\cos(2x)) \,\mathrm{d}x \\
&= \dfrac{1}{2} \left( x - \dfrac{\sin(2x)}{2} \right) + C \\
&= \dfrac{x}{2} - \dfrac{\sin(2x)}{4} + C
\end{aligned}\]
cos
\[\begin{aligned}
\cos^2(x) &= \dfrac{1+\cos(2x)}{2} \\
\therefore \int \cos^2(x) \,\mathrm{d}x &= \int \dfrac{1+\cos(2x)}{2} \,\mathrm{d}x \\
&= \dfrac{1}{2} \int (1+\cos(2x)) \,\mathrm{d}x \\
&= \dfrac{1}{2} \left( x + \dfrac{\sin(2x)}{2} \right) + C \\
&= \dfrac{x}{2} + \dfrac{\sin(2x)}{4} + C
\end{aligned}\]
tan
\[\begin{aligned}
\int \tan^2(x) \,\mathrm{d}x &= \int (\sec^2(x) - 1) \,\mathrm{d}x \\
&= \int \sec^2(x) \,\mathrm{d}x - \int 1 \,\mathrm{d}x \\
&= \tan(x) - x + C
\end{aligned}\]
cot
\[\begin{aligned}
\int \cot^2(x) \,\mathrm{d}x &= \int (\csc^2(x) - 1) \,\mathrm{d}x \\
&= \int \csc^2(x) \,\mathrm{d}x - \int 1 \,\mathrm{d}x \\
&= -\cot(x) - x + C
\end{aligned}\]
sec
\[\begin{aligned}
\dfrac{\mathrm{d}}{\mathrm{d}x}\tan(x) &= \sec^2(x) \\
\therefore \int \sec^2(x) \,\mathrm{d}x &= \tan(x) + C
\end{aligned}\]
csc
\[\begin{aligned}
\dfrac{\mathrm{d}}{\mathrm{d}x}\cot(x) &= -\csc^2(x) \\
\therefore \int \csc^2(x) \,\mathrm{d}x &= -\cot(x) + C
\end{aligned}\]