On Jun 2, 2010, at 9:12 AM, Scott wrote: > What is the best way to evaluate x * cot(x) evaluated for x=0-pi/2 > with sympy?
I am not too sure what you mean by 0-pi/2, but you could try limit(): In [3]: limit(x*cot(x), x, 0) Out[3]: 1 In [4]: limit(x*cot(x), x, pi/2) Out[4]: 0 > > Is there a better option than coding the Taylor series approximation? You wouldn't need to code the taylor series, it already is implemented: In [7]: print (x*cot(x)).series(x) 1 - x**2/3 - x**4/45 - 2*x**6/945 + O(x**7) > > Also with the sympy that shipped with Ubuntu 10.04 sympy.cot(0) is 0 > rather than infinity. This is a bug that still exists in master. Could you report it in the issues? Aaron Meurer > > V/R > > Scott > > -- > 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. > -- 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.
