Why is $\tan^{-1}(\infty)$ here equal to $\dfrac{\pi}{2}$? In the question below in the last step of the solution, they seem to be claiming that $\displaystyle \lim_{n \to \infty+}\tan^{-1} \left (\dfrac{n+1}{d} \right) = \dfrac{\pi}{2}$, which I agree with but what about $\dfrac{5\pi}{2}$ etc.? How can they say it must be $\dfrac{\pi}{2}$?
Also if they aren't claiming what I said above it seems that they are claiming that $\displaystyle \lim_{n \to \infty+}\left[ \tan^{-1} \left (\dfrac{n+1}{d} \right)+\tan^{-1} \dfrac{n}{d}\right] = \pi $, which isn't necessarily true.
Problem and solution

 A: As it has been pointed out in the comments, the inverse tangent function is defined with the co-domain $\left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$ . 
Since $g(x)=\arctan x$ is an inverse function, it must be the inverse of a bijection, and it should also be a bijection itself. But as we know that the function $f(x)=\tan x$ is not a  bijection over the real numbers, we need to choose a domain in which it looks like a bijection and takes all real values. For choosing such a set there infinitely many possibilities but the set $\left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)$ just happens to be the most convinient and internationally accepted one. 
A: it is small because the individual angles considered are arctangents from lines with positive slopes: the angle between the positive $x$ axis and a line of positive slope $m$ is $\arctan m$ which is between $0$ and $\pi / 2.$ 
You should have emphasized an earlier line
$$ \arctan \left( \frac{i+1}{d} \right) -  \arctan \left(  \frac{i-1}{d} \right) = \arctan \left( \frac{2d}{i^2 + d^2 - 1} \right) \approx  \frac{2d}{i^2 + d^2 - 1} $$ which becomes very small.
A: The inverse tangent function can be extended to the extended real line $\overline{\mathbb{R}} = \mathbb{R} \cup \{-\infty,\infty\}$, so
$$ \arctan \infty = \frac{\pi}{2}, \arctan(-\infty) = -\frac{\pi}{2}
$$
The definition here comes from the limiting behaviour
$$ \lim_{x \to \infty} \arctan x = \frac{\pi}{2}
$$
