# How to find the period of $\cos(|\sin x|-|\cos x|)$?

My book did provide a rule as:

If $f_1(x),f_2(x)$ are periodic functions with periods $T_1, T_2$ respectively, then we have $h(x)= f_1(x) + f_2(x)$ has period, as

$\bullet$ LCM of $\{T_1, T_2\}$, if $h(x)$ is not an even function .

$\bullet$ $1\over 2$ LCM of $\{T_1, T_2\}$, if $f_1(x),f_2(x)$ are complementary pairwise comparable functions.

I applied the second one for $|\sin x|-|\cos x|$ & found the period $\pi\over 2$ but my book did it like that:

As, $\cos\theta$ is even & $|\sin x|-|\cos x|$ has the period $\pi$,$$\therefore\;\;\cos(|\sin x|-|\cos x|) \;\text{has period}\; {\pi\over2}$$ that is half the period of $g(x)$, if $f(x)$ is even in $fog(x)$

My questions are:

$\bullet$ The book has provided the rule for $f_1(x) + f_2(x)$. I've applied it on $|\sin x|-|\cos x|$ to get a wrong result; after all it is in the form $f_1(x)-f_2(x)$. So, what should be the rule for $f_1(x)-f_2(x),\;\; f_1(x)\cdot f_2(x),\;\; \&\; \dfrac{f_1(x)}{f_2(x)}$??

$\bullet$ The book was horrible in its explanation in finding the solution. How did it use the fact that $\cos\theta$ is even; "As, $\cos\theta$ is even..."? Can anyone help me explain what the book wanted to tell, especially the bold line in the quote above: "half the period of $g(x)$, if $f(x)$ is even in $fog(x)$"??

• Hint: the rule for $f_1-f_2$ it the same as for $f_1+f_2$, by taking $f'_2=-f_2$. The rule for $f_1\cdot f_2$ is the same as for $f_1+f_2$ by taking the logarithm... – Yves Daoust Sep 2 '15 at 10:28
• @Yves Daoust: Thanks, sir; you could provide it as an answer as it is worthy to be an answer:) BTW, I would appreciate if you provide some illustrations. – user142971 Sep 2 '15 at 10:32