Given that $$\int_{-\infty}^\infty e^{-x^2} dx = \sqrt\pi,$$ evaluate $$\int_{-\infty}^\infty e^{-kx^2} dx$$ and $$\int_{-\infty}^\infty x^2 e^{-kx^2} dx.$$ for $k>0$
I tried many approaches as integration by parts and substituting $e^{-x^2}$ for $y$ but I reached dead ends.
Hint.
For the first integral, try substituting $y = \sqrt k x$ (note that for the integral to converge, we must have $k > 0$).
For the second one, use integration by parts with $u(x) = x$ and $v'(x) = xe^{-kx^2}$, note that an antiderivative of $v'$ is given by $v(x) = -\frac 1{2k} e^{-kx^2}$.