Hello, I'm trying to define inverse csc, sec, and cot and their hyperbolic versions. I dug through $SAGE_ROOT/devel/sage-main/build/sage/calculus/calculus.py and thought I could just use some identities and copy similar definitions for the other inverse trig functions. I tried this:
class Function_acot(PrimitiveFunction): """ The arccotangent function. """ def _repr_(self, simplify=True): return "acot" def _latex_(self): return "\\cot^{-1}" def _approx_(self, x): return pi/2 - math.atan(x) acot = Function_acot() _syms['acot'] = acot ...but when I started Sage back up, it didn't know what "acot" was: sage: acot(2) --------------------------------------------------------------------------- <type 'exceptions.NameError'> Traceback (most recent call last) /tmp/<ipython console> in <module>() <type 'exceptions.NameError'>: name 'acot' is not defined How do I get Sage to figure out what acot is? And should I use "pi/2" above, or do I need to use math.pi()/2 or whatever? And having done that, how do I tell Sage how to do calculus with those functions? Thanks, Dan -- --- Dan Drake <[EMAIL PROTECTED]> ----- KAIST Department of Mathematical Sciences ------- http://math.kaist.ac.kr/~drake
signature.asc
Description: Digital signature