I have the following limit
$$ \lim_{x \to \infty} \frac{{\rm d}}{{\rm d}x} \left( \sum_{k=0}^x \frac{1}{k} \right) $$
Since I am taking the limit only after I take the derivative of this series, I get
$$ \lim_{x \to \infty} \frac{{\rm d}}{{\rm d}x} \left( 1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{x} \right) = \lim_{x \to \infty} \left(- \frac{1}{x^2} \right) = 0^- $$
Even though we are taking the limit to infinity after the derivative, if I were to put it before, the series would diverge and then it would be completely different. Is anything wrong with what I did?
I ask this because I'm not entirely sure if I can interchange the limit and the derivative at will, but from this example I clearly cannot.
EDIT:
$$ \lim_{x \to \infty } \left( \frac{\ln(x)}{\Gamma(x+1)} \right) = ? $$
EDIT
. – Rodrigo de Azevedo Apr 10 '22 at 11:46