Deriving expansions of upper incomplete gamma functions $\Gamma (-n,z)$ I want to derive 8.4.15, expansions of upper incomplete gamma functions.
This question is related with this post.
By using the recurrence relation:
$$ \Gamma(s+1,z)=s\Gamma(s,z)+z^s e^{-z}, $$
I've derived
$$ \Gamma (-n,z)=\frac{(-1)^n}{n!}\left(E_1(z)-e^{-z}\sum_{k=0}^{n-1}\frac{(-1)^kk!}{z^{k+1}} \right). $$ 
But I haven't made it in deriving
$$ \Gamma (-n,z)=\frac{(-1)^n}{n!}(\psi(n+1)-\log z )-z^{-n}\sum_{k=0,\,k\ne n}^{\infty}\frac{(-z)^k}{k!(k-n)}. $$
I tried  using
\begin{alignat}{2}
\gamma(-n,z) &=&& \int_0^z dt\,e^{-t}t^{-n-1}=\sum_{k=0}^{\infty}\frac{1}{k!}(-1)^k\int_0^z dt\,t^{k-n-1} \\ 
&=&& \sum_{k=0,\,k\ne n}^{\infty}\frac{1}{k!}(-1)^k\frac{1}{k-n}z^{k-n}+\frac{1}{n!}(-1)^n\int_0^z dt\,\frac{1}{t}, 
\end{alignat}
$$ \Gamma (0,z)=-\gamma-\log z-\sum_{k=1}^{\infty}\frac{(-z)^k}{k!k}, $$
$$ \psi(n+1)=-\gamma+\sum_{m=1}^{n}\frac{1}{m}, $$
but didn't succeed.
Since $\Gamma(-n,z)+\gamma(-n,z)=\Gamma(-n)$, does it hold that
$$ \lim_{a\to n}\left( \Gamma(-a)-\frac{1}{a!}(-1)^a\int_0^z dt\,t^{a-n-1} \right)=\frac{(-1)^n}{n!}(\psi(n+1)-\log z ) \quad ? $$
How should I do?
Thanks.
 A: Because $e^{-t}/t^{-n-1}$ is more singular than $t^{-1}$ at $t=0$, the manipulations you have tried don't actually make sense: the integral form of $\gamma(\alpha,z)$ cannot be used when $\Re(\alpha)\leq 0$. For similar reasons, the function inside the limit doesn't make sense.

We can instead use a hybrid of a series expansion of the regular part for small $z$, and an expansion of the form you have derived, to arrive at the result you want. Start by splitting the integral as
$$ \begin{align}
\Gamma(-n,z) &= \int_z^{\infty} t^{-n-1}e^{-t} \, dt \\
&= \int_1^{\infty} t^{-n-1}e^{-t} \, dt + \int_z^1 t^{-n-1}e^{-t} \, dt.
\end{align} $$
The first is a constant we can find later. The second we can series expand:
$$ \begin{align}
\int_z^1 t^{-n-1}e^{-t} \, dt &= \int_z^1 \sum_{k=0,k\neq n}^{\infty} \frac{(-1)^k}{k!} t^{k-n-1} \, dt + \frac{(-1)^n}{n!} \int_z^1 \frac{dt}{t} \\
&= \sum_{k=0,k\neq n}^{\infty} \frac{(-1)^k}{k!}\int_z^1  t^{k-n-1} \, dt - \frac{(-1)^n}{n!} \log{z} \\
&= \sum_{k=0,k\neq n}^{\infty} \frac{(-1)^k}{k!(k-n)} (1-z^{k-n}) - \frac{(-1)^n}{n!} \log{z},
\end{align} $$
which gives us everything but the constant term, which currently looks like
$$ \int_1^{\infty} t^{-n-1}e^{-t} \, dt + \sum_{k=0,k\neq n}^{\infty} \frac{(-1)^k}{k!(k-n)}. $$
Now we cheat, and use the result you successfully derived: calculating the constant term in that, it must have the same value as the constant in the expansion I have derived. The exponential integral expands as $E_1(z) = -\gamma-\log{z}+O(z)$, and as far as the constants arising from the sum go, the coefficient of $z^{k+1}$ in $e^{-z}$ is $(-1)^{k+1}/(k+1)!$, so the constant is
$$ \frac{(-1)^n}{n!} \left( -\gamma + \sum_{k=0}^{n-1} \frac{1}{k+1} \right) = \frac{(-1)^n}{n!} \psi(n+1), $$
which is the last term from the expression you require.
