rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

wrong function acot #1593

Closed rtoy closed 2 days ago

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 20:20:06 Created by kubula on 2006-01-10 10:57:44 Original: https://sourceforge.net/p/maxima/bugs/851


I have maxima for windows (5.9.2) and maxima on my debian Sarge(5.9.1-9). When I plot graph of function acot (arc cotangent) I see, that this graph is wrong. (%i1) plot2d(acot(x),[x,-10,10]) ; This is graph of function atan(1/x), but acot is defined by formula acot(x) = Pi/2 - atan(x)

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 20:20:07 Created by willisbl on 2006-01-10 22:08:40 Original: https://sourceforge.net/p/maxima/bugs/851/#880d


Logged In: YES user_id=895922

From Abramowitz and Stegun (A&S):

acot(x) = atan(1/x) (4.4.8) atan(x) + acot(x) = -pi/2 if real part(x) <= 0 (4.4.4) atan(x) + acot(x) = pi/2 if real part(x) > 0 (4.4.4)

According to Abramowitz and Stegun (the unoffical offical reference for Maxima), your formula isn't correct in the left half plane. Nevertheless, such things are easy to mess up, so I'll carefully check A&S identities 4.4.4 -- 4.4.9 using cvs Maxima.

Barton

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 20:20:11 Created by kubula on 2006-02-06 14:06:52 Original: https://sourceforge.net/p/maxima/bugs/851/#7daa


Logged In: YES user_id=1020884

My formula is correct. Formula pi/2 - atan(x) is inverse function for function cotangent on interval (0;pi). Formula atan(1/x) is inverse funciton for function cotangent on interval (-pi/2;pi/2). So bug is in help, because there isn't interval defined.

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 20:20:14 Created by robert_dodier on 2006-08-15 03:03:33 Original: https://sourceforge.net/p/maxima/bugs/851/#0821


rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 20:20:18 Created by willisbl on 2008-05-14 09:51:15 Original: https://sourceforge.net/p/maxima/bugs/851/#5556