Misconception in applying Leibniz' rule

164 Views Asked by At

One can show using Leibniz' rule that $$\int_0^1 \frac{x^n-1}{\ln x} dx = \ln|n+1|.$$ To be specific, if we set $g(n) := \int_0^1 \frac{x^n-1}{\ln x} dx$, then \begin{align} g'(n) &= \frac d{dn} \int_0^1 \frac{x^n-1}{\ln x} dx \\ &= \int_0^1 \frac{\partial}{\partial n} \frac{x^n-1}{\ln x} \, dx \\ &= \int_0^1 \frac{x^n \ln x}{\ln x} \, dx \\ &= \int_0^1x^n \, dx \\ &= \frac 1{n+1}, \end{align} Upon integrating in $n$, we conclude that $$ g(n) = \ln |n+1|+C. $$ But we notice that $g(0)=0$, which implies that $C=0$. Hence, $$ g(n)=\ln|n+1|. $$

Question. If $g_a(n) := \int_0^1 \frac{x^n-a}{\ln x} \, dx$ for $a \not= 1$, then it seems like using Leibniz' rule would also give us $g_a(n) = \ln|n+1|$. But it cannot be, because $g_a(n)$ is a divergent integral. So the same justification using Leibniz' rule must not work for $f_a(n)$ somehow. But I'm not sure how. The hypothesis for Leiniz' rule is that $\frac{x^n-a}{\ln x}$ and $\frac{\partial}{\partial x} \frac{x^n-a}{\ln x}$ both be continuous over $(0,1)$, which they are.