Associated Topics || Dr. Math Home || Search Dr. Math

### Find All Pairs of Integer Solutions to a^(2b) = b^a

```Date: 02/18/2005 at 18:58:31
From: Jason
Subject: Powers of Powers

Investigate pairs of positive integers (a,b) that satisfy the equation
a^(2b) = b^a.

I do not really know where to start, to be honest!  I have tried lots
of different values for a and b but have yet to find one that
satisfies the equation.

```

```
Date: 02/19/2005 at 09:50:18
From: Doctor Vogler
Subject: Re: Powers of Powers

Hi Jason,

Thanks for writing to Dr. Math.  Are you a college student?  If so, I
would recommend going to the university library and finding the
January 2004 edition of the math journal "American Mathematical
Monthly," where they had an article that discussed how to solve

y^x = x^(my)

for positive integers m.  It gave the results for m = 1, 2, 3 in
particular.

If not, write back and I'll try to give you some hints at how to solve
it.  But first, do you know how to solve the equation WITHOUT the 2?

- Doctor Vogler, The Math Forum
http://mathforum.org/dr.math/

```

```
Date: 02/21/2005 at 18:54:51
From: Jason
Subject: Powers of Powers

Hello Doctor Vogler,

I would just like to say a big thank you for your help, it is much
appreciated.  I have managed to find the math journal, so feel I can
understand how to solve the equation without the 2 as asked but am
having difficulty getting to grips with the generalization equation.
Would it be possible to explain it in a simpler way?  A few things
also puzzle me:

For the equation x^y = y^x it only had 1 integer solution of (2,4).
Does the equation y^x = x^(2y) also have limited solutions?

The generalization equation in the journal seems to concentrate on
finding positive rational numbers but I just want the ones where (x,y)
are positive integers that satisfy the equation so I am getting
confused with some of the solutions.

For instance, x^y = y^(mx), take logs, substitute y = x^r, we get
x = (mr)^(1/(r-1)) and y = (mr)^(r/(r-1)), page(15).  However,
substitute m = 2 and substitute positive integers for r.  I miss some
values of (x,y) that are integers such as (9,27).

Now if I use the equations x = (2+(2/n))^n, y = (2+(2/n))^(1+n),
page(16) using positive values of n=1,2,3,... I find (9,27) but miss
out (2,16)!  Is there a solution that just finds positive integers for
x and y?

Hope you can follow this!  I am getting a little confused so any help
you could give me would be great.  Thank you again.

Jason

```

```
Date: 02/22/2005 at 22:13:54
From: Doctor Vogler
Subject: Re: Powers of Powers

Hi Jason,

You're right.  The techniques can be slightly different for integers
only.  I was asked this a little while ago without the 2, and I gave
the following answer.  Look it over, and see if you can apply the
techniques for the integer solutions in the case with the 2.  Tell me
what you get, and if you get stuck, then I'll look it over and see if
I can take it any further.

The question was:

Find all positive integers a and b such that a^b = b^a.

Thanks for writing to Dr. Math.  The short answer to your question is
that all solutions in positive integers are a = b and

(2, 4) or (4, 2).

The long answer, of course, is a proof of the same.  Before going
there, however, I would like to point out that your idea is a terrific
idea for finding all *real* solutions.  Allow me to elaborate.

Since the function

f(x) = (log x)/x

increases from x=0 to x=e and then decreases from x=e to infinity, if

0 < a < b <= e

or if

e <= b < a,

then we have

f(a) < f(b)

and therefore

(log a)/a < (log b)/b
b log a < a log b
a^b < b^a.

But if we have

a < e < b,

then that is not enough information to tell whether a^b or b^a is
bigger.  And for each a < e there is exactly one b > e where

f(a) = f(b)

and therefore

a^b = b^a,

and for smaller values of b (but still bigger than e) you will have

a^b < b^a

while for larger values of b you will have

a^b > b^a.

But this idea of using continuous functions becomes less useful when
dealing with integer or rational solutions, since the Intermediate
Value Theorem doesn't apply.  So we need to try a different idea.

Try this:  Substitute

t = b/a

into your equation.  If a and b are integers, or if a and b are
rational numbers, then t will be rational.  Substituting a*t for b, we get

t a       a
(a )  = (at) .

Now, taking the (positive real) a'th root of both sides of the
equation, we get

t
a  = at

and therefore

t-1
a    = t

and

1/(t-1)
a = t       .

In fact, we can get a parametrized form for all rational solutions
from this equation.  Let

n = 1/(t-1),

so that

a = (1 + 1/n)^n
b = (1 + 1/n)^(n+1).

These are rational solutions for all (nonzero) integers n.  It takes a
little more work to show that these (along with a=b) are *all*
rational solutions.  And that work begins with proving the lemma:

If r/s and c/d are rational numbers in lowest terms, and (r/s)^(c/d)
is also rational, then r and s are both d'th powers of integers.

But you wanted integer solutions.  And I'm done with my tangents.  The
first step is to prove that t is an integer.  Then all that's left is
a simple induction argument.

Of course, t is not an integer if b=2 and a=4.  But if we permit
ourselves to switch a with b (note that this doesn't change the
equation) so that

a <= b

then we can prove that t will be an integer.  You see, if a <= b, then

a            b
a   divides  a .

But a^b = b^a, which means that

a            a
a   divides  b ,

and this is enough to imply that a divides b (think about the previous
statement in terms of the prime factorizations of a and b), and
therefore t=b/a is an integer.  And if a and b are positive, then t is
also positive.

Now t=1 gives the solutions with a=b.  And if t=2, then

t-1
a    = t

gives a = 2 (and therefore b = 4).  And a=1 quickly implies b=1.  But
if a >= 2, then

t-1     t-1
a    >= 2   ,

and we can prove by induction that

t-1
2    > t

for all integers t >= 3.  This is easily verified for t=3.  Now
suppose that

t-2
2    > t-1

and then we have

t-1        t-2
2    = 2 * 2    > 2(t-1) = t + (t-2) > t.

Therefore, there are no solutions with t > 2, and so we have found all
of the integer solutions, namely (k,k), (2,4), and (4,2).

back and show me what you have been able to do, and I will try to
offer further suggestions.

- Doctor Vogler, The Math Forum
http://mathforum.org/dr.math/

```

```
Date: 02/23/2005 at 07:29:21
From: Jason
Subject: Powers of Powers

So if x^y = y^(mx), now if m>1 (in this case 2) x,y > 0.  Now if x,y
does not =1, then by taking logs we get

log(x)/x = mlog(y)/y

substitute for y = x^r where r and x do not equal 1.

For a start, I am confused at how you get to this (below) so cannot

Then x = (mr)^(1/(1-r)) and y = (mr)^(r/(1-r))

But for integer solutions, we must prove that r is an integer.
Obviously r cannot be an integer if x and y are integer solutions.

x < y, x and y cannot be equal. The equation is not satisfied if y < x

If r = 2y/x = p/q is an integer, if x, y are positive, then r is also
positive.  I don't think this is correct at all.

r will never equal 1 as x < y are never the same.

I don't really know what I doing, I can nearly follow through your
proof by induction but how does this prove what the integer solutions
are, it just proves that there are no integer solutions where t > 2,
doesn't it?  Could you show me how to work out the integer solutions
for x x^y = y^(2x) as it not coursework, we are merely looking at
different investigations and modelling exercises within the course.

Thank you again for all your help, sorry to be such a pain.  Many thanks!

Jason

```

```
Date: 02/23/2005 at 11:51:18
From: Doctor Vogler
Subject: Re: Powers of Powers

Hi Jason,

avoid logs if we need integer solutions (or rational ones, for that
matter) since the log of an integer is not an integer, not rational,
and generally indistinguishable from the log of any other real number.
Recall that we set

t = y/x

and then, when we wanted integer solutions, we tried to show that t
could be made an integer (by possibly switching x and y).

So it all comes down to finding the t values.  In the case with m=1,
we tried to show that x had to divide y, which meant that t had to be
an integer.  Can we do something similar here?  One step we CANNOT do
is to conditionally switch x and y, because now that WILL change the

x^y = y^(mx)

and we want to know if x has to divide y, or perhaps vice-versa.
Let's consider a few different cases.

Case 1:  mx <= y

In this case, clearly x^(mx) divides x^y which equals y^(mx), and then
we can take (mx)'th roots and therefore x divides y.

Case 2:  y <= mx

In this case, y^y divides y^(mx) which equals x^y, and then we can
take y'th roots and therefore y divides x.

Hmm!  So now we *almost* have that t is an integer.  In fact, we have
that either y/x is an integer, or x/y is.  That means we need to check
both possibilities.

So let's suppose that

t = y/x

is an integer.  Then

y = tx

and we can substitute this into our equation and get

x^(tx) = (tx)^(mx).

Now we take the positive real x'th root of each side of the equation
and get

x^t = (tx)^m

or

x^t = t^m * x^m.

This is essentially the same thing we did when m was 1.  Let's
continue what we did, which was to put all of the x's on the left
side.  So we divide both sides of the equation by x^m:

x^(t-m) = t^m.

Now what we did in the m=1 case is show that when x and t are large
(larger than 2 or 3), then this couldn't possibly happen.  You can do
the same thing when m=2, or any other m, for that matter.  But you'll
have to use bigger x and t values when m is bigger.  In other words,
first you check the x=1 case, which always gives you t^m = 1 and
therefore t=1.  Well, x=1 and y=1 is certainly a solution.  If x>1 and
t<m, then the left side will not be an integer, while the right side
is, so there are no solutions there.  If t=m, then again you get t^m =
1 and therefore t=1, contradicting t=m (unless m=1).  So then you have
to look at t>m.  You suppose x>1 (so x>=2) and first check t=m+1:

x^(1) = (m+1)^m

and you find that you always have a solution

x = (m+1)^m
y = (m+1)^(m+1).

In particular, for m=2 this is (9, 27).  Then you try to prove that
this won't happen for any larger values of t.  So we assume that x >=
2 and therefore

x^(t-m) >= 2^(t-m)

and we try to prove by induction on t that

2^(t-m) > t^m.

But actually this isn't true for just any m.  But it will be true when
t is large enough.  In fact, depending on m, you'll have to check the
first several values of t (from m+2 up until the above inequality is
satisfied, which happens at t=m+7=9 when m=2 for example).  Then the
inductive step is the same, since if

t > 1 + 1/(2^(1/m) - 1)

then

2(t-1)^m > t^m

and so the inductive hypothesis

2^(t-m-1) > (t-1)^m

implies that

2^(t-m) = 2 * 2^(t-m-1) > 2(t-1)^m > t^m

which does it, once we check the smaller values of t.  For each
smaller value of t, we have to check if

x = t^(m/(t-m))

is an integer.  That is, if t^m is a perfect (t-m)'th power.  For m=2,
you need to do this for t=4 to t=8, and you get

4^(2/2) = 4
5^(2/3)
6^(2/4)
7^(2/5)
8^(2/6) = 2

and the other three values are not integers.  So that means that you
have two other solutions, namely t=4 and t=8, which have

x = 4, y = 16

and

x = 2, y = 16.

And these, together with x = 9, y = 27, will be all solutions in
positive integers for the equation

x^y = y^(2x).

back and show me what you have been able to do, and I will try to
offer further suggestions.

- Doctor Vogler, The Math Forum
http://mathforum.org/dr.math/

```

```
Date: 02/27/2005 at 07:37:55
From: Jason
Subject: Thank you (Powers of Powers)

I would just like to say a huge thank you to Dr. Vogler for answering
all of my questions, it is much appreciated. Keep up the good work.

Best wishes,

Jason
```
Associated Topics:
College 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
Math Forum Home || Math Library || Quick Reference || Math Forum Search