Issues computing $\int\cos^2x~\mathrm{d}x$ without using $\sin^2(x)=1-\cos^2(x)$ I was working on the integral
$$\int\cos^2x~\mathrm{d}x$$
and using the identity $\sin^2(x)=1-\cos^2(x)$ after the first partial integration to rewrite the remainder of the integration yields $\int\cos^2x~\mathrm{d}x = 1/2(\cos x\sin x+x)$. If I don't do this step of using the identity and do two partial integrations I get the obviosuly true expression
$$\int\cos^2x~\mathrm{d}x=\cos x\sin x-\cos x\sin x+\int\cos^2x~\mathrm{d}x$$
which is basically $0=0$. Why is it so that two partial integrations don't help at all?

It means you are going round and round on the answer . You can also use $\cos(2x)=2\cos^2(x)-1=\frac{1-\tan^2(x)}{1+\tan^2(x)}$ and then normal substitution of $\tan(x)=t$
