| 1 | initial version |
It sometimes helps to expand and factor:
sage: s
1/4*(2*D*Nb*Pmean - (D*H*alpha + D*H)*c)/((alpha + 1)*c)
sage: s.expand()
-1/4*D*H*alpha/(alpha + 1) - 1/4*D*H/(alpha + 1) + 1/2*D*Nb*Pmean/((alpha + 1)*c)
sage: _.factor()
-1/4*(H*alpha*c - 2*Nb*Pmean + H*c)*D/((alpha + 1)*c)
sage: _.partial_fraction()
1/4*(2*Nb*Pmean - (H*alpha + H)*c)*D/((alpha + 1)*c)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.