Mathematica gave me a solution to an equation in this form:
ans1 = (b c)/(a - a c + b c)
$\text{ans1} = \frac{b c}{a - a c + b c}$
From solving the same equation by hand, I know of an alternative form in which each variable appears only once:
ans2 = 1/(1 + (1/c - 1) a/b)
$ \text{ans2} = \frac{1}{1 + \left(\frac{1}{c}-1\right)\frac{a }{b}} $
Running Simplify[ans2]
gives ans1
. Is there a systematic way to obtain ans2
from ans1
?
In numerical analysis, expressions like ans2
are called "single use expressions". They also show up in interval arithmetic.
I'm particularly interested in a method that could work for other expressions besides the given example, although I'm not sure it's possible to isolate each variable in general, e.g. a/(a+b)
.
Edit: @bbgodfrey has pointed out that a/(a+b)
can be transformed into a single-use expression.
Edit: in numerical analysis, these are called "single use expressions".
It is known that this problem is easy to solve when we have a Single Use Expression, i.e., an expression in which each variable $x_i$ occurs only once.
https://doi.org/10.1109/NAFIPS.2011.5752032
In a linear expression $f = a_0 + a_1 \cdot \Delta x_1 + \ldots + a_n \cdot \Delta x_n$, each variable $\Delta x i \in [-\Delta_i , \Delta_i ]$ occurs only once. It is known that for such single-use expressions (SUE), straightforward interval computations leads to the exact range;
https://doi.org/10.1007/11558958_9
In general, it can be shown that the exact range of values can be achieved, if each variable appears only once and if $f$ is continuous inside the box. However, not every function can be rewritten this way.
Simplify
. For example,HornerForm
. But this particular goal is not a standard normal form, so you'd have to fiddle with replacement rules that break easily. $\endgroup$