1

I have been trying to solve $i!$ for some time now, but I need a nudge in the right direction. Of course, you can Google "i!" and be given the value $0.498015668 - 0.154949828 i$ but I want to figure out how we arrive at that. I will begin by sharing what I have tried.

I attempted to use the Gamma function first. Since I am looking for $i!$ I want to calculate $\Gamma(i+1)$. $$\Gamma(i+1)=\int_{0}^{\infty}t^{(i+1)-1}e^{-t}\;dt=\int_{0}^{\infty}t^ie^{-t}\;dt$$

I don't know how to solve the integral that I am left with. Mathematica is no help, as plugging in gives me the value I know from Google. I then plugged in the integral without bounds, but Mathematica spit out Gamma[1+i] which doesn't get me anywhere.

My next thought involved Euler's formula, as I thought maybe if I turned everything in terms of $e$ I would have a more approachable integral.

$$t^i=e^{\ln(t^i)}=e^{i\ln (t)}$$ $$\int_{0}^{\infty}e^{i\ln (t)}e^{-t}\;dt$$ I soon realized this did not help me at all. I also attempted using Euler's formula to rewrite in terms of $\sin$ and $\cos$ but once again could not obtain an integral I could work with.

I found this video by blackpenredpen, but he declares there is no closed form solution and just writes the approximated answer. The most relevant question I have found is this one, where it is stated that the value $0.498015668 - 0.154949828 i$ is computed numerically. Someone in the comments to that answer asks how it could be calculated numerically, and this is where my question is.

I understand a closed form solution to $\Gamma(i+1)$ does not exist, but I am seeking a method to compute it by hand.

  • 1
    With that many decimal places, it's gonna be a miserable job. An idea is to use $u=\ln(t)$ to get $\int_{-\infty}^\infty e^{(i+1)u-e^u} du$, assuming I didn't make any errors. This integral is surprisingly manageable, because the modulus of the integrand has an explicit antiderivative, so you can explicitly figure out a suitable interval for truncation. But then after that you still have to fuss with meshes with whatever your favorite numerical integration routine is. (No promises that this is the best way to do it, I am sure there are better algorithms for the Gamma function.) – Ian Oct 31 '24 at 22:30
  • Thanks, @Ian, this is a great starting point for me. I just wanted to know how I could possibly evaluate it, even if it will be miserable. – AllCatsAreGrey Oct 31 '24 at 22:36
  • In that case, I suppose the most instructive thing is to actually explain how the truncation works. The modulus of the integrand is $e^{u-e^u}$, which has an antiderivative of $-e^{-e^u}$. Now on the left, $e^{-e^u}=1-\varepsilon/3$ when $-e^u=\ln(1-\varepsilon/3)$ which is when $u=\ln(-\ln(1-\varepsilon/3))$. On the right, $e^{-e^u}=\varepsilon/3)$ when $-e^u=\ln(\varepsilon/3)$ which is when $u=\ln(\ln(3/\varepsilon))$. – Ian Oct 31 '24 at 22:40
  • (Cont.) So the error from truncating to $[\ln(-\ln(1-\varepsilon/3)),\ln(\ln(3/\varepsilon))]$ (given $0<\varepsilon<3$) is at most $2\varepsilon/3$, leaving you another $\varepsilon/3$ to spend on numerical integration error. This is not that huge; for $\varepsilon$ around $10^{-16}$ it is still only something like $[-50,50]$. – Ian Oct 31 '24 at 22:40
  • Make that more like $[-40,4]$. And the integrand isn't that nasty on that range, either. – Ian Oct 31 '24 at 22:48
  • I don't know how to compute $\Gamma(1+i)$ but $$|\Gamma(1+i)|^2 = \Gamma(1+i)\Gamma(1-i) = i\Gamma(i)\Gamma(1-i) = \frac{\pi i}{\sin(\pi i)} = \frac{\pi}{\sinh(\pi)}$$ not sure whether this will help or not. – achille hui Oct 31 '24 at 23:01
  • @achillehui That allows you to compute just the real or imaginary part and then do a little Pythagorean theorem problem to get the other. Though really the two parts don't seem to be appreciably different in their difficulty. – Ian Nov 01 '24 at 00:00

1 Answers1

2

By using the first 3 terms of Weierstrass Formula for the Gamma function at $z=1+i$

$\Gamma(z) = \frac{e^{-\gamma z}}{z} \prod_{n=1}^\infty \left(1+\frac{z}{n}\right)^{-1}e^{z/n}$

$ \Gamma(1+i) = \frac{e^{-\gamma(1+i)}}{1+i} \prod_{n=1}^3 \left(1+\frac{1+i}{n}\right)^{-1}e^{\frac{1+i}{n}} $

$ \prod_{n=1}^3 \left(1+\frac{1+i}{n}\right)^{-1} = \frac{6}{(2+i)(3+i)(4+i)} $ $ \prod_{n=1}^3 e^{\frac{1+i}{n}} = e^{(1+i)\frac{11}{6}} $ \ $ \Gamma(1+i) = \frac{6}{(1+i)(2+i)(3+i)(4+i)} e^{(1+i)\left(\frac{11}{6}-\gamma\right)} $

On Simplifying we get\

$ \Gamma(1+i) = \left(-\frac{3}{85} - \frac{12}{85}i\right) \exp\left((1+i)\left(\frac{11}{6}-\gamma\right)\right) $

$ \Gamma(1+i) \approx 0.433075 - 0.271306i \quad \text{and} \quad |\Gamma(1+i)| \approx 0.511039 $

use $|i!|=0.521564$

and our error percentage is just around 2% so our answer is pretty good considering we did it by hand

Nucleo
  • 660