I don't think you can enter
(5/x - 7/(x + 1)) ((x + 1) - x)
and keep ((x + 1) - x)
from evaluating to 1
. So you'll have to enter or evaluate some other expression.
Of course, if it's allowed to enter something else, then entering -12 + (7 x)/(1 + x) + (5 (1 + x))/x
will evaluate to the desired expression. This suggestion probably seems flip, but if something different is to be entered, I am far from understanding what differences are allowed and what differences are prohibited. Any help?
I also do not understand what sequence of algebraic operations you have mind that lead from (5/x - 7/(x + 1)) ((x + 1) - x)
to -12 + (7 x)/(1 + x) + (5 (1 + x))/x
. I could probably reverse-engineer something if I thought long and hard. Frankly, though, I don't think it's worth my time, when you probably already have something in mind that you could share.
This might be a good start: Inactivate[(5/x - 7/(x + 1)) ((x + 1) - x)]
. Then you might be able to perform the structural operations you have mind. When done, then apply Activate[]
to the transformed expression.
Gee, I accidentally I discovered it:
foo = Inactivate[(5/x - 7/(x + 1)) ((x + 1) - x)]
Distribute[foo, Inactive@Plus, Inactive@Times] // Activate