8

How can I solve this functional equation, where $x,y$ are any real numbers and $f:\mathbb{R}\to \mathbb R$ is a function such that : $$f(x+y)+f(x-y)=2f(x)\cos y$$


I tried substituting $x=0$ to get $f(y)+f(-y)=2f(0)\cos y$ . Taking $x=y$ gives $f(2x)+f(0)=2f(x)\cos x$. I similar get some more relations like that, but its not really helping me in finding anything useful. I also think the function must either be $\sin$ or $\cos$ looking at the product to sum formulae. Can anyone tell me how should I solve this?

Sawarnik
  • 7,284
  • 7
  • 33
  • 74
  • 1
    Have you tried sin and/or cos? It's a reasonable first thought. – Julia Hayward Jan 23 '15 at 13:29
  • Think about trig product identities and if it makes sense to let $f(x)=\sin(x)$ or $f(x)=\cos(x)$. – Laars Helenius Jan 23 '15 at 13:36
  • @LaarsHelenius Yes, I know that they are valid solutions, but are they the only ones? – Sawarnik Jan 23 '15 at 13:37
  • Let $y=\pi/2$, and you find $f(x+\pi)=-f(x)$. So it is periodic with $f(x+2\pi)=f(x)$. I'm guessing that Fourier series would be new to you though. – Empy2 Jan 23 '15 at 13:40
  • @Michael Yes, I don't know about them. – Sawarnik Jan 23 '15 at 13:43
  • Unless you know more about the properties of $f$, I think this is the best you can do. For example, if you knew $f(x)=mx+b$ were linear, then you could show that any linear function satisfies this property as long as $\cos(y)=1$. – Laars Helenius Jan 23 '15 at 13:48

2 Answers2

8

Let $P(x,y)$ be the functional equation $$f(x+y)+f(x-y)=2f(x)\cos y\text{,}\tag{0}\label{0}$$ $A=f(0)$ and $B=f\left (\frac{\pi}{2}\right )$.

$$P(0,x)\implies f(x)+f(-x)=2A\cos x\text{.}\tag{1}\label{1}$$ $$P\left (x+\frac{\pi}{2},\frac{\pi}{2}\right )\implies f(x+\pi)+f(x)=0\text{.}\tag{2}\label{2}$$ $$P\left (\frac{\pi}{2},x+\frac{\pi}{2}\right )\implies f(x+\pi)+f(-x)=-2B\sin x\text{.}\tag{3}\label{3}$$

So, by $\frac{\eqref{1}+\eqref{2}-\eqref{3}}{2}$, $$f(x)=A\cos x+B\sin x\text{.}\tag{4}\label{4}$$

Substituting \eqref{4} in \eqref{0}, the functional equation works, regardless of the values of $A$ and $B$. So we have found all the solutions.

7

If you could assume (or prove) that $f$ belongs to $\mathcal{C}^2(\mathbb{R})$, then you could do something like this:

Fix an arbitrary $x$, and apply $\frac{\mathrm{d}}{\mathrm{d}y}$ to both sides

\begin{align} f(x+y) + f(x-y) &= 2f(x)\cos(y)\\ f'(x+y) - f'(x-y) &= -2f(x)\sin(y)\\ f''(x+y) + f''(x-y) &= -2f(x)\cos(y) \end{align}

adding the first and last equality together yields

$$f''(x+y) + f''(x-y) + f(x+y) + f(x-y) = 0$$

for any $x \in \mathbb{R}$. Now substitute $y = 0$ to get $f''(x) + f(x) = 0$ with general solution $$f(x) = c_1 \sin(x) + c_2 \cos(x).$$

I hope this helps $\ddot\smile$

dtldarek
  • 37,381
  • @dtdarek How can you assume that function is differentiable? – mathophile Feb 02 '22 at 14:02
  • @mathophile In general I can't, that's why I have a disclaimer at the top of my answer. That being said, such assumptions frequently happen or are even implicit in many cases. Also, even if there is no such assumptions, sometimes it's good to know tricks that allow you to "guess" the solution and then find another method to prove it without that assumption. – dtldarek Mar 13 '22 at 09:35