How to do this question that talks about dependency of x Let $x > 0$. Prove that the value of the following expression doesn't  depend on x
$$\int_{0}^{x} \frac{1}{1+t^2} dt + \int_{0}^{\frac{1}{x}} \frac{1}{1+t^2}dt$$
Attempt:
Left: f'(x) = $\frac{1}{1+x^2}$
Right: f'(x) = $\frac{1}{1+(\frac{1}{x})^2} -\frac{1}{x^2}$
$= \frac{1}{(1+\frac{1}{x^2})} - \frac{1}{x^2}$
$=\frac{x^2}{1+x^2} - \frac{1}{x^2}$
$=\frac{x^4 - x^2 - 1}{1+x^2}$
Yeah I don't know what I am doing, I tried to remove the integral but failed miserably
 A: Note that $\int_0^x \frac{1}{1+t^2}\,dt=\arctan(x)$.  
Recalling $\bbox[5px,border:2px solid #C0A000]{\arctan(x)+\arctan(1/x)=\pi/2\text{sgn(x)}}\,\,$, we see that the term of interest depends only on the sign of $x$.

From the pre-edited question 
$$\arctan(x)=\arctan(1/x)\implies \arctan(x)=(\pi/4)\text{sgn}(x)\implies x=1\,\,\text{or}\,\,x=-1$$
A: To answer the question as-is after having been heavily edited, let for $x \gt 0\,$:
$$f(x) = \int_{0}^{x} \frac{1}{1+t^2} dt + \int_{0}^{\frac{1}{x}} \frac{1}{1+t^2}dt$$
Then, using the Leibniz integral rule:
$$
f'(x) = \frac{1}{1+x^2} \,-\, \frac{1}{x^2} \cdot \frac{1}{1+ \cfrac{1}{x^2}} = \frac{1}{1+x^2} \,-\, \frac{1}{1+x^2} \,=\, 0 
$$
Thus $f'(x)=0\,$, so $f(x)$ is a constant, and therefore does not depend on $x$.
P.S. Note to the OP:

Right: f'(x) = $\frac{1}{1+(\frac{1}{x})^2} -\frac{1}{x^2}$

This looks like you attempted to use Leibniz' rule, but misapplied it. The $-\,\frac{1}{x^2}$ derivative of the upper bound is multiplied with, not added to, the end value of the function being integrated.
A: Using the $u$ sub $t' = t^{-1}$, we see  $dt'= -(t')^2dt$ that
\begin{align}
\int^{\frac{1}{x}}_0\frac{1}{1+t^2}\ dt = -\int^x_\infty \frac{1}{1+(t')^{-2}} \frac{dt'}{(t')^2}= \int^\infty_x \frac{1}{1+(t')^2}\ dt' = \frac{\pi}{2} - \int^x_0\frac{1}{1+(t')^2}\ dt'. 
\end{align}
But we see that
\begin{align}
\frac{\pi}{2} - \int^x_0\frac{1}{1+(t')^2}\ dt'= \int^x_0\frac{1}{1+(t')^2}\ dt'
\end{align}
provided
\begin{align}
\int^x_0\frac{1}{1+(t')^2}\ dt' = \frac{\pi}{4}.
\end{align}
Thus, your claim is incorrect since equality holds only when $x=1$. 
A: In the second integral, let $t=1/u$ to get
$$\int_0^{1/x}\frac1{1+t^2}\ dt=\int_x^\infty\frac1{1+(1/u)^2}\frac{du}{u^2}=\int_x^\infty\frac1{1+u^2}\ du$$
Add it to the first integral to get
$$I=\int_0^\infty\frac1{1+t^2}\ dt=\frac\pi2$$
which does not depend on $x$.
