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?
$$f(x)=| \sin(x) + \cos(x) | =\sqrt{2}\Big|\sin(x+{\pi\over 4})\Big|$$
Now $$f(x+\pi) = \sqrt{2}\Big|\sin(x+{\pi\over 4}+\pi)\Big| = \sqrt{2}\Big|\sin(\pi-(x+{\pi\over 4}+\pi))\Big|$$ $$=\sqrt{2}\Big|\sin(-x-{\pi\over 4})\Big|= \sqrt{2}\Big|-\sin(x+{\pi\over 4})\Big|=f(x)$$
So the peroid of $f$ is $\pi$.