I am trying to find a non-constant functions $f(x)$ satisfying $f(x)=f(\pi+x)=f(\pi-x)$.
I tried to use $f(x)=\sin(x)$, $f(x)=\cos(x)$,$f(x)=\sin(x/2)$, $f(x)=\cos(x/2)$,$f(x)=\sin(2x)$, $f(x)=\cos(2x)$, and some other functions involving other trigonometric ratios, also tried to combine some of them together, but I failed.
Your help would be appreciated. THANKS!
Let's start by figuring out some properties such a function would have. So firstly, for any $x$ we have that
$$f(-x)=f(\pi+x),$$
from which it follows that
$$f(x)=f(-x),$$
i.e. $f$ is even. Furthermore, as $f(x)=f(x+\pi)$, we must have that $f$ is $\pi$-periodic. So let us try a $\pi$-periodic even function and see if it works. An easy one to check is
$$f(x)=\cos 2x.$$
And indeed then
$$f(x+\pi)=\cos(2x+2\pi)=\cos2x=f(x),$$
and
$$f(\pi-x)=\cos(2\pi-2x)=\cos(-2x)=\cos 2x=f(x).$$
Thus $f(x)=\cos 2x$ works.
EDIT:
Actually, we can use the same check to show that any even $\pi$-periodic function works. Indeed suppose $f$ is even and $\pi$-periodic. Then
$$f(x+\pi)=f(x)$$
and
$$f(\pi-x)=f(-x)=f(x).$$
It follows then that $f$ satisfies $f(x)=f(\pi+x)=f(\pi-x)$ if and only if $f$ is even and $\pi$-periodic.