Slow down SymPy computations in smaller steps

I am playing with SymPy and it is very powerful. However, I would like to make it "slow down" and solve parts of the equation in one go, not most of the equations. For example, given the equation of the input string (assuming the correct shape), for example,

9x-((17-3)(4x)) - 8(34x)

      

I would like to decide first

9x-((14)(4x)) - 8(34x)

      

And then

9x-(56x) - 8(34x)

      

and then

9x-(56x) - 272x

      

Etc.

Another example:

from sympy import *
s = (30*(5*(5-10)-10*x))+10
s2 = expand(s, basic=False)

      

Gives me -300*x - 740

one step and I just need to do one * at a time

+3


source to share


1 answer


Considering the ideas document generated by Google Summer of Code, this doesn't seem to have been added to the library yet. As it stands, there is no way to do this for your example without completely coding something yourself.

The issue of transformation algorithms that are not equivalent to human work, into discrete steps, is discussed and emphasized in the aforementioned paper. I'm not sure if this would be a problem when implementing an extension, but it is certainly a problem for other algorithms that machines compute differently for efficiency reasons.



tl; dr This library does not support step-by-step breakdowns for your example. Currently, only the manual integration function has step-by-step operations.

+1


source







All Articles