Problem [B2 from IMO 1972] f and g are real-valued functions defined on the real line. For all x and y,

f(x + y) + f(x − y) = 2f(x)g(y).

f is not identically zero and |f(x)| ≤ 1 for all x. Prove that |g(x)| ≤ 1 for all x.