exponentialize not working with sinh

29 views
Skip to first unread message

Andrius Tamulis

unread,
Sep 12, 2022, 1:19:47 PM9/12/22
to sage-support
Simply as stated. Version 'SageMath version 9.3, Release Date: 2021-05-09'. Windows 10, 64 bit. Copied and pasted from https://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/expression.html#sage.symbolic.expression.Expression.exponentialize in to Jupyter notebook:
 
x = SR.var("x")
sinh(x).exponentialize()

and got the following:

--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-2-42503062c3f9> in <module> ----> 1 sinh(x).exponentialize() /opt/sagemath-9.3/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4709)() 491 AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah' 492 """ --> 493 return self.getattr_from_category(name) 494 495 cdef getattr_from_category(self, name): /opt/sagemath-9.3/local/lib/python3.7/site-packages/sage/structure/element.pyx in sage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4821)() 504 else: 505 cls = P._abstract_element_class --> 506 return getattr_from_other_class(self, cls, name) 507 508 def __dir__(self): /opt/sagemath-9.3/local/lib/python3.7/site-packages/sage/cpython/getattr.pyx in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2618)() 370 dummy_error_message.cls = type(self) 371 dummy_error_message.name = name --> 372 raise AttributeError(dummy_error_message) 373 attribute = <object>attr 374 # Check for a descriptor (__get__ in Python) AttributeError: 'sage.symbolic.expression.Expression' object has no attribute 'exponentialize'

Thank you,

Andrius

G. M.-S.

unread,
Sep 12, 2022, 2:51:46 PM9/12/22
to sage-s...@googlegroups.com
Hi Andrius.

Perhaps your version of SageMath is too old.
With a recent version I get the following.
I know that for Windows there is no version more recent than 9.3 that can be installed very quickly.
Look at
to see the possibilities.

% sage

┌────────────────────────────────────────────────────────────────────┐

│ SageMath version 9.7.beta5, Release Date: 2022-07-10              

│ Using Python 3.10.5. Type "help()" for help.                      

└────────────────────────────────────────────────────────────────────┘

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

┃ Warning: this is a prerelease version, and it may be unstable.    

┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

sage: sinh(x).exponentialize()

-1/2*e^(-x) + 1/2*e^x

sage: cosh(x).exponentialize()

1/2*e^(-x) + 1/2*e^x

sage: tanh(x).exponentialize()

-(e^(-x) - e^x)/(e^(-x) + e^x)

sage: 


Guillermo

Reply all
Reply to author
Forward
0 new messages