Let
# z=lnx=>x=e^z#
# x=a->z=lna and x=1/a->z=-lna#
#and dz==(dx)/x#
#I=int_(1/a)^a(tan^-1x)/xdx#
#color(red)("Replacing "a" by "lna , 1/a" by "-lna,x" by "e^z and {dx}/x" by "dz)#
#I=int_(-lna)^(lna)tan^-1(e^z)dz#
#=int_(-lna)^0tan^-1e^zdz+int_0^(lna)tan^-1e^zdz#
#=int_0^(lna)tan^-1e^-zdz+int_0^(lna)tan^-1e^zdz#
#=int_0^(lna)(cot^-1e^z+tan^-1e^z)dz#
#color(blue)("Applying formula " tan^-1x+cot^-1x=pi/2)#
#=int_0^(lna)(pi/2)dz#
#=pi/2lna#