Find period of the following function Find period of : 
$$f(x)=| \sin(x) + \cos(x) |$$
Attempt:
Let $$f(x)=|\sin x +\cos x|\tag{I}$$
Let $t$ be the required period,
So,
$f(x)=f(x+t)$  
Putting $x=0$ we get,
$f(0)=f(t)$
f(0)=1 (from 'I')
Now we have the following,
$1=| \sin t + \cos t |$
If we put $t=\pi/2$ ,that would satisfy the equation. But when I put $t=\pi/2$ in $f(x+t)$,
I do not get $f(x)$ ,that means $\pi/2$ is not the period of the function. What I have done wrong?

Let's assume you do not know the shape of the graphs but want to find the period. We will assume that you can evaluate the functions and know the sum and difference formulas for sine and cosine.
\begin{eqnarray}
 |\sin x+\cos x|&=&|\sin(x+t)+\cos(x+t)|\\
&=&|\sin x\cos t+\cos x\sin t+\cos x\cos t-\sin x\sin t|\\ 
&=&|\sin x\cos t+\cos x\sin t+\cos x\cos t+\sin x\sin t-2\sin x\sin t|\\
&=&|(\sin x+\cos x)(\sin t+\cos t)-2\sin x\sin t|
\end{eqnarray}
Since $\sin\pi=0$ and $\cos\pi=-1$we see that when $t=\pi$ we get
$$|(\sin x+\cos x)(\sin \pi+\cos \pi)-2\sin x\sin \pi|=|-(\sin x+\cos x)|$$
But $|-(\sin x+\cos x)|=|\sin x+\cos x|=f(x)$
