Let's say I have a fraction like this:
(a b x^2 + a^3 x) / (a^2 b x)
and I would like to simplify it by multiplying both the numerator and the denominator with
while introducing the following:
a/x = A and b/x = B
So in the end I'd get:
(A B + A^3) / (A^2 B)
Is there a way to do this in Mathematica?