Which is the correct graph of arccot x?
[03 May 2011]
A reader challenged me on the graph I had for y = arccot x, on the page Inverse Trigonometric Functions.
He wrote (in a rather unfriendly tone):
Compare:
http://en.wikipedia.org/wiki/Inverse_trigonometric_functions
http://www.intmath.com/analytic-trigonometry/7-inverse-trigo-functions.php
You incorrectly state the range of the arccotangent function as -pi/2 to pi/2. It is not. The correct range of arccotangent is 0 to pi.
After some deliberation, I have now included both interpretations on my page, because both are found in various sources.
First, some background.
Obtaining the graph of y = arccot(x)
The graph of y = arccot x can be obtained from a consideration of the graph of y = cot x.
But depending on your starting region, you’ll get a different graph for y = arccot x.
Interpretation 1
The graph of y = cot x is as follows:

We choose the portion from x = 0 to x = π (as highlighted above), and reflect it in the line y = x like this.

Since reflection in the line y = x gives us the inverse of a function, we have obtained the graph of y = arccot x, as follows:

From the graph we can see the domain (the possible x-values) of y = arccot x is:
All values of x
And the range (resulting y-values) of arccot x is:
0 < arccot x < π
If we evaluate our function for some negative value of x, say x = −2, then we get a positive answer, as expected from the graph:
arccot(−2) = 2.678…
Alternate View – Interpretation 2
Some math textbooks (and some respected math software, e.g. Mathematica) regard the following as the region of y = cot x that should be used (that is, −π/2 to π/2):

This would give the following discontinuous graph when reflected in the line y = x:

So the domain of arccot x would be (as for Interpretation 1):
All values of x
Using this interpretation, the range of arccot x would be:
−π/2 < arccot x ≤ π/2 (arccot x ≠ 0)
If this is the correct graph, we expect a negative answer when we evaluate the function at x = −2. It is actually:
arccot(−2) = −0.46365…
Which is correct?
According to a response to a reader’s question on this same issue, Dr. Math goes for the first interpretation:
In order to invert a trig function, we first restrict it to a domain on which it takes all its possible values, once each; then we invert the restricted function, whose range is then that restricted domain.
Look at a graph of the cotangent function, and you will see that although between -pi/2 and pi/2 it takes all its possible values, and takes each value only once, there is one problem with this choice: it is not continuous (or even defined) on this entire domain, but is undefined at 0.
The domain would then have to be
-pi/2 < x < 0 or 0 < x <= pi/2
To avoid this, we instead choose the domain
0 < x < pi
which is cleaner to work with, making a continuous function defined over the entire domain.
Math software doesn’t agree, either
Let’s now see the inconsistent way (respected) math software deals with this function.
Mathcad’s Interpretation
When I graphed the function acot(x) in Mathcad, this is the result (they are using the first interpretation):

Mathcad gives arccot(−2) = 2.678…, which is consistent with their graph. Mathcad uses "acot(x)" notation.
Mathematica’s Interpretation
However, according to Mathematica (using Wolfram|Alpha) , this is the graph of y = arccot(x):

So Mathematica is using the second interpretation of the function. (They use the somewhat poor notation y = cot−1x.)
Taking a typical value, Mathematica (Wolfram|Alpha) gives us
arccot(−2) = −0.46365…
How can this be? The first interpretation gives us a positive value for arccot(−2), while the second interpretation gives us a negative value.
Matlab’s Interpretation
Matlab also gives us a discontinuous graph based on the second interpretation.
Matlab also uses "acot(x)" notation.
Maple/Scientific Notebook’s Interpretation
My version of Scientific Notebook has both Maple and MuPAD engines. The results using both of these are curious.
Using the Maple engine, we get an answer using the first interpretation.
But when we switch to use MuPAD in Scientific Notebook, we get this result, which uses the second interpretation!
So even the top math software makers can’t agree.
Conclusion
Here’s another case where our math definitions are not as tight as we are often led to believe.
Also, the notation is inconsistent. Different text books and different software use the following to mean the same thing:
- arccot(x)
- acot(x)
- cot−1x
We should never use the last one! (See my rant on this here: Arcsin or sin?)
So which version of arccos(x) is the right one? Is my reader correct? (I don’t know his name or email so I can’t reply to him. Strange.)
I know which interpretation I think is "best". What are your thoughts?
3 May 2011 at 9:19 pm [Comment permalink]
I love this careful, thoughtful discussion! I especially liked your investigation with each piece of math software. Thanks for doing the research.
3 May 2011 at 9:20 pm [Comment permalink]
[...] love this discussion at squareCircleZ. All my readers should check it out. Which is the graph of arccot(x)? from [...]
4 May 2011 at 4:31 am [Comment permalink]
Good catch!
Arccotg(x) is monotonously decreasing in the interval (0,Pi). Monotonous increasing/decreasing functions are “inversable” by one Theorem. Therefore this interval is the logical choice. For the same reason the books choose (-Pi/2,Pi/2) for Arctg(x).
Ah yes, I do think that the correct notation is “arccotg(x)”. See we have “tg” (TanGent) and we put “co” in front if it, so we should have “cotg” (COTanGent). Finally put an “arc” in front and it happens to be “arccotg” (ARCusCOTanGent).
Your article is superb!
4 May 2011 at 5:33 am [Comment permalink]
You inspired me. OK, I did some research and I found the answer. The “arccotg(x) in (-pi/2,pi/2) without 0? and “arccoth(x) in (0,pi)” are the inverse functions of TWO DIFFERENT FUNCTIONS. And yes, BOTH ARE VALID.
Let me explain it with x^2. This function is NOT inversible. If you draw a horizontal line it will cross the function in two points. But still we usually say “the inverse function of x^2 is square root of x”. Yes, we do say it wrong! Actually the “square root of x” is inverse function of the following function:
x^2 for x>=0
AND
undefined for x<0
x=0 AND undefined for x<0″ is NOT the same function as “x^2 for any x”.
It is the same with the trig functions. “cotg(x) in (-pi/2,pi/2)” is not the same function as “cotg(x) in (0,pi)”. Therefore their inverses are also two different functions.
Conclusion: it is WRONG to say “the inverse function of sin(x) is arcsin(x)”. Well it is not true – sin(x) itself do NOT have an inverse function
P.S. Fix your blog comments to convert the angle braces < and >. It seems like they do open HTML tags, which is bad. They must be converted to > and <
4 May 2011 at 2:02 pm [Comment permalink]
[...] En este post de squareCircleZ, que es de donde he sacado algunas de las imágenes, hablan también sobre este tema. MeneameBitacorasDeliciousGoogle BuzzFacebookTwitter [...]
5 May 2011 at 4:05 am [Comment permalink]
Thanks for clearly laying out the different approaches. I’m surprised that the computer algebra systems interpret this function differently. I checked a few calculus textbooks, and they agree with how Mathcad defines arccotangent, (acot function in Mathcad).
I’m going to post it for our users to discuss in http://communities.ptc.com/community/mathcad
Thanks again,
Mona
Mathcad Senior Technical Consultant
PTC
6 May 2011 at 2:29 am [Comment permalink]
If only they taught this to high school trig students, then perhaps some of the kids would see that their negative preconceptions of the subject are not unjustified. (That is, trig doesn’t always make sense!)
Then again, it might show some of them that maths can be exciting and deliciously contentious.
Excellent article!
7 May 2011 at 10:31 am [Comment permalink]
That’s really interesting, Valery – thanks for sharing!
It’s interesting because:
(1) It is a Mathcad file that is displayed in a browser, and
(2) Yes, many functions demonstrate interesting shapes in polar coordinates.
21 Aug 2011 at 9:41 pm [Comment permalink]
MathCad is right. The other software makers are at fault for not checking it thorough. This issue of detail is one where even an “A” student may overlook.
Maybe the very best graduates end up working for the big banks and big bucks. The math software companies don’t agree because they only got the second layer of the top tier graduates to work for them. MathCad was careful (we need to teach work ethic and values), or maybe just lucky.
;-P
29 Nov 2011 at 7:12 pm [Comment permalink]
I found that:
Mathcad 13 works with Interpretation 1
but Mathcad 15 with Interpretation 2 !!
It’s a pity !
29 Nov 2011 at 9:38 pm [Comment permalink]
@Richard – thanks for the information. Seems like their engineers are unsure, too!
14 Dec 2011 at 10:16 pm [Comment permalink]
(1) You should always use cot^{-1}(x), following the general notation for functions. This is different from cot(x)^{-1}, of course. Nobody really knows the meaning of arcus sinus etc. anymore.
(2) It is a matter of definition, or rather does not matter at all, what interval we take. If I implemented that, I’d follow your advice to define it on [0,pi], since it is easier. There is no other reason.
(3) If we argue from the geometrical point of view, cot(x) cannot be negative at all. It is the length of one of the segments of the tangent at the point (cos x, sin x). The other is tan(x). By the way, the tangent line intersects the y-axis in cosec(x), and the x-axis in sec(x). In triangle geometry, we wish to avoid negative lengths.
16 Dec 2011 at 5:01 pm [Comment permalink]
@Rene: No, cot^(-1)(x) is one of the worst notations ever, because of the confusion with reciprocal notation. See the last section on this page:
Trig Functions of Any Angle
I like your point about avoiding negative lengths, though.
10 May 2012 at 9:01 am [Comment permalink]
Good discussion, and as someone noted, arccot(x) is not the inverse of cot(x). When we discuss the arccot(x) function as the inverse of another function, we must declare the restricted domain of that function (as we must do with all of the other inverse trigonometric functions).
For option 1, arccot(x) is the inverse of the function cot(x) where x is between 0 and pi.
For option 2, arccot(x) is the inverse of the function cot(x) where x is between -pi/2 and pi/2 (including pi/2, but not -pi/2) and not zero.
Therefore, both interpretations are correct when stated correctly.
Due to the modern calculator (which does not have an arccot(x) function), I prefer the second interpretation because this allows us to easily use a calculator and the identity: arccot(x) = arctan(1/x). This does require one special case when x = 0: arccot(0) = pi/2.
One more thing. You said that one problem with the second interpretation is that the domain does not include x = 0. That is not correct. What the graphs do not show is that the left branch (below the x-axis) has an open circle on the y-axis and the right branch (above the x-axis) has a closed circle on the y-axis. Therefore, the domain of arccot(x) in either case is still all real numbers.
Thanks for your discussion. This is always a confusing issue for students.
12 May 2012 at 8:14 pm [Comment permalink]
Thanks for your clarifications, Ron.