# Examples of non-constant functions $f(x)$ such that $f(x)=f(\pi+x)=f(\pi-x)$

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!

• Any (non-constant) periodic even function with period $\pi$ would suffice. (And only these functions work). So the simplest choice is probably $\cos(2x)$. I suspect when you tried $\cos(2x)$ you made a mistake when substituting $\pi-x$ or $\pi+x$. Oct 2, 2022 at 9:08
• Given that you say you tried $\cos(2x)$ (and that is an answer) it would be helpful to share what you tried. Oct 2, 2022 at 9:14

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.

$$\cos2x$$ does work.

$$f(x)=f(\pi+x)$$ states that the function has period $$\pi/n$$ for some natural number $$n$$. $$f(x)=f(\pi-x)$$ states that the function is even about $$\pi/2$$, and the two easily imply $$f(x)=f(-x)$$. $$\cos2x$$ satisfies both these conditions.

In general, specifying what the function is on $$[0,\pi/2]$$ will determine the rest of the function by repeated reflection.

We are looking for functions that are $$\pi$$-periodic, so later conditions can be simplified to just be even functions. Example could be $$\cos(2^n x)$$ where $$n = 1, 2, 3, \ldots$$.

You must have made some mistake when you checked that $$\cos(2x)$$ does not work.

The functions you tried, $$\sin x$$, $$\cos x$$ have period $$2\pi$$. When you try adding half the period to $$x$$, you get $$f(x+\pi)=-f(x)$$ for these two functions, so it is not them. The functions you are looking for must have period dividing $$\pi$$. To change a period from $$P$$ to $$P/n$$ consider $$f(nx)$$. So, $$\sin (nx)$$ and $$\cos (nx)$$ have period $$2\pi/n$$ which divides $$\pi$$ for $$n=2k$$ even. Now, $$\cos(2kx)$$ is an even function, giving $$f(\pi-x)=f(x-\pi)=f(x)$$. So, some examples are $$\cos(2kx)$$ where $$k$$ is a positive integer.