<s>[INST] Integration of $\sin^2x$ without using double angle identity of $\cos 2x$ I want to integrate $\sin^2x$ without using the double angle identity of $\cos2x$.
Here's what I tried:
$$
\int \sin^2x dx
= \int \sin x \tan x \cos x dx
$$
Let $u = \sin x$ => $du = \cos x dx$
And if $u = \sin x$, $\tan x = \frac{u}{\sqrt{1-u^2}}$, therefore
$$
=\int u × \frac{u}{\sqrt{1-u^2}}du = \int \frac{u^2}{\sqrt{1-u^2}}du
$$
Now if $t = \sqrt{1 - u^2}$, $2dt = \frac{du}{\sqrt{1-u^2}}$ and $u^2 = 1 - t^2$
$$
= 2\int (1-t^2)dt = 2t - \frac{2t^3}{3}$$
Substituting back $u$ and $\sin x$
$$
= 2\sqrt{1-u^2} - \frac{2}{3}(\sqrt{1 - u^2})^3
$$
$$
= 2\cos x - \frac{2}{3}\cos^3x
$$
But when you differentiate it you get $-2sin^3x$
All the steps seem right to me, why is the answer wrong or what I did is wrong, and is using the double angle formula the only way to integrate it?
 [/INST] You can avoid using the double angle formula by integrating by parts $$\int\sin^2x\,\mathrm{d}x = -\cos x \sin x + \int \cos^2 x \,\mathrm{d}x = -\cos x \sin x + x - \int \sin^2 x \,\mathrm{d}x. $$
</s>