On Sat, Jan 17, 2009 at 11:25 PM, Luke <[email protected]> wrote:
>
> If I have a symbolic expression like:
> expr = a*sin(x) + b*cos(y) - c*tan(z)
>
> I can get each individual additive term, sort of like:
> In[1]:  terms(expr)
> Out[1]:  [a*sin(x), b*cos(y), -c*tan(z)]

In [2]: var("a b c")
Out[2]: (a, b, c)

In [3]: expr = a*sin(x) + b*cos(y) - c*tan(z)

In [4]: expr.args
Out[4]: (b⋅cos(y), a⋅sin(x), -c⋅tan(z))


Ondrej

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

Reply via email to