Show that $\int_{0}^x \dfrac{1}{1+t^2}dt+\int_{0}^{1/x} \dfrac{1}{1+t^2}dt$ does not depend on $x$ 
Show that $\displaystyle \int_{0}^x \dfrac{1}{1+t^2}dt+\int_{0}^{1/x} \dfrac{1}{1+t^2}dt$ does not depend on $x$.

Attempt:
We have that $\displaystyle \int_{0}^x \dfrac{1}{1+t^2}dt+\int_{0}^{1/x} \dfrac{1}{1+t^2}dt = \tan^{-1}{x}+\tan^{-1}{\dfrac{1}{x}}$, which does depend $x$, so I am confused.
 A: One may differentiate, obtaining, for $x\neq0$,
$$
\left(\int_{0}^x \dfrac{1}{1+t^2}dt\right)'+\left(\int_{0}^{1/x} \dfrac{1}{1+t^2}dt\right)'=\dfrac{1}{1+x^2}-\frac1{x^2}\cdot \dfrac{1}{1+1/x^2}=0.
$$ Then integrating respectively over $(-\infty,0)$ and $(0,+\infty)$gives that $f$ is constant on each set. Then put $x=-1$ and $x=1$ respectively to find the constants.
A: If $x>0$, $$\int_0^{\frac1x}\,\frac{1}{1+t^2}\,\text{d}t=\int_x^\infty\,\frac{1}{1+u^{-2}}\,\frac{\text{d}u}{u^2}\,,$$ where $u:=\frac{1}{t}$.  That is, $$\int_0^{x}\,\frac{1}{1+t^2}\,\text{d}t+\int_0^{\frac{1}{x}}\,\frac{1}{1+t^2}\,\text{d}t=\int_0^\infty\,\frac{1}{1+t^2}\,\text{d}t$$ which is constant (known to be $\frac{\pi}{2}$).
If $x<0$, then the sum of the integrals is calculated similarly and equal to $-\frac{\pi}{2}$.  That is, for $x\neq 0$,
$$\int_0^{x}\,\frac{1}{1+t^2}\,\text{d}t+\int_0^{\frac{1}{x}}\,\frac{1}{1+t^2}\,\text{d}t=\frac{\pi}{2}\,\text{sign}(x)=\frac{\pi}{2}\,\frac{x}{|x|}\,.$$
It does somewhat depend on $x$.
A: Since
$$(\arctan x)'=\left(-\arctan\frac1x\right)'\implies \arctan x=-\arctan\frac1x+C$$
Taking for example $\;x=1\;$ you get that for $\;x>0\;$ we have that the constant equals:
$$\arctan x+\arctan\frac1x=\frac\pi2$$
so that it doesn't actually depend on $\;x\;$ .
A: Hint: Try taking the derivative in terms of $x$, and recall that the derivative of a constant is $0$.
A: Hint: the derivative of $\int_0^x{1\over{1+t^2}}dt+\int_0^{1/x}{1\over{1+t^2}}dt$ is ${1\over{1+x^2}}+{1\over{1+(1/x^2)}}(-{1\over x^2})=0$
Remark that it is constant on $(-\infty,0)$ where it takes the value $-\pi/2$ since $Artan(-1)$ is $-\pi/4$ and on $(0,\infty)$ where it takes the value $\pi/2$ since $Arctan(1)=\pi/4$.
A: So many answers here to choose from.  Here is a slightly different approach.
Here you are:
$\tan^{-1} x + \tan^{-1} \frac{1}{x} + C\\
x = \tan y, -\frac{pi}{2}<y<\frac{pi}{2}\\
\tan^{-1} (\tan y) + \tan^{-1} (\frac{1}{\tan y}) + C\\
y + \tan^{-1} (\cot y) + C\\
y + \tan^{-1} (\tan (\frac{\pi}{2}- y) + C\\
\frac{\pi}{2} + C$
Actually,if $x<0,$ and hence $y<0$ then $\frac{\pi}{2} - y > \frac{\pi}{2}$ and $\tan^{-1} (\tan (\frac{\pi}{2} - y)) = -\frac{\pi}{2} - y$
hence  $\tan^{-1} x + \tan^{-1} \frac{1}{x} =-\frac{\pi}{2},\frac{\pi}{2}$ depending on the sign of $x$.
