General Question

LostInParadise's avatar

Can you handle this algebraic brain teaser?

Asked by LostInParadise (25948points) February 21st, 2009

The statement of this problem is very simple. The numbers 2 and 4 satisfy the equation x^y = y^x. Can you find two other numbers that satisfy it? There are an infinite number of solutions.

Observing members: 0 Composing members: 0

32 Answers

peyton_farquhar's avatar

@fireside 0^1=0, 1^0=1. Nope.

fireside's avatar

Oops, what I meant was -4 and -2

jasongarrett's avatar

All (x, y) such that x = y would work, but that answer feels like cheating.

x = -y works when x is even.

Grisson's avatar

I was thinking you could take LogX() of both sides, but it eventually bogged down into Y=LogY(X)/X and it began to feel like a circle and a lot like work.

LostInParadise's avatar

Hint: Think of a using a simple relationship between x and y to constrain the possible values.

Grisson's avatar

Well you didn’t say to other distinct numbers, so @jasongarrett‘s answer qualifies as a ‘simple relationship’.

LostInParadise's avatar

I will wait a day before giving the relationship.
It is only slightly more complicated than y = x.

mea05key's avatar

x^y -y^x = 0


x^y/2= +/- y^x/2


Grisson's avatar

@mea05key Well… yeah… but if you multiply by 2… you’re back to the original problem, right?

mea05key's avatar

@ Grisson

if you multiply by power of 2 on each side of the equation yes.. you get back to the original equation.
It is a slightly more complete solution , i suppose, compared to x=y because the solution includes x=2 y=4.

Perchik's avatar

@mea05key I’m not sure about the logic between the first and second line. Also, the parenthesis usually denote multiplication but that doesn’t appear to be how you used them. Can you please explain your work?

miasmom's avatar

he factored it

Grisson's avatar

Oh! I get it! You’re saying:
x^(y/2) = +/- y^(x/2)
I was reading it
(x^y)/2 = +/- (y^x)/2 which would be not very different from x^y=y^x.
Gotta hate typing equations.

LostInParadise's avatar

Here is what I had in mind. As I said, there are infintely many solutions, even if we ignore all the cases where y=x.

Instead of choosing y=x, suppose y = 3x.
Then we get x^(3x) = (3x)^x or
(x^3)^x = (3x)^x
Take the x root of both sides to get:
x^3 = 3x, which give x = sqrt(3) and y = 3x = 3*sqrt(3)

This can be generalized by taking y = kx for some constant k.
This gives x = (k-1)root of k and y = kx. For large values of k, this gives x very close to 1 and y close to k.

Perchik's avatar

@miasmom I read it the same way Grisson did… parentheses would have helped.

jasongarrett's avatar

Does that mean we found all of the answers where x and y are integers?

LostInParadise's avatar

Probably. I should have said that we are looking for real values of x and y.

Grisson's avatar

Well you didn’t restrict it to integers.

BonusQuestion's avatar

Obviously x=y is a solution.

x = -y is not a solution even if x is an even integer.

Because for x even x^(-x) = 1/ x^x, but (-x)^x = x^x which are not the same.

Here is how to find all positive solutions to the equation x^y=y^x. Take the xy-th root of both sides and you would get:

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

Now define the function f(x) = x^(1/x). We have f(x) = f(y).

f(x) = exp(Lnx/x) and we can evaluate its derivative: f ’ (x) = exp(Lnx/x) * ( (1 – Lnx) /x^2). Which means if x < e then f(x) is increasing and if x > e then f(x) is decreasing.

Now, lets look at f(x)=f(y) because f is increasing for x < e and decreasing for x > e both of x and y cannot be larger than e. Both cannot be less than e either. So one is less than e and the other is larger than e.

How does the graph of x^(1/x) look like? As we saw above it takes its maximum at x=e. As x approaches zero, f(x) approaches zero. Because x^(1/x) for small numbers x is less than x and x approaches zero.

As x goes to infinity x^(1/x) approaches 1. Because

Lim Ln( x^(1/x) ) = Lim (Ln x / x) which by L’Hospital’s rule is equal to Lim 1/x which is zero as x approaches infinity.

So Lim x^(1/x) is exp (0) =1.

So the graph of x^(1/x) has a horizontal asymptote y=1. It is increasing from zero to e and decreases from e to infinity. Therefore (other than x=y which is an obvious solution), for any x such that 1 < x < e there is a unique number y > e such that x^y = y^x. And these are all solutions of this equation.

If you are only looking at integer solutions then since either x or y should be less than e, we should have one of them is 1 or 2 which means:

1^y = y^1 and hence y=1

2^y = y^2 and you can easily see y =2 or y=4. (Remember we already know that for any 1 < x <e there is exactly one y > e such that x^y = y^x.)

LostInParadise's avatar

@BonusQuestion , I appreciate your analysis, but you do not tell how to find a solution, which my simple minded method was able to produce. If you take x=sqrt(3) and y=3*sqrt(3) and use a calculator to computer x^y and y^x, you will see that they are equal.

BonusQuestion's avatar

There is infinitely many solutions. For any x that you pick between 1 and e there is one and exactly solution y > e. I will get back to you and let you know how to find that solution if you are looking for the actual number. I have to run now.

BonusQuestion's avatar

This is the best I think all solutions can be described. As I said before if (x,y) is a solution and x is not equal to y then one should be less than e and the other should be greater than e. Assume y < e < x and let u = x/y. Then u > 1 and x = uy.

x^y = (uy)^y

y^x = y^(uy) = (y^u)^y

If x^y = y^x we should have (uy)^y = (y^u)^y and hence uy = y^u which means y^(u-1) = u and hence y = u^(1/(u-1)).

Since x = yu we have x = u^( u/(u-1))

So for any u > 1 the pair x = u^( u/(u-1)) & y = u^(1/(u-1)) is a solution. This describes all positive solutions of x^y = y^x.

For example put u = 3 and we get the following solution:

x = 3^(3/2) & y = 3^(1/2)

which is what you suggested in your post.

For u = 4 we get the following solution:

x = 4^(4/3) & y = 4^(1/3)

Or u=5 gives

x = 5^(5/4) & y = 5^(1/4)

You can replace u by any real number greater than one and you will come up with a new solution. (u does not have to be an integer. For example you can replace u by Pi.)

BonusQuestion's avatar

Er…did you already know the answer? I just read your previous post and realized you seem to know the answer! :D

Sorry for being redundant.

BonusQuestion's avatar

It is interesting to find all positive rational solutions of x^y = y^x.

My analysis shows that all positive rational solutions are of the form x = (1+1/n)^(n+1) and y = (1+1/n)^n, where n is a positive integer.

If anybody is interested I can post my solution.

LostInParadise's avatar

I did not think there were any rational solutions. (k-1) root of k would not seem to result in any rational numbers. But I can see that if I set n=2 in your equation that this works. Okay, how did you arrive at this?

LostInParadise's avatar

I see you are answering, but I figured it out.
We have x = k^(1/k-1), so if 1/(k-1)= n for some integer we get a rational solution.

That gives k-1=1/n or k = 1 + 1/n
So x = (1+1n)^n and y=kx= (1+1/n)*(1+1/n)^n= (1+1/n)^(n+1)

LostInParadise's avatar

Make that x=(1+1/n)^n

BonusQuestion's avatar

We know that all positive solutions are of the form x = u^(u/(u-1)) & y = u^(1/(u-1)) when u = x/y > 1.

If y and x are both rational then u is also rational. We are looking for all rational numbers u such that y = u^(1/(u-1)) is also rational.

Lets say u = m/n for two positive integers m > n that are relatively prime. (Meaning they have no common factor.) Lets calculate y in terms of m and n.

1/(u-1) = n/(m-n)

u ^ (1/(u-1)) = (m/n)^ (n/(m-n))

This should be rational. Lets say it is equal to k/l where k and l are two positive integers that are relatively prime.

(m/n)^ (n/(m-n)) = k/l

Raise both sides to the power m-n and cross multiply to get the following:

m^n * l^(m-n) = n^n * k^(m-n)

If you write down the prime factorization of n, m, k and l you can see that since m and n have no common prime factors and m-n and n are co-prime m should be a (m-n)-th integer power. The same reasoning shows that n should be a (m-n)-th integer power, which means there are two positive integers r and s such that m = r^(m-n) and n = s^(m-n).

If you subtract these two you get

m-n = r^(m-n) – s^(m-n)

and if you factorize r^(m-n) – s^(m-n) you can see that the RHS of this equality is greater than or equal to the LHS unless m-n = 1.

This shows u = (n+1) / n for some integer n. And after substituting for u you will get the answers that I posted above.

You are correct that if we take 1/(k-1) = n an integer this gives us a rational solution, but the above proof shows that these are the only rational solution to this equation.

BonusQuestion's avatar

>> If you write down the prime factorization of n, m, k and l you can see that since m and n have no common prime factors and m-n and n are co-prime m should be a (m-n)-th integer power.

This part needs a little bit of work, if you don’t see it immediately, but it can be done.

LostInParadise's avatar

That is a bit for me to take in. I will have to look at it when I am more awake. At any rate, job well done! You have transformed what I thought to be a relatively interesting problem into an even better one.

BonusQuestion's avatar

Two rather interesting questions about this equation would be: 1) How can we find all algebraic solutions of this equation? 2) How about all algebraic integer solutions?

For algebraic solutions this is how to find them: Let x = u^(u/(u-1)) & y=u^(1/(u-1)). Since x and y are both algebraic u=x/y is also algebraic. But then if u is irrational by Gelfond-Scheider Theorem, x should be transcendental, which is a contradiction. So u should be rational. Hence all algebraic solutions are evaluated by taking u to be a rational number.

If x and y are algebraic integers then they are both algebraic so u is rational by the previous argument. Let u = m/n for two positive co-prime integers m and n. Then x = (m/n)^(m/(m-n)) is an algebraic integer. So x^(m-n) is also an algebraic integer. Hence (m/n)^m should be an algebraic integer but it is a rational number. And any rational number that is also an algebraic integer should be an integer which shows n=1. Therefore u should be a natural number to have x and y as algebraic integers.

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther