Finding improper integral (depending on a parameter) I have the following improper integral:
$$
   \int \limits_0^{\infty} x^{2n}e^{-x^2}\cos(2yx)dx, n \in \mathbb{N}
$$

I want to find function of $n$ and $y$. In order to do this, I've tried integrating by parts:
$$
    \begin{align}
    \int \limits_0^{\infty} x^{2n}e^{-x^2}\cos(2y)dx &= 
    -\frac{1}{2}\int\limits_{0}^{\infty} x^{2n - 1}\cos(2yx) d e^{-x^2} = 
    \frac{1}{2}x^{2n - 1}\cos(2yx)e^{-x^2} \bigg\rvert_{0}^{\infty} \\&+ 
    \frac{(2n - 1)}{2} \int \limits_{0}^{\infty} x^{2n-2}\cos(2yx)e^{-x^2}dx
    - y \int\limits_{0}^{\infty}x^{2n - 1} \sin(2yx)e^{-x^2}dx 
   \\&= \frac{(2n - 1)}{2} \int \limits_{0}^{\infty} x^{2n-2}\cos(2yx)e^{-x^2}dx
    - y \int\limits_{0}^{\infty}x^{2n - 1} \sin(2yx)e^{-x^2}dx 
    \end{align}
$$
At this point I don't know what to do next to get rid of $\sin(2yx)$ somehow to get recurrent relation for this integral. Maybe I am doing something wrong (but I have no idea how to solve this in other way).
 A: There are several methods to calculate the integral ($n=0,1,2,...$, $y$ real)
$$f_{0}(n,y) = \int_0^{\infty } \exp \left(-x^2\right) x^{2 n} \cos (2 x y) \, dx\tag{1}$$
§1. Using diffentiation of a parametric integral.
Replace $\cos (z)$ by Euler's formula with $\Re(\exp (i z))$, then consider the simpler intergral with a parameter $a$
$$f(a,y) = \int_0^{\infty } \exp \left(-a x^2+2 i x y\right) \, dx$$
and notice that the factor $x^{2n}$ can be generated by differentiating $n$ times with respect to a and then letting $a\to 1$.
The integral $f$ can be evaluated using quadratic supplement in the exponent to give
$$f(a,y) = \frac{\sqrt{\pi } e^{-\frac{y^2}{a}} \left(1+i\; \text{erfi}\left(\frac{y}{\sqrt{a}}\right)\right)}{2 \sqrt{a}}$$
where the $erfi()$ is a special error function (http://mathworld.wolfram.com/Erfi.html)
and the real part is
$$f_{r}(a,y)=\frac{\sqrt{\pi } e^{-\frac{y^2}{a}}}{2 \sqrt{a}}\tag{1.1}$$
Now by differentiating $f_{r}$ $n$ times with respect to $a$ and then letting $a \to 1$ we get the result for the original integral for the first few $n$
$$\begin{array}{l}
 \left\{1,\frac{1}{4} \sqrt{\pi } e^{-y^2} \left(1-2 y^2\right)\right\} \\
 \left\{2,\frac{1}{8} \sqrt{\pi } e^{-y^2} \left(4 y^4-12 y^2+3\right)\right\} \\
 \left\{3,\frac{1}{16} \sqrt{\pi } e^{-y^2} \left(-8 y^6+60 y^4-90 y^2+15\right)\right\} \\
 \left\{4,\frac{1}{32} \sqrt{\pi } e^{-y^2} \left(16 y^8-224 y^6+840 y^4-840 y^2+105\right)\right\} \\
 \left\{5,\frac{1}{64} \sqrt{\pi } e^{-y^2} \left(-32 y^{10}+720 y^8-5040 y^6+12600 y^4-9450 y^2+945\right)\right\} \\
\end{array}\tag{1.2}$$
The coeficients of the polynomials are listed in https://oeis.org/A223524
§2. Direct attack, and contour integral
Because the integrand is symmetric we can write
$$f_{s}(n,y) =\frac{1}{2} \int_{-\infty}^{\infty } \exp \left(-x^2\right) x^{2 n} \cos (2 x y) \, dx\tag{2.1}$$
The integrand can be written as
$$x^{2 n} \exp \left(-x^2+2 i x y\right) =x^{2 n}\exp (-y^2-(x-i y)^2)$$
Substituting $x=(z+i y)$ we find
$$\frac{1}{2} \int_{-\infty - i y}^{\infty -i y} \exp \left(-z^2\right) (z+i y)^{2 n} \, dz$$
As there are no singularities in the integrand we can move the contour of integration in $z$ to the real axis which gives the following equivalent expression
$$\frac{1}{2} \int_{-\infty}^{\infty} \exp \left(-z^2\right) (z+i y)^{2 n} \, dz$$
Now expanding $(z+i y)^{2 n}$ into a binomial sum and doing the remaining integrals (left to the reader, leading to $\Gamma(m+1/2)$) we get finally
$$f_{p}(n,y)=\frac{1}{2} \exp \left(-y^2\right) \sum _{m=0}^n (-1)^m \Gamma \left(m+\frac{1}{2}\right) \binom{2 n}{2 m} y^{2 n-2 m}\tag{2.2}$$
This shows the structure of the polynomials.
Notice that (https://de.wikipedia.org/wiki/Gammafunktion)
$$\Gamma \left(m+\frac{1}{2}\right)=\frac{\sqrt{\pi } (2 m)!}{4^m m!}\tag{2.3}$$
§3. Brute force.
Mathematica returns the compact form 
$$f_{c}(n,y)=\frac{1}{2} \Gamma \left(n+\frac{1}{2}\right) \, _1F_1\left(n+\frac{1}{2};\frac{1}{2};-y^2\right)\tag{3.1}$$
For given $n$ Mathematica simplifies the general expression to exactly the polynomial form we found above.
