period of a function $\lvert\sin x\rvert+\lvert\cos x\rvert$ I have read that $$y=\lvert\sin x\rvert+ \lvert\cos x\rvert $$ is periodic with fundamental period $\frac{\pi}{2}$.
But Wolfram says it is periodic with period $\pi$.
Please tell what is correct.
 A: Don't trust Wolfram when also you have pen and paper available.
Of course, $x\mapsto \sin x$ and $x\mapsto \cos x$ are functions with period $2\pi$. Composing them with some other function (here the absolute value) gives us functions having $2\pi$ as a period as well. But since $\sin(x+\pi)=-\sin x$ (and similarly for cosine), the absolute value in fact introduces the smaller period $\pi$. Finally adding two functions having $\pi$ as a period gives another function having $\pi$ as a period. But since $|\sin(x+\frac\pi2)|=|\cos x|$ and $|\cos(x+\frac\pi2)|=|\sin x|$, swapping the summands introduces a shorter period again, that is $\frac\pi2$ is a period of our function.
To see that it is fundamental, i.e. that there is no smaller positive number with $f(x+p)=f(x)$ for all $x$, observe that $f(x)=1$ iff $x=\frac\pi2k$ for some $k\in \mathbb Z$ (why?) or that $f$ fails to be differentibale precisely for $x=\frac\pi2 k$ (why?) or that $f$ is strictly increasing on $[0,\frac\pi4]$ (why? and why doe sthat show that $\frac\pi2$ is minimal?) or look for other distinctive features preventing smaller periods ...
A: Hint 1: $|\sin(x)|$ and $|\cos(x)|$ have period $\pi$
Hint 2: $(|\sin(x)|+|\cos(x)|)^2=1+|2\sin(x)\cos(x)|=1+|\sin(2x)|$
A: Hint: Note that $\sin(x+\pi/2) = \cos(x)$ and $\cos(x+\pi/2)=-\sin(x)$.
A: If you look at the graphs you can see the difference. what is a fundamental period? 
A: You should try this and figure it out. It is not that hard, and it is a bad habbit to give up on something that you can do. Wolfram alpha is not always correct, it's written by humans.

It's true that this function is $\pi$ periodic, just that its prime period is $\frac{\pi}{2}$.
A: square it and simplify - gives period
A: The results coming from any software should be checked and considered from multiple angles.  Part of the reason the graph is provided is precisely to help you do that.  In this case, the graph makes it crystal clear that the result is twice the smallest period.

This is a bug and you can feel free to report it as such using the "Give us your feedback" window at the bottom of the page.
Ultimately, the problem is the following Mathematica computation:
Periodic`PeriodicFunctionPeriod[Abs[Sin[x]] + Abs[Cos[x]], x]
(* Out: Pi *)

