derivative of cotangent

18 views
Skip to first unread message

Jason Grout

unread,
Sep 18, 2009, 2:15:46 PM9/18/09
to sage-s...@googlegroups.com
On alpha.sagenb.org, I get the following:

sage: t=var('t')
sage: diff(cot(t),t)
D[0](cot)(t)
sage: diff(cos(t)/sin(t),t)
-cos(t)^2/sin(t)^2 - 1


Does Sage not know that cot(t) is cos(t)/sin(t)? Or am I just being silly?

Jason

Burcin Erocal

unread,
Sep 18, 2009, 2:33:45 PM9/18/09
to sage-s...@googlegroups.com
Hi Jason,

Unfortunately it doesn't.

GiNaC doesn't define the function cot. Sage defines it in the file
sage/functions/trig.py starting at line 184. I suppose it was written
quickly by Mike during the symbolics switch.

Defining a custom derivative function (named _derivative_()) in that
class should fix this.

I opened a ticket:

http://trac.sagemath.org/sage_trac/ticket/6956


Thanks.


Burcin

Reply all
Reply to author
Forward
0 new messages