I = \int_{\frac{1}{2}}^2 \frac{\ln t}{1+t^n} \ dt = \int_{\frac{1}{2}}^1 \frac{\ln t}{1+t^n} \ dt + \int_{1}^2 \frac{\ln t}{1+t^n} \ dt
= \int_{\frac{1}{2}}^1 \frac{\ln t}{1+t^n} \ dt - \int_{\frac{1}{2}}^1\frac{t^{n-2} \ln t}{1+t^n} \ dt = \int_{\frac{1}{2}}^1\frac{(1-t^{n-2}) \ln t}{1+t^n} \ dt
We have ln t<0 for 0<t<1
Also for n>2 1-t^{n-2}>0 in this range and for n≤2 1-t^{n-2}<0
Thus we see that the integral is negative for n>2 and +ve for n≤2