I have this problem, I don't know why if I consider:
$k \geq 0$
$ I(k)= \int x e^{-k x}= - \dfrac{e^{-kx}(kx+1)}{k^2}$, with integration constant $c=0$.
If I put ${lim}_{k \to 0} I(k) {\to -\infty} $.
On the other hand, before doing the integral $I(0) \equiv \int x \equiv \dfrac{x^2}{2}$
You don't find the same situation in $I(k)=x^2 + k x$ .
Please could you tell me why the first integral diverges ?
There's some confusion about the calculations here, so I'm going to answer an analogous question. $I(r) =\int x^r =\frac{x^{r+1}}{r+1}$, except for $r=-1$; $I(-1)=\log(x)$. So the question arises why $I(r)$ does not tend to $I(-1)$ as $r\to-1$. After all, $x^r\to x^{-1}$ uniformly on compact sets.
One way to look at it is you're forgetting the "$+c$", or maybe better, you chose the $c$'s in the integrals in such a way as to make things discontinuous.
(Hint: Consider $x=1$.)
(Or one could put it this way: An antiderivative is actually an element of a quotient space consisting of functions modulo constants. We do have $I(r)\to I(-1)$ in that quotient space)
Or we could just note that the problem goes away if we consider definite integrals: If $$J_r(x)=\int_1^x t^r\,dt$$ then uniform convergence shows we can take the limit inside the integral; $J_r$ depends continuously on $r$.