y=arctan1xy = \arctan\dfrac{1}{x}

Graph of the Function y=arctan1xy = \arctan\dfrac{1}{x}

y=arctan1xy = \arctan\dfrac{1}{x} is the inverse tangent applied to a reciprocal. Its values stay between π2-\dfrac{\pi}{2} and π2\dfrac{\pi}{2}, and yet it jumps by π\pi at the origin, which makes for unusually instructive behavior.

Domain and range

The domain is x0x \neq 0. Since 1x\dfrac{1}{x} is never 00, neither is arctan1x\arctan\dfrac{1}{x}, so the branch with x>0x > 0 lies in (0,π2)\left( 0, \dfrac{\pi}{2} \right) and the branch with x<0x < 0 in (π2,0)\left( -\dfrac{\pi}{2}, 0 \right).

The jump at the origin

Approach1x\dfrac{1}{x}yy
x0+x \to 0^{+}+\to +\inftyπ2\to \dfrac{\pi}{2}
x0x \to 0^{-}\to -\inftyπ2\to -\dfrac{\pi}{2}

Both one-sided limits exist but differ, so this is a jump discontinuity, of size exactly π\pi. No value assigned at x=0x = 0 could make the function continuous.

Because the values stay bounded, the yy-axis is not a vertical asymptote. The difference between a discontinuity where the function blows up and one where it merely jumps is plain to see here1.

Symmetry and asymptote

From f(x)=f(x)f(-x) = -f(x) the function is odd, with rotational symmetry about the origin. As x±x \to \pm\infty we have 1x0\dfrac{1}{x} \to 0 and so y0y \to 0, making the xx-axis a horizontal asymptote, approached from above on the right and from below on the left.

Monotonicity

The chain rule gives a derivative that simplifies neatly.

y=11+(1x)2(1x2)=11+x2\begin{align*} y' &= \frac{1}{1 + \left(\dfrac{1}{x}\right)^2} \cdot \left(-\frac{1}{x^2}\right) \\ &= -\frac{1}{1 + x^2} \end{align*}

The simplified right-hand side accepts x=0x = 0 and takes the value 1-1 there. The function itself jumps, yet the formula for its derivative appears to run smoothly across the origin. Both branches approach the origin with slope 1-1 and are simply offset from each other by π\pi.

Relation to the inverse tangent

Because this derivative is the exact negative of 11+x2\dfrac{1}{1+x^2}, the derivative of arctanx\arctan x, the sum arctanx+arctan1x\arctan x + \arctan\dfrac{1}{x} is constant on each branch. Evaluating at one point on each gives the following.

arctanx+arctan1x={π2(x>0)π2(x<0)\arctan x + \arctan\frac{1}{x} = \begin{cases} \dfrac{\pi}{2} & (x > 0) \\ -\dfrac{\pi}{2} & (x < 0) \end{cases}

This graph is therefore the continuous curve arctanx\arctan x turned upside down and shifted up by π2\dfrac{\pi}{2} on the right and down by π2\dfrac{\pi}{2} on the left. The two shifts differ by π\pi, and that difference is precisely the jump at the origin.

Concavity

The second derivative is y=2x(1+x2)2y'' = \dfrac{2x}{(1+x^2)^2}, positive for x>0x > 0 and negative for x<0x < 0, so the right branch is concave up and the left branch concave down. The sign changes at x=0x = 0, which lies outside the domain, so there is no inflection point.

Two conventions for the inverse cotangent

There are two competing definitions of arccot\operatorname{arccot}.

ConventionFormulaRangeContinuity
Principal value in (0,π)(0, \pi)π2arctanx\dfrac{\pi}{2} - \arctan x(0,π)(0, \pi)continuous on the whole line
Through the reciprocalarctan1x\arctan\dfrac{1}{x}(π2,π2)\left( -\dfrac{\pi}{2}, \dfrac{\pi}{2} \right) without 00jumps at the origin

The second is this graph. It differs from the first by π\pi for x<0x < 0, so it is always worth checking which convention a textbook or a computer algebra system has adopted.

Applications

When a program recovers an angle from coordinates, using arctanyx\arctan\dfrac{y}{x} alone cannot distinguish the first quadrant from the third, or the second from the fourth. That is why most languages provide a separate two-argument function, atan2, which avoids this discontinuity and returns the full range (π,π](-\pi, \pi]2. This graph makes the need for it visible at a glance.

  1. Classification of discontinuities, Wikipedia
  2. atan2, Wikipedia