I have been practicing for a an upcoming intermediate math olympiad and I came across the following question:

Let $x$ and $y$ be positive integers that satisfy the equations $$\begin{cases} xy = 2048 \\ \frac{x}{y}-\frac{y}{x}= 7.875.\end{cases}$$ Find x.

My approach



$$\frac{\frac{2048}{y}}{y} - \frac{y}{\frac{2048}{y}} = 7.875$$

$$\frac{2048}{y^2} -\frac{y^2}{2048} = 7.875$$

$$2048^2 -y^4 =7.875\cdot 2048 y^2$$ If we compare the the first equation (x/y) - (y/x) = 7.875 to the euqtion that we just found ((sqrt. 2048)/y) - (y/(sqrt. 2048)) = 7.875 , x is in the same place so, x must be equal to the sqrt. of 2048.

Is this solution correct or are there any better solutions?

Thank you :)

  • 2
    $\begingroup$ How to pass from (2048/y^2) - (y^2/2048) = 7.875 to ((sqrt. 2048)/y) - (y/(sqrt. 2048)) = 7.875? $\endgroup$ – Did Sep 7 '15 at 7:17
  • 3
    $\begingroup$ If you got $x = \sqrt{2048}$, then $y = \dfrac{2048}{x} = \sqrt{2048}$, and then $\dfrac{x}{y} - \dfrac{y}{x} = 0$ instead of $7.875$. So $x = \sqrt{2048}$ is not a solution. $\endgroup$ – JimmyK4542 Sep 7 '15 at 7:19
  • 1
    $\begingroup$ Oops. Sorry. I made a mistake. What about if we multiply both sides by xy in (x/y) - (y/x) = 7.875? We then get x^2 - y^2 = 7.875. $\endgroup$ – anonymous Sep 7 '15 at 7:19

Your solution is incorrect because it was stated that x is a positive integer, and $\sqrt{2048}$ is not an integer, therefore it can't be a solution.

Hints to solve the problem: $$2048 = 2^{11}$$ $$ 7.875 = 8 - \frac{1}{8} $$

(Spoiler alert) My solution:

Because $2048 = xy = 2^{11}$, we can say that $x = 2^a$ and $y = 2^b$, where $a+b=11$ (equation 1).

Now, we see that: $$\frac{2^a}{2^b} - \frac{2^b}{2^a} = 7.875$$ $$\frac{2^a}{2^b} - \frac{2^b}{2^a} = 8 - 1/8$$ Therefore: $$\frac{2^a}{2^b} = 8$$ Which can be rewritten as: $$2^{a-b} = 2^3$$ $$a-b = 3 (Equation 2)$$

Now, adding equation 1 and 2: $$2a = 14$$ $$a = 7$$

Therefore, $x = 2^{7} = 128$


Consider the second equation and define $z=\frac xy$. So, you have $$z-\frac 1z=7.875$$ which is a quadratic in $z$; its roots are $z=-\frac 18$ (to be discarded) and $z=8$ (to keep). So $xy=2048$ and $\frac xy=8$.

I am sure that you can take from here.


When solving quiz problems (and to some extent even real-world problems), always ask yourself if the problem is easier than it seems. In this case, 2048 is easily recognizable as a power of 2: $2^{11} = 2048$. Because $x$ and $y$ are integers, they have to be powers of two as well since $xy = 2048$. Moreover if $x = 2^n$, then $y = 2^{11-n}$. That's only a few combinations to try (the equation is symmetric on $x$ and $y$ except for the sign of the result), so you immediately get the solution $x = 2^7, y = 2^4$.

In this case the problem specifies that x and y are positive integers, so this approach was guaranteed to work. But it would have been worth exploring even if it was just a hunch.

  • $\begingroup$ On a quiz when time is very short this is often a good approach. $\endgroup$ – DanielWainfleet Sep 8 '15 at 8:39

The best way to solve math olympiad questions is the fast way - A long solution is just as bad as none, given the time constraints. Therefore, I would recommend the following:

First, notice that $2048 = 2^{11}$. With the stipulation that $x$ and $y$ are integers, this means that they must both be integer powers of two, and so are $\frac xy$ and $\frac yx$.

Next, notice that $\frac yx$ must be less than one, since $\frac xy$ is greater than one, since the difference is greater than one.

Thus, the only candidate for $\frac xy$ is 8. Thus, since there is guaranteed to be a solution, $\frac xy = 8 = 2^3$. Thus, $x = 2^7$ and $y = 2^4$.


HINT...$\frac xy-\frac yx=7.875=8-\frac 18$

Therefore either $\frac xy=8$ or $-\frac 18$


Clearly, one can just use the naive approach and solve the quadratic in $y$.

As others noted, being given that $x,y$ are integers immediately tells you that they are powers of two.

So we have:

$x = 2^a, y = 2^b$

${x\over y} - {y\over x} = {63 \over 8} $

$\implies {{x^2 - y^2}\over 2^{11}}= {(2^6-1)\over {2^3}}$

$\implies {{2^{2a} - 2^{2b}}}= 2^8{(2^6-1)} = 2^{14} - 2^8$

At which point $a,b$ fall out by inspection.

Moral of the story: When the given equations have some kind of pattern, keep it in the working.

In this case, the powers of 2 are very important. The "$xy = 2048$" is very obviously so. The "$7.875$" is sufficiently odd as to encourage me to immediately think that it is going to be worthwhile writing as the more "normal" $63\over 8$.


How about this one :

Let, $x/y = A$
$\implies y/x = 1/A$

Then it's going to be like this

$$A-1/A = 7.875$$

And the answer would be $A=8$

Then you got these solutions : $x/y=8$ & $x.y=2048$ ready to go. Easier and faster $x=128$ & $y=16$

  • $\begingroup$ I believe that you are incorrect, $8 - \frac18 = 7.875$ $\endgroup$ – kleineg Sep 8 '15 at 12:53
  • 1
    $\begingroup$ tnx i edited it $\endgroup$ – arman gorji Sep 9 '15 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.