Thank you. It works in this example. But if I'd like to do this:

print((x**2+1)*(x-1))

It prints me string without compute it. I'd like to have :

x**3-x**2+x-1

Is it possible?

Thanks Mike

środa, 10 lutego 2021 o 19:59:55 UTC+1 gu...@uwosh.edu napisał(a):

> wrap your expression in a `print()` statement: `print(1+x+x**2+x**3)`.
> On Wednesday, February 10, 2021 at 9:43:44 AM UTC-6 
> michal.bozyd...@gmail.com wrote:
>
>> Hi.
>>
>> I'd like to generate code of simplified formula. I.E:
>>
>> When I pass: 1+x+x**2+x**3
>> I'd like to have: x**3+x**2+x+1
>>
>> Is it possible to achieve it?
>>
>> Thanks
>> Mike
>>
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/bdbf74bf-0e4a-481c-8c2c-649e3cc3ad39n%40googlegroups.com.

Reply via email to