I have an expression which sympy sorts by D, then by z and log(z):
 
-D*q**2*z**4/(8*log(z)**2) + D*q**2*z**2/(2*log(z)) + D*q**2*z**2/(4*log(z)**2) 
- D*q**2/2 - D*q**2/(2*log(z)) - D*q**2/(8*log(z)**2) - D*q*z**(7/2)/(4*log(z)) 
+ D*q*z**(3/2)/2 + D*q*z**(3/2)/(4*log(z)) - D*z**3/8 - q**2*z**4/(4*log(z)**2) 
+ q**2*z**2/log(z) - q**2*z**2/(2*log(z)**2) + q**2 + q**2/log(z) + 
3*q**2/(4*log(z)**2) - q*z**(7/2)/(2*log(z)) + q*z**(3/2) - 
q*z**(3/2)/(2*log(z)) + q*z**(3/2)/(2*log(z)**2) - q/(2*sqrt(z)*log(z)**2) - 
z**3/4 - z/2 - z/(8*log(z)**2) + 1/(8*z*log(z)**2)

 Can it be re-sorted just in z and log(z)? For example:
 
D z + z → z (D + 1)

 I tried .factor(z, log(z)) but it gives me a huge fraction, which I don't 
need.

This is important because I have to plot the terms sepatly, to find the 
minimal numuber of terms which gives me minimum for a given set of of 
parameters.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to