# 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?

• Try $\cos^2 x = \frac{1}{2}(1 + \cos 2x)$ – Klint Qinami Mar 29 '16 at 13:17
• The result of partial integration depends on the functions $u$ and $v$ you choose. If you choose wrong, you can get something useless as a result – Yuriy S Mar 29 '16 at 13:19
• @YuriyS Chosing between $\sin x$ and $\sin x$ can yields different results - it the same :P – Christian Ivicevic Mar 29 '16 at 13:20
• @ChristianIvicevic, I considered you question carefully - and the answer is - of course doing partial integration two times and using $\cos x$ or $\sin x$ as chosen functions will get you a triviality as a result. It's because $(\cos x)''=-\cos x$ and the same for $\sin x$ – Yuriy S Mar 29 '16 at 13:25

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$

• I know that I am going round and round but I was curious whether there is a more thorough explanation why besides $(\cos x)''=-\cos x$. – Christian Ivicevic Mar 30 '16 at 17:36

Hint: $$\color{blue}{\cos^2x=\frac 1 2 \cos(2x)+\frac 1 2}$$

$$=\frac 1 2\int \cos (2x)dx+\frac 1 2 \int 1 dx$$

• I added the differential on the first integral. Hope you don't mind. – zz20s Mar 29 '16 at 13:19