solutions of xy=yx

The equation

xy=yx (1)

has trivial solutions on the line  y=x.  For other solutions one has the

Theorem.1. The only positive solutions of the equation (1) with  1<x<y  are in a parametric form

x=(1+u)1u,y=(1+u)1u+1 (2)

where  u>0.
2. The only rational solutions of (1) are

x=(1+1n)n,y=(1+1n)n+1 (3)

where  n=1, 2, 3,
3. Consequently, the only integer solution of (1) is

24= 16= 42.

Proof. 1. Let  (x,y)  be a solution of (1) with  1<x<y.  Set  y=x+δ  (δ>0).  Now


from which we obtain easily


where  u=δx.  Then


2. The unit fractionsPlanetmathPlanetmathu=1n  yield from (2) rational solutions (3). Further, no irrational value of u cannot make both x and y of (2) rational, since otherwise the ratio 1+u of the latter numbers would be irrational (cf. rational and irrational).  Accordingly, for other rational solutions than (3), we must consider the values


with coprimeMathworldPlanetmath positive integers m,n where  m>1.  Make the antithesis that


Because the integers coprime with m form a group with respect to the multiplication modulo m (cf. prime residue classes), the congruenceMathworldPlanetmathPlanetmathPlanetmath

nz 1(modm)

has a solution z.  Thus we may write  nz=km+1  and rewrite the rational numberPlanetmathPlanetmath

[(1+mn)nm]z=(1+mn)nzm=(1+mn)km+1m=(1+mn)k(1+mn)1m. (4)

This product form tells that (1+mn)1m is rational.  But the number


cannot be rational without the coprime integers m+n and n both being mth powers (  If we had  n=vm,  then by Bernoulli inequalityMathworldPlanetmath,


i.e. m+n could not be a mth power.  The contradictory situation means, by (4), that the antithesis is wrong.  Therefore, the numbers (3) give the only rational solutions of (1).

Note.  The value  n=2  in (3) produces  x=94,  y=278,  whence (1) reads

(94)278=(278)94. (5)

The truth of the equality (5) may also be checked by the calculation



  • 1 P. Hohler & P. Gebauer:  Kann man ohne Rechner entscheiden, ob eπ oder πe grösser ist? - Elemente der Mathematik 36 (1981).
  • 2 J. Sondow & D. Marques:  Algebraic and transcendental solutions of some exponentialPlanetmathPlanetmath equations.  - Annales Mathematicae et Informaticae 37 (2010); available directly at
Title solutions of xy=yx
Canonical name SolutionsOfXyYx
Date of creation 2014-12-16 16:29:29
Last modified on 2014-12-16 16:29:29
Owner pahio (2872)
Last modified by pahio (2872)
Numerical id 13
Author pahio (2872)
Entry type Result
Classification msc 26D20
Classification msc 26B35
Classification msc 26A09
Classification msc 11D61
Synonym equation xy=yx
Related topic CatalansConjecture
Related topic RationalAndIrrational
Related topic PerfectPower