The equation is mentioned in a letter of Bernoulli to Goldbach (29 June 1728). The letter contains a statement that when the only solutions in natural numbers are and although there are infinitely many solutions in rational numbers. The reply by Goldbach (31 January 1729) contains general solution of the equation obtained by substituting  A similar solution was found by Euler.
The problem was discussed in a number of publications. In 1960, the equation was among the questions on the William Lowell Putnam Competition which prompted Alvin Hausner to extend results to algebraic number fields.
Positive real solutions
- Main source:
An infinite set of trivial solutions in positive real numbers is given by
Nontrivial solutions can be found by assuming and letting Then
Raising both sides to the power and dividing by
Then nontrivial solutions in positive real numbers are expressed as
Setting or generates the nontrivial solution in positive integers,
Other pairs consisting of algebraic numbers exist, such as and , as well as and .
The trivial and non-trivial solutions intersect when . The equations above cannot be evaluated directly, but we can take the limit as . This is most conveniently done by substituting and letting , so
Thus, the line and the curve for intersect at x = y = e.
The equation produces a graph where the line and curve intersect at . The curve also terminates at (0,1) and (1,0), instead of continuing on for infinity.
The equation produces a graph where the curve and line intersect at (1,1). The curve (which is actually the positive section of y=1/x) becomes asymptotic to 0, as opposed to 1.
- Lóczi, Lajos. "On commutative and associative powers". KöMaL. Archived from the original on 2002-10-15. Translation of: "Mikor kommutatív, illetve asszociatív a hatványozás?" (in Hungarian). Archived from the original on 2016-05-06.
- Singmaster, David. "Sources in recreational mathematics: an annotated bibliography. 8th preliminary edition". Archived from the original on April 16, 2004.
- Sved, Marta (1990). "On the Rational Solutions of xy = yx" (PDF). Mathematics Magazine. Archived from the original (PDF) on 2016-03-04.
- Dickson, Leonard Eugene (1920), "Rational solutions of xy = yx", History of the Theory of Numbers, II, Washington, p. 687
- van Hengel, Johann (1888). "Beweis des Satzes, dass unter allen reellen positiven ganzen Zahlen nur das Zahlenpaar 4 und 2 für a und b der Gleichung ab = ba genügt".
- Gleason, A. M.; Greenwood, R. E.; Kelly, L. M. (1980), "The twenty-first William Lowell Putnam mathematical competition (December 3, 1960), afternoon session, problem 1", The William Lowell Putnam mathematical competition problems and solutions: 1938-1964, MAA, p. 59, ISBN 0-88385-428-7
- "21st Putnam 1960. Problem B1". 20 Oct 1999. Archived from the original on 2008-03-30.
- Hausner, Alvin (November 1961). "Algebraic Number Fields and the Diophantine Equation mn = nm". The American Mathematical Monthly. 68 (9): 856–861. doi:10.1080/00029890.1961.11989781. ISSN 0002-9890.
- "Rational Solutions to x^y = y^x". CTK Wiki Math.
- "x^y = y^x - commuting powers". Arithmetical and Analytical Puzzles. Torsten Sillke. Archived from the original on 2015-12-28.
- dborkovitz (2012-01-29). "Parametric Graph of x^y=y^x". GeoGebra.
- OEIS sequence A073084 (Decimal expansion of -x, where x is the negative solution to the equation 2^x = x^2)