Functional Equation Problem Solving Substitution In the question below we are asked to find functions satisfying the functional equation for all $x,y \in \mathbb{R}$.
But when we substitute $x=-y$, the variable $y$ becomes dependent of $x$.
Now the solution that is given is not for all pairs of $(x,y)$ but only for pairs $(x,-x)$. 
And at the end it is written that this is the only solution.
My question is how can we substitute $x=-y$ when they are independent? and if we do that then how is this the only possible solution? 


Since pairs $(x, -x)$ is a subset of the set of all pairs $(x, y)$, substituting $(x, -x)$ satisfies the conditions of the functional equation. We are trying to find a small number of plausible solutions that the expression implies.
So far, this verifies that $f(x)=0$ is the only viable solution. If you want to verify, you can substitute it into the original equation to check if the original equation holds. This is required to obtain a complete analysis of this functional equation.
If the original equation does not hold with the plausible solutions, you can conclude that no solutions exist. Otherwise, you know that that is the only solution.
