I am calculating the power series approximation of $f\left( x \right)$ at $x = \infty$.
With my $f\left( x \right) = 2{\left( {\sqrt {\frac{1}{x}} } \right)^M}{K_M}\left( {2\sqrt {\frac{1}{x}} } \right)$
Where ${K_M}\left( x \right)$ is the modified Bessel function of the second kind of order $M$ (cf. http://dlmf.nist.gov/10.32.E9). In my application, M is a positive integer.
However, the received answer seem to be strange and I do not know if it correct or not ?
Because for any positive integer $M$ then $\Gamma \left( { - M} \right)$ would result in a Complex Infinity.
However, when I plug in the actual value $M=2,4$. I receive a neat approximation that suit my application. Therefore, I hope to be able to derive a generalized answer like this for any $M$ (even or odd).
Please help me with this !
Thank you !


In the output line, it starts with $x^{\color{red}{-}M}$ so, who cares since $M>0$ and $x\to \infty$.
So, just use $$\Gamma (M)\left(1-\frac{1}{(M-1) x}+\frac{1}{2 (M-2) (M-1) x^2}+O\left(\frac{1}{x^3}\right)\right)$$
Edit
The case $M=1$ is totally different. The result should be $$1-\frac{\log (x)-2 \gamma +1}{x}-\frac{2 \log (x)-4 \gamma +5}{4 x^2}+O\left(\frac{1}{x^3}\right)$$