5
$\begingroup$

These functions are equal. But I don't understand why.

$$a \leftrightarrow f(x) =|\cos(2\pi x)|^2$$

$$b \leftrightarrow f(x) = \dfrac{\cos(4\pi x)}{2} + 0.5$$

Which results both in this plot:

Plot

$\endgroup$

1 Answer 1

14
$\begingroup$

They are the same because $$|\cos(x)|^2=\cos^2(x)=\frac{1+\cos(2x)}{2}=\frac{\cos(2x)}{2}+\frac{1}{2}.$$ (Note that the absolute value doesn't do anything, because of the square; i.e., $x^2=|x|^2$ for any $x$.) See here. This can be derived as follows:

For any $x$ and $y$, we have $$\cos(x+y)=\cos(x)\cos(y)-\sin(x)\sin(y).$$ Thus, $$\cos(2x)=\cos^2(x)-\sin^2(x)$$ $$\cos(2x)=\cos^2(x)-(1-\cos^2(x))$$ $$\cos(2x)=2\cos^2(x)-1$$ and therefore $$\cos^2(x)=\frac{1+\cos(2x)}{2}$$

Here is another, more direct derivation, using complex exponential definition of cosine: $$\cos^2(x)=\left(\frac{e^{ix}+e^{-ix}}{2}\right)^2=\frac{(e^{ix})^2+2(e^{ix})(e^{-ix})+(e^{-ix})^2}{4}=$$ $$\frac{e^{i(2x)}+e^{-i(2x)}+2}{4}=\frac{\cos(2x)+1}{2}$$

$\endgroup$
5
  • $\begingroup$ Thanks. I can accept, but not +1... "An error has occurred - please retry your request" I already tried 5 times. $\endgroup$ Jun 27, 2011 at 8:51
  • $\begingroup$ @Martijn: Hmm, that's a bit odd. I guess try refreshing the page, or restarting your browser? If it doesn't work, don't worry about it, one upvote is not much in the grand scheme of things :) $\endgroup$ Jun 27, 2011 at 8:53
  • 1
    $\begingroup$ Really strange, I restarted the browser already. I can't down vote as well (just to try ;)). $\endgroup$ Jun 27, 2011 at 8:57
  • $\begingroup$ Aha, succeeded. I logged out from the site, and logged in again. Now, I can see my upvote was registered, but I was unable to see it. $\endgroup$ Jun 27, 2011 at 9:00
  • $\begingroup$ Another way to see they are equal is to consider the derivative of their difference. It's zero, so the difference is a constant, and the constant can be found by considering the difference at any convenient value such as x=0. $\endgroup$
    – tzs
    Jun 27, 2011 at 11:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .