TITLE: Period of the sum/product of two functions
QUESTION [60 upvotes]: Suppose that period of $f(x)=T$ and period of  $g(x)=S$, I am interested  what is  a period of $f(x) g(x)$? period of $f(x)+g(x)$? What I have tried is to search in internet, and found following link for this.
Also I know that period of $\sin(x)$ is  $2\pi$, but what about $\sin^2(x)$? Does it have period again $\pi n$, or? example is following function
$y=\frac{\sin^2(x)}{\cos(x)}$
i can do following thing, namely  we know  that  $\sin(x)/\cos(x)=\tan(x)$ and period of tangent function is $\pi$, so I can represent
$y=\sin^2(x)/\cos(x)$ as $y=\tan(x)\times\sin(x)$,but how can calculate period of this? 
Please help me.

REPLY [3 votes]: If you are suppose to find period of sum of two function such that, $f(x)+g(x)$ given that period of $f$ is $a$ and period of $g$ is $b$ then period of total $f(x)+g(x)$ will be $\operatorname{LCM} (a,b)$.
But this technique has some constrain as it will not give correct answers in some cases. One of those case is, if you take $f(x)=|\sin x|$ and $g(x)=|\cos x|$, then period of $f(x)+g(x)$ should be $\pi$ as per the above rule but, period of $f(x)+g(x)$ is not $\pi$ but $\pi/2$.
So in general it is very difficult to identify correct answers for the questions regarding period. 
Most of the cases graph will help.