Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using

p(x)=integral(log(cot(x)-1),x)

I see that p(0) is

1/2*I*polylog(2, -1/2*I + 1/2) - 1/2*I*polylog(2, 1/2*I + 1/2)

which is approximated using p(0).n() to give

0.643767332889269

When I ask for limit(p(x),x=pi/4), I get the following error in Sage 5.0:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_12.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("bGltaXQocCh4KSx4PXBpLzQp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmp607wqe/___code___.py", line 3, in <module>
    exec compile(u'limit(p(x),x=pi/_sage_const_4 )
  File "", line 1, in <module>

  File "/home/sageserver/sage-5.0.1/local/lib/python2.7/site-packages/sage/calculus/calculus.py", line 1163, in limit
    l = maxima.sr_limit(ex, v, a)
  File "/home/sageserver/sage-5.0.1/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 859, in sr_limit
    raise error
RuntimeError: ECL says: Error executing code in Maxima: atan2: atan2(0,0) is undefined.

Using

p(x)=integral(log(cot(x)-1),x)

I see that p(0) is

1/2*I*polylog(2, -1/2*I + 1/2) - 1/2*I*polylog(2, 1/2*I + 1/2)

which is approximated using p(0).n() to give

0.643767332889269

When I ask for limit(p(x),x=pi/4), I get the following error in Sage 5.0:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_12.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("bGltaXQocCh4KSx4PXBpLzQp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

  File "/tmp/tmp607wqe/___code___.py", line 3, in <module>
    exec compile(u'limit(p(x),x=pi/_sage_const_4 )
  File "", line 1, in <module>

  File "/home/sageserver/sage-5.0.1/local/lib/python2.7/site-packages/sage/calculus/calculus.py", line 1163, in limit
    l = maxima.sr_limit(ex, v, a)
  File "/home/sageserver/sage-5.0.1/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 859, in sr_limit
    raise error
RuntimeError: ECL says: Error executing code in Maxima: atan2: atan2(0,0) is undefined.

But, executing atan2(0,0) gives 0. So, something is wrong here somewhere.