The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Solving x^y = y^(x - y) for All Natural x, y

Date: 11/18/2010 at 22:40:16
From: ilyas
Subject: Find all natural numbers x, y so that x^y = y^(x-y)

Find all natural numbers x, y such that

   x^y = y^(x - y)

Date: 11/18/2010 at 23:22:35
From: Doctor Vogler
Subject: Re: Find all natural numbers x, y so that x^y = y^(x-y)

Hi Ilyas,

Thanks for writing to Dr Math. 

This is a lot like the problem at ... 

... and a little like the problem at 

First of all, any solution to your equation must have x >= y, because
otherwise x - y < 0, and then -- since x^y is an integer -- that would
mean that this must also be an integer:

   y^(x - y) = 1/y^(y - x)

That, in turn, would mean that y has to equal 1. But if y = 1, then x >= 1
anyway, since x is a natural number. We conclude that x >= y for all

In fact, if x = y, then 

   x^y = y^(x - y) = y^0 = 1

   1 = x^y = x^x >= x

There, the only solution with x and y equal is x = y = 1.
Otherwise, x > y. 

Now if we divide both sides of the equation by x^(x - y), then we get

  x^(2y - x) = (y/x)^(x - y)

Since y/x is a non-integer (between 0 and 1), and it is raised to a
positive power, the right side of the equation is a non-integer, which
means that the exponent on the left side must be negative, which means
that x > 2y.

Now go back to your original equation and divide both sides by y^y:

   (x/y)^y = y^(x - 2y)

Since x > 2y, the right side is an integer. Since the right side is an integer,
the left side has to be an integer too. But if you raise a non-integer
rational number to an integer power, you don't get an integer. So that
means that this must be an integer (bigger than 2):

   k = x/y

Now we re-write our equation as

   k^y = y^((k - 2)y)

We take the positive real y'th root of both sides of the equation and get

   k = y^(k - 2)

We already know that k > 2. If k = 3, then 3 = y^1, so y = 3 and 

   x = ky = 9

So that is another solution.

If k = 4, then 4 = y^2, so y = 2 and 

   x = ky = 8

And that is another solution.

But otherwise, k >= 5 -- which means that y = k^(1/(k - 2)) -- must be
strictly between 1 and 2, which no integer can do.

So all solutions are

   x = 1, y = 1
   x = 8, y = 2
   x = 9, y = 3

If you have any questions about this or need more help, please write back
and show me what you have been able to do, and I will try to offer further

- Doctor Vogler, The Math Forum 

Date: 11/19/2010 at 02:06:22
From: ilyas
Subject: Thank you (Find all natural numbers x, y so that x^y = y^(x-y))

Thank you very much.
I love math.
I want to learn more and more, especially logic math.
Associated Topics:
High School Number Theory

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.