How would I solve $x^2-4x=y^2-4y$ without knowing the answer beforehand? The equation is $x^2-4x=y^2-4y$ in the case where $x\ne y$. The answer is $x+y=4$. 
I can start from $x+y=4$ and create the equation very easily, and I can substitute $x+4=y$ into the equation and show both sides are equal easily. I just don't get how I would find the answer if I didn't know it before hand, and all I had was the equation? Any advice? 
 A: Let $c$ be the common value of $x^2-4x$ and $y^2-4y$.  Then $x$ and $y$ are both roots of the polynomial $t^2-4t-c$.  Since we are assuming $x$ and $y$ are distinct, they are all of the roots, so $t^2-4t-c$ factors as $(t-x)(t-y)$.  Since $(t-x)(t-y)$ expands to $t^2-(x+y)t+xy$, comparing the coefficients of $t$ gives $x+y=4$.
(Conversely, if $x+y=4$, then since $x$ and $y$ are both roots of $(t-x)(t-y)=t^2-(x+y)t+xy=t^2-4t+xy$, $x^2-4x$ and $y^2-4y$ are both equal to $-xy$.)
A: \begin{align} x^2 - 4x &= y^2 - 4y \\ x^2 - y^2 &= 4x - 4y \\
(x-y)(x+y) &= 4(x-y) \\
x+y &= 4\end{align}
where dividing by $x-y$ is allowed since $x \neq y$.
A: Write $x+y=d$. Then we have $y=d-x$ and so:
$$(d-x)^2-4(d-x) = x^2-4x$$
so 
$$d^2-2dx-4d =-8x$$thus
$$d(d-2x)-4(d-2x)=0$$
so $$(d-2x)(d-4)=0$$
If $d=2x$ we get $x=y$ which is impossible. So $d=4$ and we have $x+y=4$.
A: As an alternative, the solution that struck me first was completing the square in both $x$ and $y$. This is common when dealing with quadratics, especially once there are no $xy$ cross-terms.
$$ x^2 - 4x = y^2 - 4y $$
$$ x^2 - 4x + 4 = y^2 - 4y + 4 $$
$$ (x-2)^2 = (y-2)^2 $$
This means that either $x-2 = y-2$ or $x-2 = -(y-2)$, which means either $x = y$ or $x+y = 4$, as desired.
A: I take the opportunity of this question to consider a more general issue.
Here is a methodology that can be applied to any equation of the form :

$$f(x_1)=f(x_2) \tag{1}$$

where $f$ is a function from $I$ (subset of $\mathbb{R}$) to $J:=f(I)$.
(I intentionally take variables $(x_1,x_2)$ instead of $(x,y)$)
Of course, $(x,x), \ x \in I$ is a natural (trivial) set of solutions.
Once the study of variations of $f$ has been done, operate a segmentation of the range $J$ of $f$ into the following components :
 $$J=J_1 \cup J_2 \cup J_3 \cup \cdots$$ 
where $J_k$ is defined as the subset of $J$ of all  $y$ that $f(x)=y$ has $k$ distinct solutions. As a consequence, each $J_k$ will generate $k(k-1)$ non-trivial solutions to equation (1) ; for example, when $k=3$, we will have solutions :
$$(x_1,x_2), (x_1,x_3), (x_2,x_3) \ \text{and, symmetrically} \ (x_2,x_1), (x_3,x_1), (x_3,x_2)$$
Remark : the "trivial" cases correspond to $J_1$.
Let us consider the following example : 
$$y=f(x)=x(x-1)(x-2)(x-3) \ \ \text{on} \ \ I=[0, +\infty) \ \text{and} \ J=[-1,+\infty).$$
with the following curve, possessing in particular a local maximum in $(-\tfrac12,a:=\tfrac{9}{16})$

We will have 


*

*$J_1=(a,+\infty)$ generating "trivial solutions" to (1),

*$J_2=\{0,a\}$ (set with two elements), generating sets of two non-trivial solutions,

*$J_3=(0,a)$ (a whole line segment !), generating sets of $3 \times 2$ solutions,

*$J_4=(-1,0)$ generating sets of $6 \times 2$ solutions.
Now, let us return to the case of function $y=f(x)=x^2-4x$ (see Fig. 2) :
 
we will clearly have : 


*

*$J_1={y=-4}$ corresponding to point $x=2$ giving trivial solution $(x_1,x_1)=(2,2)$

*$J_2=(-4,+\infty)$, yielding 2 solutions $(x_1,x_2)$ and $(x_2,x_1)$ obtained by solving, for each $y \in (-4,+\infty)$ the quadratic equation :
$$x^2-4x=y$$
(take care, once again : this $y$ has nothing to do with the $y$ of the initial question $f(x)=f(y)$ !)
giving the two solutions : 
$$x_{1,2}=2 \pm \sqrt{4+y^2}\tag{2}$$
A first remark is that 
$$x_1+x_2=4 \ \ \ \text{which is the solution "as presented"}. \tag{3}$$
A second and final remark is that (3) describes exactly all solutions because $x_1$ (and the same for $x_2$) can take any value : for every value of $x_1$, one can find a value of $y$ such that (2) is fulfilled.
