# Why does$\int (\frac{1}{2}(1-\cos(2x))^2dx = \frac{1}{4}\int(1-2\cos(2x)+\cos^2(2x))dx$?

I am curious why $$\int (\frac{1}{2}(1-\cos(2x))^2dx = \frac{1}{4}\int(1-2\cos(2x)+\cos^2(2x))dx$$.

I am practicing on Khan Academy and going through a video where Sal Khan demonstrates how to solve $$\int \sin^4(x)dx$$.

The steps are:

$$\int \sin^4(x)dx$$ $$=\int (\sin^2(x))^2dx$$ $$=\int (\frac{1}{2}(1-\cos(2x))^2dx$$ $$=\frac{1}{4}\int(1-2\cos(2x)+\cos^2(2x))dx$$

However, I'm not sure why $$\int (\frac{1}{2}(1-\cos(2x))^2dx \neq \frac{1}{4}\int1-\cos^2(2x)dx$$, since $$(\frac{1}{2})^2=\frac{1}{4}$$, $$1^2=1$$, and $$(cos(2x))^2=cos^2(2x)$$.

I am not very skilled, so I'm probably wrong.

Why does $$\int (\frac{1}{2}(1-\cos(2x))^2dx = \frac{1}{4}\int(1-2\cos(2x)+\cos^2(2x))dx$$?

• This is because $(a - b)^2 = a^2 + b^2 - 2ab$ and not $a^2 - b^2$. You can check the same by expanding $(a - b)^2$ as $(a -b) \times (a -b)$ – sudeep5221 May 27 '19 at 13:44
• @ajotatxe Thanks I have fixed it. – LuminousNutria May 27 '19 at 13:45
• @sudeep5221 I see! thank you! – LuminousNutria May 27 '19 at 13:46

$$(1-\cos 2x)^2=1-2\cos 2x+\cos^2 2x$$ but not $$1-\cos^22x$$.

More generally, $$(a-b)^2=(a-b)(a-b)=a(a-b)-b(a-b)=a^2-ab-ab+b^2=a^2-2ab+b^2$$. It is not equal to $$a^2-b^2$$.

You may take some examples. If $$a=3$$ and $$b=1$$, $$(a-b)^2=2^2=4$$.

$$a^2-2ab+b^2=(3)^2-2(3)(1)+(1)^2=9-6+1=4$$ but $$a^2-b^2=3^2-1^2=8$$.

If $$a$$ and $$b$$ are two numbers, $$(a-b)^2=a^2-2ab+b^2$$. So$$\left(\frac12\bigl(1-\cos(2x)\bigr)\right)^2=\frac14\bigl(1-\cos(2x)\bigr)^2=\frac14\bigl(1-2\cos(2x)+\cos^2(2x)\bigr).$$

This is a common basic algebra mistake. Students falsely assume that $$(a+b)^2=a^2+b^2$$

Well the correct formula is $$(a+b)^2=(a+b)(a+b)=a^2+2ab+b^2$$

It takes time and practice to sink in.