# What is the possible value of: $\frac{a}{b}+\frac{b}{a}-ab$ [closed]

$$a$$ and $$b$$ are two non-zero real numbers that satisfy $$ab = a - b$$ What is the possible value of: $$\frac{a}{b}+\frac{b}{a}-ab$$

I found it $$2b$$

Is it true?

• Please edit your question to show how you got that result. Nov 26, 2022 at 13:14
• plug in some numbers (e.g. $a=b=1$) and see if your result is correct in that case. Nov 26, 2022 at 13:17
• @Oбжорoв while I agree that checking some cases is a good idea I feel compelled to mention that if $a=b=1$ then $ab = 1 \neq 0 = a-b$ so it's doesn't meet the criteria. You can find some counter-examples pretty quickly though by guess-and-test. Nov 26, 2022 at 13:22
• @CyclotomicField you are absolutely right. Although my approach was correct, the example wasn't. Nov 26, 2022 at 13:24
• Please, show your work that you did to find the result. Nov 26, 2022 at 13:45

$$\frac a b + \frac b a - ab =\\ \frac {a^2 + b^2 - (ab)^2} {ab} =\\ \frac {a^2 + b^2 - a^2 +2ab - b^2} {ab} =\\ \frac {2ab} {ab} =\\ 2$$

EDIT: FWIW, here's another sequence $$-$$ first worth noting that $$a, b \ne 0$$ for otherwise the problem statement is not well defined. We have

$$ab = a - b \iff ab + b = a \iff a + 1 = \frac a b$$

Likewise,

$$ab = a - b \iff a - ab = b \iff 1 - b = \frac b a$$

So,

$$\frac a b + \frac b a - ab =\\ a + 1 + 1 - b - ab =\\ 2 + a - b - ab =\\ 2$$