Solve the equation
x y = y x − y
For positive integers x and y.
If ( x 1 , y 1 ) , ( x 2 , y 2 ) , . . . , ( x k , y k ) is all solutions give your answer as
x 1 ∗ y 1 + x 2 ∗ y 2 + . . . + x k ∗ y k
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I spent a long time going down rabbit-holes on this one - lots of fun to explore the problem, but I'd love to know if there's a quicker way to the solution here (my answer is much longer than I'd like!).
Problem Loading...
Note Loading...
Set Loading...
Some preliminaries: the left-hand side is a positive integer; so the right-hand side must also be a positive integer; it follows that x − y ≥ 0 .
If x = y , we have x x = x 0 = 1 , so the only solution (in positive integers) is x = y = 1 . From now on we can restrict our search to x > y .
Using this inequality, we have y x − y = x y > y y so that x − y > y , or x > 2 y .
Let x = t y , where t > 2 from the above inequality. Then the equation becomes ( t y ) y = y t y − y = y y ( t − 1 ) . Taking the y t h root of both sides gives t y = y t − 1 , or t = y t − 2 .
We can rearrange this to get y = t t − 2 1 and x = t t − 2 t − 1 . Any value of t > 2 will give a solution pair; but which ones give integers?
We'll focus on the expression for y , and treat it as a function of t : y ( t ) = t t − 2 1 . First, we'll show that y ( t ) is decreasing for t > 2 .
Take logs: lo g y = t − 2 lo g t
Differentiate: y ( t ) y ′ ( t ) = ( t − 2 ) 2 t t − 2 − lo g t
Note that y ( t ) > 0 , since t is positive; also ( t − 2 ) 2 is positive. So we are interested in the sign of y ( t ) y ′ ( t ) ( t − 2 ) 2 = t t − 2 − lo g t = 1 − t 2 − lo g t
For 2 < t < e : 1 − t 2 − lo g t < 1 − t 2 − lo g 2 < 1 − e 2 − lo g 2 < 0
For t ≥ e : 1 − t 2 − lo g t < 1 − lo g t < 0
So y ( t ) is decreasing for t > 2 . Now, note that y ( 3 ) = 3 and y ( 4 ) = 2 . So there are no solutions for 3 < t < 4 (as there are no integers between 3 and 2 ). Also, y ( t ) > 1 for all t > 2 ; so there are no solutions for t > 4 either.
This leaves the region 2 < t < 3 . Now, it is possible to find t such that y ( t ) is an integer; so we need a new strategy.
The last trick is to use the fact that t = y x is rational, since both x and y are integers. Recall that we found y ( t ) = t t − 2 1 . Substituting in for t , this is
y = ( y x ) x − 2 y y
y x − 2 y = ( y x ) y
The left-hand side of the last expression is an integer. The right-hand side is a rational raised to the power of an integer; the only way for this to also be an integer is if the rational number itself - ie y x - is an integer too.
So we've shown that for both x and y to be integers, t = y x must also be an integer. Therefore there are no solutions in the interval 2 < t < 3 .
In summary, letting t = y x :