Evaluation of $\int_{\frac{1}{e}}^{\tan x}\frac{t}{1+t^2}dt+\int_{\frac{1}{e}}^{\cot x}\frac{1}{t(1+t^2)}dt$ 
$$\int_{\frac{1}{e}}^{\tan x}\frac{t}{1+t^2}dt+\int_{\frac{1}{e}}^{\cot x}\frac{1}{t(1+t^2)}dt$$

$\bf{My\; Try::}$ Let $$f(x) = \int_{\frac{1}{e}}^{\tan x}\frac{t}{1+t^2}dt+\int_{\frac{1}{e}}^{\cot x}\frac{1}{t(1+t^2)}dt$$
Put $\displaystyle x = \frac{1}{u},$ Then $\displaystyle dx = -\frac{1}{u^2}du$ and changing limits, We get
$$f(x) = \int_{\frac{1}{e}}^{\tan x}\frac{t}{1+t^2}dt+\int_{\tan x}^{e}\frac{1}{u(1+u^2)}du$$
So $$f(x) = \int_{\frac{1}{e}}^{\tan x}\frac{t}{1+t^2}dt+\int_{\tan x}^{e}\frac{t}{1+t^2}dt = \frac{1}{2}\int_{\frac{1}{e}}^{e}\frac{2t}{1+t^2}dt$$
So $$f(x) = \frac{1}{2}\ln (1+t^2)|_{\frac{1}{e}}^{e} = \ln(e) = 1$$
My question is how can we solve it in some shorter way, Help required, Thanks
 A: Just differentiate the $f(x)$ wrt $x$, you will se that $f'(x)=0$ which means $f(x)=constant=p$. SO you can find $p$ by just putting $x=\frac{\pi}{4}$. So 
$$p=\int_{\frac{1}{e}}^{1} \frac{tdt}{t^2+1}+\int_{\frac{1}{e}}^{1} \frac{dt}{t(t^2+1)}=\int_{\frac{1}{e}}^{1}\frac{dt}{t}=0-(-1)=1$$
SO $f(x)=1$ which is the final answer
Hope this will be helpful !
A: We have $$\int_{1/e}^{\tan\left(x\right)}\frac{t}{1+t^{2}}dt=\frac{1}{2}\int_{1/e}^{\tan\left(x\right)}\frac{2t}{1+t^{2}}dt
 $$ $$=\frac{1}{2}\log\left(1+\tan^{2}\left(x\right)\right)-\frac{1}{2}\log\left(1+\frac{1}{e^{2}}\right)
 $$ and $$\int_{1/e}^{\cot\left(x\right)}\frac{1}{t\left(1+t^{2}\right)}dt=\int_{1/e}^{\cot\left(x\right)}\frac{1}{t}dt-\int_{1/e}^{\cot\left(x\right)}\frac{t}{1+t^{2}}dt
 $$ $$=\log\left(\cot\left(x\right)\right)+1-\frac{1}{2}\log\left(1+\cot^{2}\left(x\right)\right)+\frac{1}{2}\log\left(1+\frac{1}{e^{2}}\right)$$ so $$\int_{1/e}^{\tan\left(x\right)}\frac{t}{1+t^{2}}dt+\int_{1/e}^{\cot\left(x\right)}\frac{1}{t\left(1+t^{2}\right)}dt$$ $$=1+\frac{1}{2}\log\left(1+\tan^{2}\left(x\right)\right)-\log\left(\tan\left(x\right)\right)-\frac{1}{2}\log\left(1+\cot^{2}\left(x\right)\right)=\color{red}{1}$$ assuming $0<\tan(x)<\infty.$
A: your change of variable is wrong.
$$\int\frac{1}{t(1+t^{2})}dt=\int\frac{1}{t^{3}\left(1+\frac{1}{t^{2}}\right)}dt
$$
and now we use the change of variable $u=\frac{1}{t^{2}} $ => $du=-\frac{dt}{t^{3}}$,then the integral take the form:
$$-\int\frac{1}{1+u}du=-\ln(1+u)=\ln\left(\frac{1}{1+u}\right)$$
