From the wikipedia page on Gaussian integral https://en.wikipedia.org/wiki/Gaussian_integral the following formula holds:
$$\int_{-\infty}^{\infty} e^{a x^4+b x^3+c x^2+d x+f}\,dx =\frac12 e^f \ \sum_{\begin{smallmatrix}n,m,p=0 \\ n+p=0 \mod 2\end{smallmatrix}}^{\infty} \ \frac{b^n}{n!} \frac{c^m}{m!} \frac{d^p}{p!} \frac{\Gamma \left (\frac{3n+2m+p+1}{4} \right)}{(-a)^{\frac{3n+2m+p+1}4}}.$$
Could anyone explains how to obtain this formula? And is there any formula for the following integrals: $$\int_{-\infty}^{\infty}x^r e^{a x^4+b x^3+c x^2+d x+f}\,dx$$ where $r$ is an integer?