I solved this equation for $y$ by inspection and confirmed it with Wolfram Alpha -
$y^2 - yx - y + x = 0$
I got the values $y = 1$ and $y = x$
However I was wondering is there a formal method for solving it? I expressed it as a polynomial -
$y^2 + (-1 - x)y + x = 0$
and used the quadratic formula but it just left me with an awkward expression involving powers of $x$ and a square root...no $y = 1$ and $y = x$ which is what I was looking for...
So how would I go about solving this formally?
$$y^2-(x+1)y+x=0$$ First method - using the quadratic formula: $$y_{1,2}=\frac{x+1\pm\sqrt{(x+1)^2-4x}}{2}=\frac{x+1\pm\sqrt{(x-1)^2}}{2}=\frac{(x+1)\pm(x-1)}{2}$$ Thus the solutions are $y=x$ or $y=1$.
Second method - taking common factors: $$y^2-yx-y+x=y(y-x)-1(y-x)=(y-1)(y-x)=0$$ Thus the solutions are $y=x$ or $y=1$.