如何去掉mathematica中分子和分母中的分母

发布于 2024-10-12 14:48:16 字数 156 浏览 2 评论 0原文

我有以下表达式

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

如何将分母和数字都乘以 p^(A+B),即去掉分子和分母中的分母?我尝试了各种扩展、因子、简化等,但都不起作用。

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

清风疏影 2024-10-19 14:48:16

我必须说我不明白原来的问题。然而,在尝试理解 belisarius 给出的有趣解决方案时,我想到了以下内容:

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

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

输出(由 belisarius 给出):

alt text

或者:

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

给出

alt text

FunctionExpand@Numerator@expr/FunctionExpand@Denominator@expr

alt text

感谢贝利撒留为我们上了一堂关于 Mma 力量的精彩课。

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.

独闯女儿国 2024-10-19 14:48:16

如果我理解你的问题,你可以教 Mma 一些代数:

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

然后定义

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

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

所以那

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

就是

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

alt text

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

葮薆情 2024-10-19 14:48:16

简化应该可行,但在您的情况下,将分子和分母乘以 p^(A+B) 没有意义,它不会取消分母

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文