Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get rid of denominator in numerator and denominator in mathematica

I have the following expression

(-1 + 1/p)^B/(-1 + (-1 + 1/p)^(A + B))

How can I multiply both the denominator and numberator by p^(A+B), i.e. to get rid of the denominators in both numerator and denominator? I tried varous Expand, Factor, Simplify etc. but none of them worked.

Thanks!

like image 240
Qiang Li Avatar asked Jan 27 '26 03:01

Qiang Li


2 Answers

I must say I did not understand the original question. However, while trying to understand the intriguing solution given by belisarius I came up with the following:

expr = (-1 + 1/p)^B/(-1 + (-1 + 1/p)^(A + B));

Together@(PowerExpand@FunctionExpand@Numerator@expr/
 PowerExpand@FunctionExpand@Denominator@expr)

Output (as given by belisarius):

alt text

Alternatively:

PowerExpand@FunctionExpand@Numerator@expr/PowerExpand@
 FunctionExpand@Denominator@expr

gives

alt text

or

FunctionExpand@Numerator@expr/FunctionExpand@Denominator@expr

alt text

Thanks to belisarius for another nice lesson in the power of Mma.

like image 69
681234 Avatar answered Feb 01 '26 00:02

681234


If I understand you question, you may teach Mma some algebra:

r = {(k__ + Power[a_, b_]) Power[c_, b_] -> (k Power[c, b] + Power[a c, b]),
      p_^(a_ + b_) q_^a_ -> p^b ( q p)^(a),
      (a_ + b_) c_ -> (a c + b c)
    }

and then define

s1 = ((-1 + 1/p)^B/(-1 + (-1 + 1/p)^(A + B)))

f[a_, c_] := (Numerator[a ] c //. r)/(Denominator[a ] c //. r)

So that

f[s1, p^(A + B)]  

is

((1 - p)^B*p^A)/((1 - p)^(A + B) - p^(A + B))  

alt text

like image 38
Dr. belisarius Avatar answered Feb 01 '26 01:02

Dr. belisarius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!