[sympy] Disabling simplification... is it possibile?

2010-06-29 Thread nelson
I'm making a manual equation solver, where my students have to manually apply algebra rules in order to simplify and solve problems. The problem is that, for some subjects, I want that the expression x1 = Symbol('x1') b = x1 + x1 remainx x1 + x1 and not became 2*x1... is it possibile in sympy?

[sympy] Re: navitaing though sympy expression

2010-06-22 Thread nelson
]: ⎛       2       ⎞ ⎝(1 + x) , 2 + x⎠ In [4]: a.args[0] Out[4]:        2 (1 + x) In [5]: a.args[0].expand()*a.args[1] Out[5]:         ⎛           2⎞ (2 + x)⋅⎝1 + 2⋅x + x ⎠ Aaron Meurer On Jun 15, 2010, at 12:31 PM, nelson wrote: hi all!  i am evaluating sympy for a project i'm

[sympy] navitaing though sympy expression

2010-06-15 Thread nelson
hi all! i am evaluating sympy for a project i'm doing. Basically i want to be able to extract a part of an expression, for examplre (x+1)^2 out of (x+2)*(x+1)^2 and performing an operation on it. For example,, expanding the (x+1)^2 term wold return the expression (x+2)*(x^2+2*x+1) is it