CEMC Banner

Problem of the Week
Problem E and Solution
Fraction Distraction

Problem

Determine the number of solutions to the equation \[\frac{A}{B} - \frac{B}{A} = \frac{A+B}{AB}\] where \(A\) and \(B\) are both integers, \(-9\leq A \leq 9\), and \(-9\leq B \leq 9\).

Solution

First notice that neither \(A\) nor \(B\) can equal zero. Starting with the equation, we simplify as follows. \[\begin{aligned} \frac{A}{B}-\frac{B}{A}&=\frac{A+B}{AB}\\ \frac{A^2}{AB}-\frac{B^2}{AB}&=\frac{A+B}{AB}\\ \frac{A^2-B^2}{AB}&=\frac{A+B}{AB}\\ \frac{(A-B)(A+B)}{AB}&=\frac{A+B}{AB}\\ (A-B)(A+B)&=A+B \end{aligned}\]

Since the two sides are equal, \(A-B=1\) or \(A+B=0\). We will consider these two cases.

Case 1: \(A-B=1\)

In this case, we know that \(A\) and \(B\) differ by \(1\) and \(A > B\). The largest value \(A\) can be is \(9\). When \(A=9\), \(B=8\). The smallest value \(B\) can be is \(-9\). When \(B=-9\), \(A=-8\), a value which is \(1\) more than the value of \(B\).

So \(A\) can take on all of the integer values from \(-8\) to \(9\), except \(A=0\). But when \(A=1\), \(B=0\), so we have to remove this value of \(A\) as well. There are \(18\) values for \(A\) from \(-8\) to 9. After removing \(A=0\) and \(A=1\), there are \(16\) values for \(A\) and therefore \(16\) corresponding values for \(B\). Thus, the equation has \(16\) solutions when \(A-B=1\).

Case 2: \(A+B=0\)

In this case, \(A+B=0\) or \(A=-B\). The largest value \(A\) can be is \(9\). When \(A=9\), \(B=-9\). The smallest value \(A\) can be is \(-9\). When \(A=-9\), \(B=9\). So \(A\) can take on all of the integer values from \(-9\) to \(9\), except \(A=0\). Thus, the equation has \(19-1=18\) solutions when \(A+B=0\).

Therefore, there are \(16+18=34\) solutions to the equation which satisfy the conditions that \(A\) and \(B\) are both integers, \(-9\leq A \leq 9\), and \(-9\leq B \leq 9\).