{"id":6009,"date":"2011-05-03T09:29:35","date_gmt":"2011-05-03T01:29:35","guid":{"rendered":"http:\/\/www.intmath.com\/blog\/?p=6009"},"modified":"2016-09-19T11:13:31","modified_gmt":"2016-09-19T03:13:31","slug":"which-is-the-correct-graph-of-arccot-x","status":"publish","type":"post","link":"https:\/\/www.intmath.com\/blog\/mathematics\/which-is-the-correct-graph-of-arccot-x-6009","title":{"rendered":"Which is the correct graph of arccot <em>x<\/em>?"},"content":{"rendered":"<p>A reader challenged me on the graph I had for <span class=\"intmath\"><em>y<\/em> = arccot <em>x<\/em>,<\/span> on the page <a href=\"https:\/\/www.intmath.com\/analytic-trigonometry\/7-inverse-trigo-functions.php\">Inverse Trigonometric Functions<\/a>. <\/p>\n<p>He wrote (in a rather unfriendly tone):<\/p>\n<blockquote>\n<p>Compare:<\/p>\n<p>   <a href=\"https:\/\/en.wikipedia.org\/wiki\/Inverse_trigonometric_functions\" target=\"_blank\">https:\/\/en.wikipedia.org\/wiki\/Inverse_trigonometric_functions<\/a><\/p>\n<p>    <a href=\"https:\/\/www.intmath.com\/analytic-trigonometry\/7-inverse-trigo-functions.php\" target=\"_blank\">https:\/\/www.intmath.com\/analytic-trigonometry\/7-inverse-trigo-functions.php<\/a><\/p>\n<p>  You incorrectly state the range of the arccotangent function as -pi\/2 to pi\/2. &nbsp;It is not. &nbsp;The correct range of arccotangent is 0 to pi. <\/p>\n<\/blockquote>\n<p>After some deliberation, I have now included both interpretations on my page, because both are found in various sources.<\/p>\n<p>First, some background.<\/p>\n<h2>Obtaining the graph of <em>y<\/em> = arccot(<em>x<\/em>) <\/h2>\n<p>The graph of   <span class=\"intmath\"><em>y<\/em> = arccot <em>x<\/em><\/span> can be obtained from a consideration of the graph of <span class=\"intmath\"><em>y<\/em> = cot <em>x<\/em>.<\/span> <\/p>\n<p>But depending on your starting region, you'll get a different graph for <span class=\"intmath\"><em>y<\/em> = arccot <em>x<\/em>.<\/span><\/p>\n<h2>Interpretation 1<\/h2>\n<p>The graph of <span class=\"intmath\"><em>y<\/em> = cot <em>x<\/em><\/span> is as follows:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/cotx.gif\" alt=\"cot x\" width=\"375\" height=\"245\" \/><\/p>\n<p>We choose the portion from <span class=\"intmath\"><em>x<\/em> = 0<\/span> to <span class=\"intmath\"><em>x<\/em> = &pi;<\/span> (as highlighted above), and reflect it in the line <span class=\"intmath\"><em>y = x<\/em><\/span> like this.<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccot-x-reflect.png\" alt=\"cot x\" width=\"305\" height=\"233\" \/><\/p>\n<p>Since reflection in the line <span class=\"intmath\"><em>y = x<\/em><\/span> gives us the inverse of a function, we have obtained the graph of <span class=\"intmath\"><em>y<\/em> = arccot <em>x<\/em><\/span>, as follows:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccotx.gif\" alt=\"arccot x\" width=\"374\" height=\"251\" \/><\/p>\n<p>From the graph we can see the <strong>domain<\/strong> (the possible <em>x<\/em>-values) of <span class=\"intmath\"><em>y<\/em> = arccot <em>x<\/em><\/span> is: <\/p>\n<p class=\"indent\">All values of <em>x<\/em><\/p>\n<p>And the  <strong>range<\/strong> (resulting <em>y-<\/em>values) of arccot <em>x <\/em>is: <\/p>\n<p class=\"indent\"><span class=\"intmath\">0 &lt; arccot <em>x<\/em> &lt; &pi; <\/span><\/p>\n<p>If we evaluate our function for some negative value of <em>x<\/em>, say <em>x<\/em> = &minus;2, then we get a positive answer, as expected from the graph:<\/p>\n<p class=\"indent\"><span class=\"intmath\">arccot(&minus;2) = 2.678...<\/span> <\/p>\n<div class=\"imgCenter\"><!-- Blog in-text responsive --><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-6416265058787437\" data-ad-slot=\"6178764223\" data-ad-format=\"auto\"><\/ins><\/div>\n<h2>Alternate View - Interpretation 2 <\/h2>\n<p>Some math textbooks (and some respected math software, e.g. <em>Mathematica<\/em>) regard the following as the region of <span class=\"intmath\"><em>y<\/em> = cot <em>x<\/em><\/span> that should be used (that is, <span class=\"intmath\">&minus;&pi;\/2<\/span> to <span class=\"intmath\">&pi;\/2<\/span>): <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/cotx_2.gif\" alt=\"cot x\" width=\"375\" height=\"245\" \/><\/p>\n<p>This would give the following discontinuous graph when reflected in the line <span class=\"intmath\"><em>y = x<\/em><\/span>:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccotx_2.gif\" alt=\"arccot x\" width=\"420\" height=\"290\" \/><\/p>\n<p>So the <strong>domain<\/strong> of <span class=\"intmath\">arccot <em>x<\/em><\/span> would be (as for Interpretation 1): <\/p>\n<p class=\"indent\">All values of <em>x<\/em>  <\/p>\n<p>Using this interpretation, the <strong>range<\/strong> of arccot <em>x<\/em> would be:<\/p>\n<p class=\"indent\"><span class=\"intmath\">&minus;&pi;\/2 &lt; arccot <em>x<\/em> &le; &pi;\/2 <\/span>(<span class=\"intmath\">arccot <em>x<\/em> &ne; 0<\/span>) <\/p>\n<p>If this is the correct graph, we expect a negative answer when we evaluate the function at <em>x<\/em> = &minus;2. It is actually:<\/p>\n<p class=\"indent\"><span class=\"intmath\">arccot(&minus;2) = &minus;0.46365...<\/span><\/p>\n<h2>Which is correct?<\/h2>\n<p>According to  <a href=\"http:\/\/mathforum.org\/library\/drmath\/view\/60723.html\">a response to a reader's question<\/a> on this same issue, Dr. Math goes for the <strong>first<\/strong> interpretation:  <\/p>\n<blockquote>\n<p>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.<\/p>\n<p>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. <\/p>\n<p>The domain would then have to be<\/p>\n<p>   -pi\/2 < x < 0 or 0 < x <= pi\/2    <\/p>\n<p>To avoid this, we instead choose the domain<\/p>\n<p>  0 < x < pi<\/p>\n<p> which is cleaner to work with, making a continuous function defined     over the entire domain.<\/p>\n<\/blockquote>\n<h2>Math software doesn't agree, either<\/h2>\n<p>Let's now see the inconsistent way (respected) math software deals with this function.<\/p>\n<h2>Mathcad's Interpretation <\/h2>\n<p>When I graphed the function <span class=\"intmath\">acot(<em>x<\/em>)<\/span> in Mathcad, this is the result (they are using the <strong>first<\/strong> interpretation): <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccot-x-mathcad.png\" alt=\"arccot x\" width=\"385\" height=\"312\" \/><\/p>\n<p>Mathcad gives <span class=\"intmath\">arccot(&minus;2) = 2.678...,<\/span> which is consistent with their graph. Mathcad uses &quot;acot(<em>x<\/em>)&quot; notation. <\/p>\n<h2>Mathematica's Interpretation <\/h2>\n<p>However, <a href=\"http:\/\/www.wolframalpha.com\/input\/?i=y%3Darccot+x\">according to Mathematica<\/a> (using Wolfram|Alpha) , this is the graph of <span class=\"intmath\"><em>y<\/em> = arccot(<em>x<\/em>)<\/span>:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccot-x-wolfram.png\" alt=\"arccot x\" width=\"338\" height=\"292\" \/><\/p>\n<p>So Mathematica is using the <strong>second<\/strong> interpretation of the function. (They use the somewhat poor notation <span class=\"intmath\"><em>y<\/em> = cot<sup>&minus;1<\/sup><em>x<\/em>.<\/span>) <\/p>\n<p>Taking a typical value, Mathematica (Wolfram|Alpha) gives us<\/p>\n<p class=\"indent\"><span class=\"intmath\">arccot(&minus;2) = &minus;0.46365...<\/span> <\/p>\n<p>How can this be? The first interpretation gives us a positive value for arccot(&minus;2), while the second interpretation gives us a negative value.<\/p>\n<h2>Matlab's Interpretation <\/h2>\n<p>Matlab also gives us a discontinuous graph based on the <strong>second<\/strong> interpretation. <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccot-x-matlab.gif\" alt=\"arccot x\" width=\"371\" height=\"289\" \/> <\/p>\n<p>Matlab also uses &quot;<span class=\"intmath\">acot(<em>x<\/em>)&quot;<\/span> notation.  <\/p>\n<h2>Maple\/Scientific Notebook's Interpretation<\/h2>\n<p>My version of Scientific Notebook has both Maple and MuPAD engines. The results using both of these are curious.<\/p>\n<p>Using the Maple engine, we get an answer using the <strong>first<\/strong> interpretation. <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccot-x-scientific-notebook.png\" alt=\"arccot x\" width=\"363\" height=\"247\" \/> <\/p>\n<p>But when we switch to use MuPAD in Scientific Notebook, we get this result, which uses the <strong>second<\/strong> interpretation!<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccot-x-scientific-mupad.png\" alt=\"arccot x\" width=\"301\" height=\"220\" \/> <\/p>\n<p>So even the top math software makers can't agree.<\/p>\n<h2>Conclusion<\/h2>\n<p>Here's another case where our math definitions are not as tight as we are often led to believe.<\/p>\n<p>Also, the notation is inconsistent. Different text books and different software use the following to mean the same thing:<\/p>\n<ul>\n<li><span class=\"intmath\">arccot(<em>x<\/em>)<\/span><\/li>\n<li><span class=\"intmath\">acot(<em>x<\/em>)<\/span><\/li>\n<li><span class=\"intmath\">cot<sup>&minus;1<\/sup><em>x<\/em><\/span><\/li>\n<\/ul>\n<p>We should <strong>never<\/strong> use the last one! (See my rant on this here: <a href=\"https:\/\/www.intmath.com\/trigonometric-functions\/6-trigonometry-functions-any-angle.php#arcsin\">Arcsin or sin?<\/a>)<\/p>\n<p>So which version of arccos(<em>x<\/em>) is the right one?   Is my reader correct? (I don't know his name or email so I can't reply to him. Strange.)<\/p>\n<p>I know which interpretation I think is &quot;best&quot;. What are your thoughts?  <\/p>\n<p class=\"alt\">See the <a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/which-is-the-correct-graph-of-arccot-x-6009#comments\" id=\"comms\">40 Comments<\/a> below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/which-is-the-correct-graph-of-arccot-x-6009\"><img loading=\"lazy\" alt=\"Graph of arccot x?\" src=\"\/blog\/wp-content\/images\/2011\/04\/arccotx_th.png\" title=\"Graph of arccot x?\" width=\"128\" height=\"100\" class=\"imgRt\" \/><\/a>Math text books and math software disagree on the correct graph of arccot(<i>x<\/i>). Which one is right?<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":""},"categories":[4],"tags":[134,127],"_links":{"self":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/6009"}],"collection":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/comments?post=6009"}],"version-history":[{"count":0,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/6009\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/media?parent=6009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/categories?post=6009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/tags?post=6009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}