According to MathWorld, the exponential integral $\operatorname{Ei}(x)=\int^x_{-\infty} \frac{e^t}{t}dt$ can be written as follows:
$$\int^x_{-\infty} \frac{e^t}tdt=\gamma+\ln x+\sum^\infty_{n=1}\frac{x^n}{n\cdot n!}$$
Where $\gamma$ is the Euler-Mascheroni constant.
However, I am curious to know how exactly this was derived.
I was able to show that the derivative of both sides w.r.t. $x$ are the same:
$$\frac d{dx}\int^x_{-\infty} \frac{e^t}{t}dt=\frac d{dx}\left[\gamma+\ln x+\sum^\infty_{n=1}\frac{x^n}{n\cdot n!}\right]$$
$$\frac{e^x}x=\frac d{dx}[\gamma]+\frac d{dx}[\ln x]+\sum^\infty_{n=1}\frac d{dx}\left[\frac{x^n}{n\cdot n!}\right]$$
$$\frac{e^x}x=\frac1x+\sum^\infty_{n=1}\frac{nx^{n-1}}{n\cdot n!}$$
$$\frac{e^x}x=\frac1x+\sum^\infty_{n=1}\frac{x^{n-1}}{n!}$$
$$e^x=1+\sum^\infty_{n=1}\frac{x^n}{n!}$$
$$e^x=\sum^\infty_{n=0}\frac{x^n}{n!}$$
Which we know is true by the Maclaurin expansion of $e^x$. However, this only shows that $\int^x_{-\infty} \frac{e^t}tdt$ and $\gamma+\ln x+\sum^\infty_{n=1}\frac{x^n}{n\cdot n!}$ differ by a constant.