Various ways to calculate $\int \sin(x) \cos(x) \, \mathrm{d}x$

This integral tolarates almost any substitution. In general, let $\sin x = f(u)$, where the substitution function $f(u)$ is of suitable range, but otherwise arbitrary. Then, $\cos x \> dx =f’(u)\>du$ and $$\int \sin x \cos x \>dx =\int f(u)f’(u)du =\frac12f^2(u)=\frac12\sin^2 x+C\tag1 $$

Thus, whatever form of $f(u)$ to be used, regardless of its complexity, invariably leads to the result $\frac12\sin^2x+C$, as shown in (1). As an example, the substitution $u=\sec x$ listed in OP corresponds to $$f(u)=\sin(\sec^{-1} u)=\frac{\sqrt{u^2-1}}u,\>\>\> f’(u)= \frac1{u^2\sqrt{u^2-1}}$$ Hence, there are countless number of ways to integrate $\int \sin x \cos x \>dx$, all because of unlimited choices of $f(u)$.


Write

\begin{align*} \mathcal{J}_+ &= \int (\cos x + \sin x)^2 \, \mathrm{d}x, & \mathcal{J}_- &= \int (\cos x - \sin x)^2 \, \mathrm{d}x. \end{align*}

On one hand, we have

\begin{align*} \mathcal{J}_+ - \mathcal{J}_- = 4 \int \cos x \sin x \, \mathrm{d}x = 4\mathcal{I}. \end{align*}

On the other hand, integration by parts shows that

$$ \mathcal{J}_- = (\cos x - \sin x)(\cos x + \sin x) + \mathcal{J}_+. $$

Therefore it follows that

$$ \mathcal{I} = \frac{1}{4}(\mathcal{J}_+ - \mathcal{J}_-) = \frac{\sin^2 x - \cos^2 x}{4} + C $$


$$\begin{align*} \int\sin{x}\cos{x}dx &= \frac{1}{4}\int\frac{4\tan{x}\sec^2{x}}{\sec^2{x}\sec^2{x}}dx\\ &= \frac{1}{4}\int\frac{4\tan{x}\sec^2{x}}{(1+\tan^2{x})^2}dx\\ &=\frac{1}{4}\int\frac{2\tan{x}\sec^2{x}((1+\tan^2{x})-(\tan^2{x}-1))}{(\tan^2{x}+1)^2}dx\\ &=\frac{1}{4}\int\frac{2\tan{x}\sec^2{x}(1+\tan^2{x})-(\tan^2{x}-1) \cdot 2\tan{x}\sec^2{x}}{(\tan^2{x}+1)^2}dx\\ &=\frac{1}{4}\int\frac{(1+\tan^2{x})\frac{d(\tan^2x-1)}{dx}-(\tan^2{x}-1)\frac{d(\tan^2{x}+1)}{dx}}{(1+\tan^2{x})^2}dx\\ &=\frac{1}{4}\int\frac{d}{dx}\frac{(\tan^2x-1)}{(\tan^2x+1)}dx\\ &=\frac{(\tan^2x-1)}{4(\tan^2x+1)}+ C_0 \end{align*}$$

  • If same answer with different methods are allowed then this could be possible.

$\begin{align*} I & =\int SC \\ &= S\int C - \int( {S' .\int C})\\ & = S^2 - \int CS = S^2-I \end{align*}$

$$\begin{align*} 2I & =S^2\\ &\implies I = \frac{\sin^2x}{2} +c_0\\ \end{align*}$$

Of course! When you will take $CS$ type you will get $$-\frac{\cos^2{x}}{2}+c_1$$


The following may also be noted:

  1. Let $I'=2\int \sin ^2(x+\frac \pi 4)$ so that

$$I'=2\int \sin ^2(x+\frac \pi 4)=\int1-\cos(2x+\frac\pi 2)=x-\frac 12\cos 2x$$

Also, $I'=\int (\sin x+\cos x)^2\,dx=\int1+2\sin x\cos x\,dx=x+2I$

It follows by FTC that: $(x+2I)=(x-\frac 12 \cos 2x)+c\implies I=-\frac 14\cos 2x+c'$, where $c'$ is integration constant.

  1. Substitution $u:=\sin^2x$ quickly gives $I=\frac u2+c.$ (Similarly, substitution $u:=\cos^2x$ also works).

Let's make a series out of integration by parts. Let

$$I = \int \frac{1}{2}\sin 2x\:dx = \frac{1}{2}x\sin2x-\int x\cos 2x\:dx$$

Then keep going

$$I = \frac{1}{2}x\sin 2x - \frac{1}{2}x^2\cos 2x - \int x^2\sin 2x \;dx$$

$$= \frac{1}{2}x\sin 2x - \frac{1}{2}x^2\cos 2x - \frac{1}{3}x^3\sin 2x + \int\frac{2}{3}x^3\cos 2x\:dx$$

$$= \frac{1}{2}x\sin 2x - \frac{1}{2}x^2\cos 2x - \frac{1}{3}x^3\sin 2x + \frac{1}{6}x^4\cos2x + \int \frac{1}{3}x^4\sin 2x\:dx$$

or in other words the sum of the following two series

$$I = \sin 2x\left(\frac{1}{2}x-\frac{1}{3}x^3+\frac{1}{15}x^5-\cdots\right)-\cos 2x\left(\frac{1}{2}x^2-\frac{1}{6}x^4+\frac{1}{45}x^6-\cdots\right)$$