Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 4002 by [email protected]: Factorizing rational functions
http://code.google.com/p/sympy/issues/detail?id=4002

When trying to factorize a rational function (polynomial/polynomial) it only does it on the numerator, while in the previous version it did it on both, the numerator and the denominator. A test code could be:

var('s')
var('K_C', real = True)
var('tau_Int', real = True)
var('tau_Der', real = True)
var('x')
var('y')

H_PID = K_C*(1 + 1/(tau_Int*s) + tau_Der*s)

var('z')
var('T_s')

s_be = (1/T_s)*(z-1)/z

H_PIDbe = H_PID.subs(s, s_be)

latex(H_PIDbe.factor(z))

The result is:

'\\frac{K_{C}}{T_{s} \\tau_{Int} z \\left(z - 1\\right)} \\left(\\tau_{Der} \\tau_{Int} + z^{2} \\left(T_{s}^{2} + T_{s} \\tau_{Int} + \\tau_{Der} \\tau_{Int}\\right) + z \\left(- T_{s} \\tau_{Int} - 2 \\tau_{Der} \\tau_{Int}\\right)\\right)'

while it should be:

'\\frac{K_{C}}{T_{s} \\tau_{Int} z^2 - T_{s} \\tau_{Int}} \\left(\\tau_{Der} \\tau_{Int} + z^{2} \\left(T_{s}^{2} + T_{s} \\tau_{Int} + \\tau_{Der} \\tau_{Int}\\right) + z \\left(- T_{s} \\tau_{Int} - 2 \\tau_{Der} \\tau_{Int}\\right)\\right)'

Or something similar.

This was working as expected on the 0.7.2 version. Why it has been changed?

Thanks in advance,

Jose M.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to