Pexerized Dalembert functional equation..

Let $\lambda$ be a nonzero real constant. Find all functions $f,g: \Bbb R \rightarrow \Bbb R$ that satisfy the functional equation $f(x+y)+g(x−y)=\lambda f(x)g(y)$.

I try this :

Let $y=0$ in the equation to get $f(x)+g(x)=\lambda f(x)g(0)$

Here We have two cases:

1. $g(0)=0$ here $f(x)=-g(x)$

2. $g(0) \neq 0$ here $g(x)=\beta f(x)$ , $\beta = g(0)\lambda-1$

Is this true? And if this true how I can complete the the solution especially in case two?

Just the idea, you need to calculate them yourself.

First, $y=0$.

$g(x) = (\lambda g(0) - 1)f(x)$, to be short, there is a constant $C$, that

$$g(x) = Cf(x)$$

so

$$f(x+y) + Cf(x-y) = \lambda C f(x)f(y)$$

take $x=y$.

$$f(2x) = \lambda C f(x)^2 - Cf(0)$$

take $x=2y$

$f(3y) + f(y) = \lambda C f(2y) f(y) = \lambda C(\lambda C f(y)^2 - Cf(0))f(y) = (\lambda C)^2 f(y)^3 - \lambda C^2f(0)f(y)$

$$f(3y) = (\lambda C)^2 f^3(y) - (1 + \lambda C^2 f(0))f(y)$$

take $x = 3y$

$$f(4y) = \lambda C f(3y)f(y) - Cf(2y)$$

also

$$f(4y) = \lambda C f(2y)^2 - Cf(0)$$

solve this , you can get

$$(-\lambda - \lambda C +\lambda^2 C^2 f(0)) f(x)^2 = (\lambda C^2 - C - 1)f(0)$$

then it is easy to observe that if the coefficient of left side is not zero, then $f$ is a constant.