Mateusz Paprocki a écrit :
> In [1]: var('x y z')
> Out[1]: (x, y, z)
>
> In [2]: f = x**2 + 2*y*x + sin(z)
>
> In [3]: g = x**2 + 2*y*x + sin(x)
>
> In [4]: f.is_polynomial(x)
> Out[4]: True
>
> In [5]: g.is_polynomial(x)
> Out[5]: False
>
> However, this can be done in other ways too, e.g.:
>
> In [6]: print f.as_poly(x)
> Poly(x**2 + 2*y*x + sin(z), x)
>
> In [7]: print g.as_poly(x)
> None
Thanks for that but I have a big problem. How to use all of that for f 
and g which are strings ?
========================

f = 'x**2 + 2*y*x + sin(z)'
g = 'x**2 + 2*y*x + sin(x)'

========================
I need to work with strings because that will be a program which will 
call sympy.

Christophe.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to