How would I integrate $\int_{-\infty}^{\infty} e^{-(x+\tan(x))^2} \mathrm{d}x$? Around a couple months ago, I found an interesting integral which I haven't been able to solve yet - it goes as follows:
$$\int_{-\infty}^{\infty} e^{-(x+\tan(x))^2} \mathrm{d}x = \sqrt\pi$$
I've attempted different techniques such as Feynman's technique, Laplace Transform, substitutions, integration by parts, and many more - yet none could crack it.
Further, verifying the result via Wolfram Alpha was unsuccessful.
 A: We want to find
$$\int_{-\infty}^{\infty} e^{-(x+\tan(x))^2} \mathrm{d}x$$
Now, consider the theorem stated below:

Let $\phi(z)$ be any meromorphic function over $\mathbb{C}$ which

*

*preserve the extended real line $\mathbb{R}^* = \mathbb{R} \cup \{ \infty \}$ in the sense:
$$\begin{cases}\phi(\mathbb{R}) \subset \mathbb{R}^*\\ \phi^{-1}(\mathbb{R}) \subset \mathbb{R}\end{cases}
\quad\implies\quad
P \stackrel{def}{=} \phi^{-1}(\infty) = \big\{\, p \in \mathbb{C} : p \text{ poles of }\phi(z)\,\big\} \subset \mathbb{R}
$$

*Split $\mathbb{R} \setminus P$ as a countable union of its connected components $\,\bigcup\limits_{n} ( a_n, b_n )\,$. Each connected component is an open interval $(a_n,b_n)$
and on such an interval, $\phi(z)$ increases from $-\infty$ at $a_n^{+} $ to $\infty$
at $b_n^{-}$.

*There exists an ascending chain of Jordan domains $D_1, D_2, \ldots$ that cover $\mathbb{C}$,
$$\{ 0 \} \subset D_1 \subset D_2 \subset \cdots
\quad\text{ with }\quad \bigcup_{k=1}^\infty D_k = \mathbb{C}
$$
whose boundaries $\partial D_k$ are "well behaved", "diverge" to infinity and $| z - \phi(z)|$ is bounded on the boundaries. More precisely, let
$$
\begin{cases}
R_k &\stackrel{def}{=}& \inf \big\{\, |z| : z \in \partial D_k \,\big\}\\
L_k &\stackrel{def}{=}& \int_{\partial D_k} |dz| < \infty\\
M_k &\stackrel{def}{=}& \sup \big\{\, |z - \phi(z)| : z \in \partial D_k \,\big\}
\end{cases}
\quad\text{ and }\quad
\begin{cases}
\lim\limits_{k\to\infty} R_k = \infty\\
\lim\limits_{k\to\infty} \frac{L_k}{R_k^2} = 0\\
M = \sup_k M_k < \infty
\end{cases}
$$


Given such a meromorphic function $\phi(z)$ and any Lebesgue integrable function $f(x)$ on $\mathbb{R}$, we have following identity: $$
\int_{-\infty}^\infty f(\phi(x)) dx = \int_{-\infty}^\infty f(x) dx $$

A proof of this theorem can be found here.
Taking $\phi(x) = x+\tan(x)$ and $f(x) = e^{-x^2}$, we can see that $$\int_{-\infty}^{\infty} e^{-(x+\tan(x))^2} \mathrm{d}x = \int_{-\infty}^{\infty} e^{-x^2} \mathrm{d}x = \sqrt\pi$$
The last integral is a standard Gaussian integral.
