Consider the matrix
$$A(x, y) = \begin{pmatrix} x & 1 & 2 \\ 2 & x & 1 \\ 1 & y & x \end{pmatrix}$$
with $x, y \in \mathbb{R}$. I have to show that there exists at least one pair $(x, y) \in \mathbb{R}^2$ with $x \ne y$ such that the determinant of $A(x, y)$ is equal to the determinant of $A(y, x)$.
I found $D(x, y)$, the determinat of $A(x, y)$, to be
$$D(x, y) = x(x^2 - y) + 4y -4x + 1$$
So I need to solve:
$$D(x, y) = D(y, x)$$
$$x(x^2 - y) + 4y -4x + 1 = y(y^2 - x) + 4x -4y + 1$$
$$x^3 - y^3 -2xy -8x + 8y = 0$$
$$(x - y)(x^2 + xy + y^2) - 2xy -8(x - y) =0$$
$$(x - y) (x^2 + xy + y^2 -8) - 2xy = 0$$
What now? I wasn't able to guess $x$ and $y$. How should I solve this? Is there a better, more efficient method?
You’ve made an algebraic error. The $-xy$ terms of both determinants cancel, leaving $$x^3-8x=y^3-8y$$ instead of what you had. With this correction, I expect that you can find a solution on your own.