Post Reply 
bug in arccotangent function
10-20-2022, 02:38 PM
Post: #1
bug in arccotangent function
Hello!

i have found bug in arccotangent function for both Home and Cas modes.

For example, acot(-1)=-pi/4 that is wrong because acot(-1)=3pi/4.

The same behaviour exists for Xcas and Wolfram Alpha.
Find all posts by this user
Quote this message in a reply
10-20-2022, 03:27 PM
Post: #2
RE: bug in arccotangent function
I think its not a bug: both results are correct: arccot ist periodical with period pi

Roland
Find all posts by this user
Quote this message in a reply
10-20-2022, 04:44 PM
Post: #3
RE: bug in arccotangent function
(10-20-2022 03:27 PM)Roland57 Wrote:  I think its not a bug: both results are correct: arccot ist periodical with period pi

You cannot have *both* right, since acot is one to one function.
It is just software packages may have different definition of acot.
Once defined, it is always one-to-one.

I prefer Mathematica's definition of acot(x) as odd function, even though curve has a discontinuity at 0.
see thread What should be the correct range of acot function

BTW, acot(x) is not periodic. (may be you meant cot(x) ?)
Find all posts by this user
Quote this message in a reply
10-20-2022, 07:22 PM
Post: #4
RE: bug in arccotangent function
I'm a physicist, not a mathematician, I have a very practical look at this problem :-)

cot(-pi/4) equals cot(3pi/4) = -1

therefore, arccot(-1) has many solutions, among many others the above mentioned two.
And yes: cot() ist periodic and (for a physicist) arccot() ist not a one-to-one relation.

Roland
Find all posts by this user
Quote this message in a reply
10-20-2022, 09:44 PM
Post: #5
RE: bug in arccotangent function
I am an engineer ... I thought we were talking about principle branch. :-)

acot(x) == atan(1/x) or (pi/2 - atan(x))



Find all posts by this user
Quote this message in a reply
10-21-2022, 01:38 PM
Post: #6
RE: bug in arccotangent function
Ok. Thanks.

Then another question: Why does HP Prime as educational tool have another definition of arccotangent function opposite to such global educational tools as TI-Nspire CX CAS and TI-89 Titanium?
Find all posts by this user
Quote this message in a reply
10-21-2022, 05:07 PM
Post: #7
RE: bug in arccotangent function
MATLAB (home use) -0.7854
wxMaxima: -pi/4
Find all posts by this user
Quote this message in a reply
10-21-2022, 06:59 PM
Post: #8
RE: bug in arccotangent function
(10-21-2022 01:38 PM)gor1060 Wrote:  Why does HP Prime as educational tool have another definition of arccotangent function opposite to such global educational tools as TI-Nspire CX CAS and TI-89 Titanium?

Some textbooks define acot(x) as pi/2-atan(x) as TI does. This is consistent with acos(x)=pi/2-asin(x) and acsc(x)=pi/2-asec(x).

Other textbooks define acot(x) as atan(1/x) as HP does. This is consistent with asec(x)=acos(1/x) and acsc(x)=asin(1/x).

Unfortunately, there is no consensus in the educational world as to the "correct" one.
Find all posts by this user
Quote this message in a reply
10-22-2022, 01:58 AM
Post: #9
RE: bug in arccotangent function
:-(

Thanks to everybody for info.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)