开发者

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 denomina开发者_StackOverflowtor 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!


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):

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

Alternatively:

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

gives

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

or

FunctionExpand@Numerator@expr/FunctionExpand@Denominator@expr

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

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


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))  

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


Simplify should work, but in your case it doesn't make sense to multiply numerator and denominator by p^(A+B), it doesn't cancel denominators

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜