How to get the identity $\frac{1}{ab} = \left(\frac{1}{a} - \frac{1}{b}\right)\frac{1}{(b - a)}$ when $a < b$?

67 Views Asked by At

How does one arrive at the equality $\frac{1}{ab} = \left(\frac{1}{a} - \frac{1}{b}\right)(b - a)$ when $a < b$? I came across this identity in a competitive programming problem, but I couldn't find out any way to get it. For example,

$$\frac{1}{2 \cdot 3} = \left(\frac{1}{2} - \frac{1}{3}\right)\frac{1}{(3 - 2)},$$

and

$$\frac{1}{3 \cdot 5} = \left(\frac{1}{3} - \frac{1}{5}\right)\frac{1}{(5 - 3)}.$$

2

There are 2 best solutions below

0
On BEST ANSWER

For $a,b\ne 0$ and $a\ne b$, multiply both sides in $ab(b-a)$ and double-sidedly conclude what you want.

0
On

Because $$\frac{1}{a}-\frac{1}{b}=\frac{b-a}{ab}$$ and since $b-a\neq0$, we are done.