2
$\begingroup$

The function $f(x)=\cot^{-1} x$ is well known to be neither even nor odd because $\cot^{-1}(-x)=\pi-\cot^{-1} x$. it's domain is $(-\infty, \infty)$ and range is $(0, \pi)$. Today, I was surprised to notice that Mathematica treats it as an odd function, and yields its plot as given below:

enter image description here

How to reconcile this ? I welcome your comments.

Edit: I used: Plot[ArcCot[x], {x, -3, 3}] there to plot

$\endgroup$
5
  • $\begingroup$ Can you post the string you passed to Mathematica used to obtain this figure? $\endgroup$ Sep 18, 2020 at 9:28
  • $\begingroup$ I used: Plot[ArcCot[x],{x,-3,3}], there. I have also put it in my edit now. $\endgroup$
    – Z Ahmed
    Sep 18, 2020 at 9:32
  • $\begingroup$ It depends on how you define $\cot^{-1}$ – as the inverse of $\cot$ on the interval $(0, \pi)$ or on the interval $(-\pi/2, \pi/2)$. $\endgroup$
    – Martin R
    Sep 18, 2020 at 9:33
  • $\begingroup$ I am afraid it should not be left to choice. Similarly $\cos^{-1}(x)$ is also of mixed parity as $\cos^{-1}(-x)=\pi-\cos^{-1} x$. it is not an even function. $\endgroup$
    – Z Ahmed
    Sep 18, 2020 at 9:36
  • $\begingroup$ The difference is explained here: mathworld.wolfram.com/InverseCotangent.html. $\endgroup$
    – Martin R
    Sep 18, 2020 at 9:37

3 Answers 3

2
$\begingroup$

From Inverse Cotangent on Wolfram MathWorld:

There are at least two possible conventions for defining the inverse cotangent. This work follows the convention of Abramowitz and Stegun (1972, p. 79) and the Wolfram Language, taking $\cot^{-1}x$ to have range $(-\pi/2,\pi/2]$, a discontinuity at $x=0$, and the branch cut placed along the line segment $(-i,i)$.

This definition is also consistent, as it must be, with the Wolfram Language's definition of ArcTan, so ArcCot[z] is equal to ArcTan[1/z].

A different but common convention (e.g., Zwillinger 1995, p. 466; Bronshtein and Semendyayev, 1997, p. 70; Jeffrey 2000, p. 125) defines the range of $\cot^{-1}x$ as $(0,\pi)$, thus giving a function that is continuous on the real line $\Bbb R$.

The former definition is what Mathematica uses. Note that with that definition, $\cot^{-1}(0) = \pi/2$, so it is an odd function only if you exclude $x=0$ from the domain.

The latter definition satisfies $\cot^{-1}(-x)=\pi-\cot^{-1} x$ and is not an odd function.

$\endgroup$
1
0
$\begingroup$

We have that $\cot^{-1}(-x)$ is invertible only on suitable restrictions, in this case it seems Mathematica is considering the following definition

$$f(x)=\cot^{-1}(x): \mathbb R \to \left(-\frac \pi 2, \frac \pi 2\right)$$

that is also the definition used by Wolfram.

$\endgroup$
2
  • 1
    $\begingroup$ Mathematica is Wolfram. $\endgroup$
    – user65203
    Sep 18, 2020 at 14:36
  • $\begingroup$ @YvesDaoust All is clear then! Thanks $\endgroup$
    – user
    Sep 18, 2020 at 14:51
0
$\begingroup$

I think the Range of $f(x)=\cot^{-1} x$ as $(0,\pi)$ and hence the mixed parity of this function gets preference as then $f(x)$ is continuous in the its domain $(-\infty, \infty)$, specially at $x=0$. Then $\cot^{-1}(-x)=\pi-\cot (x)$.

In problem solving, for students, teachers and examiners this convention is most welcome for the sake of consistency. According to this $\cot^{-1} x$ function should look as below:

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .