Drexel dragonThe Math ForumDonate to the Math Forum

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

Solving the Equation x^y = y^x

Date: 12/09/2004 at 15:33:07
From: Chuck
Subject: Cannot find rigorous solution, just the obvious.

I cannot find a rigorous solution to the following: 

Solve for X in terms of Y only:  X^Y = Y^X  (X to the Y power) = (Y to
the X power)

I can see obvious partial solutions like X = Y, but cannot derive
other solutions like 2,4 and 4,2.  



Date: 12/09/2004 at 16:28:21
From: Doctor Vogler
Subject: Re: Cannot find rigorous solution, just the obvious.

Hi Chuck,

Thanks for writing to Dr. Math.  In fact, this is a transcendental
equation, so you can't write the solution in the form

  x = f(y)

for any simple function (closed-form) f.  But let me tell you how you
would be best advised to analyze this equation:

First take the log of both sides:

  log(X^Y) = log(Y^X)

and simplify:

  Y*log(X) = X*log(Y)

and then divide by X*Y:

  log(X)   log(Y)
  ------ = ------.
     X        Y

Now you should consider the function

         log(x)
  f(x) = ------.
            x

Clearly, we have a solution to the last equation if and only if

  f(X) = f(Y).

Well, this happens when X = Y, but does it happen elsewhere?  If we graph

  y = f(x)

we will find that f increases from y = -infinity at x = 0 to y = 1/e
at x = e (that's e = 2.71828... whether you used the common log or the
natural log or the log to any other base), and then f decreases from
y = 1/e at x = e to y = 0 at x = infinity.

Well, if X and Y are different values and

  f(X) = f(Y),

then that means that there is a horizontal line which passes through
our function at two points (namely X and Y).  Look at the function,
and you'll find that the smaller value is somewhere between 1 and e,
and the larger value is bigger than e.  Also, the closer the smaller
value is to e, the closer the larger value is to e.  The closer the
smaller value is to 1, the bigger the larger value is.

So what you find is that if X <= 1, then the only solution is Y = X. 
Similarly, if X = e, then the only solution is Y = X.  But if

  1 < X < e,

then there are exactly two solutions for Y, one of which is Y = X, and
the other is some number bigger than e.  Similarly, if

  e < X,

then there are exactly two solutions for Y, one of which is Y = X, and
the other is some number between 1 and e.

But can you write out a formula for the smaller value in terms of the
bigger value, or vice-versa?  Well, not using any closed-form
function.  But you can use numerical methods to find approximate
solutions for any X value.

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 suggestions.

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



Date: 12/15/2004 at 14:39:28
From: Doctor Vogler
Subject: Re: Cannot find rigorous solution, just the obvious.

Hi again, Chuck,

It occurs to me that there is something else about this equation that
you might be interested in.  The solutions you gave (2, 4) and (4, 2)
are in integers.  In fact, these solutions and X = Y are the only
solutions in positive integers.  And the only integer solutions are X
= Y and (2, 4), (4, 2), (-2,-4), (-4, -2).

Proving that is as follows:  First suppose that X and Y are positive.
By switching the order of X and Y, we may assume that Y >= X.  Now
divide both sides of the equation by X^X.

  X^(Y-X) = (Y/X)^X.

Since the left side is clearly an integer, the right side has to be an
integer.  But if you raise a non-integer rational number to an integer
power, then you don't get an integer.  So that means that

  k = Y/X

must be an integer (bigger than 0).  Now we re-write our equation as

  X^(kX - X) = k^X.

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

  X^(k-1) = k.

Now if X >= 2, then:

   (a) k = 1 always works (and means X = Y)
   (b) k = 2 implies X = X^(2-1) = 2 (and gives your solutions)
   (c) k = 3 implies X^(k-1) > k
   (d) by induction on k, k >= 3 implies
        X^(k-1) = X*X^(k-2) > X(k-1) >= 2k-2 > k,

so there are only the solutions already mentioned when X >= 2.

But X = 1 implies Y = 1.  And X = 0 implies Y = 0.  And if X is
negative, but Y is positive, then Y^X is positive, so X^Y is positive,
which means that Y is even and

  X^Y = (-X)^Y = Y^X,  so  (-X)^Y * Y^(-X) = 1,

but then (-X)^Y and Y^(-X) both have to be 1, so X is -1 and Y = 1.

Finally, if X and Y are both negative, then we raise both sides to the
-1 power and get

  X^(-Y) = Y^(-X)

and then if X is odd and Y is even or vice-versa, then the signs don't
match, but if X and Y are both odd, then we multiply both sides of the
equation by -1 to get

  (-X)^(-Y) = (-Y)^(-X).

If both X and Y are even, then we don't need to multiply, and we still
get the same equation.  So (-X, -Y) is a solution in positive integers.

Again, 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 suggestions.

- Doctor Vogler, The Math Forum
  http://mathforum.org/dr.math/ 
Associated Topics:
College Analysis
College Logic
High School Analysis
High School Logic
High School Transcendental Numbers

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-2013 The Math Forum
http://mathforum.org/dr.math/