Let $f:\mathbb{R} \to \mathbb{R}$ be a function which satisfies $e^xf(y)+e^yf(x)=2e^{x+y}-e^{x-y}$ for all real $x$ and $y$.
If I place $x=y$, I get $f(x)=e^x-\frac{1}{2}e^{-x}$ which does not satisfy the original equation.
Now instead, if I set$x=y=0$, I get $f(0)=\frac{1}{2}$. Now setting $y=0$ in the original equation, I get $f(x)=\frac{e^x}{2}$.
My question is that why do we get incorrect and different solutions if we proceed in the ways mentioned above? Also, what is the correct solution of this functional equation and how can I find it?