I'm trying to solve for k in the pdf:
\begin{equation} \int_2^{\infty} \frac{k}{\sqrt{2\pi}} \exp^{-\frac{1}{2} x^2} \, dx \end{equation}
My solution (which is wrong):
Take the square of the integral to convert to polar coordinates:
\begin{equation} \begin{split} \left[ \int_2^{\infty} \frac{k}{\sqrt{2\pi}} \exp\{-\frac{1}{2} x^2\} \, dx \right]^2 &=\frac{k^2}{2\pi} \int_2^{\infty} \int_2^{\infty} \exp\{-\frac{1}{2} x^2 - \frac{1}{2} y^2\} \, dx dy\\ &= \frac{k^2}{2\pi} \int_2^{\infty} \int_0^{\pi} \exp\{-\frac{1}{2} r^2\} r d\theta dr \quad (r^2=x^2+y^2)\\ \end{split} \end{equation}
The inner integral has range $0$ to $\pi$ because x has to be greater than $2$ and therefore can only be in the first or fourth quadrant.
Solving the inner integral, involving $d\theta$ would give $\pi$, so we can simplify the above to:
\begin{equation} \begin{split} \frac{k^2}{2\pi} \pi \int_2^{\infty} \exp\{-\frac{1}{2} r^2\} \, rdr =& \frac{k^2}{2} \int_2^{\infty} \exp\{-\frac{1}{2} r^2\} \, rdr \\ \end{split} \end{equation}
Define $u=-\frac{1}{2} r^2$. Then $\frac{du}{dr}= -r$, so $-du=rdr$. We can use this u-substitution to solve the above integral:
\begin{equation} \begin{split} \frac{k^2}{2} \int_2^{\infty} \exp\{-\frac{1}{2} r^2\} \, rdr =& \frac{k^2}{2} \int_2^{\infty} - \exp\{u\} \, du \\ =& -\frac{k^2}{2} \left[ \exp\{-\frac{1}{2} r^2\} \right]_2^{\infty} \\ =& -\frac{k^2}{2} [-\exp\{ -2\}]\\ =& \frac{k^2}{2} 0.13534 \end{split} \end{equation}
Equating the square root of this to 1:
\begin{equation} \frac{k}{\sqrt{2}} \sqrt{0.13534} =1 \end{equation}
we get $k=\frac{\sqrt{2}}{\sqrt{0.13534}}=3.8442$.
But this is wrong!
fun3<-function(x){
return((3.8442/(sqrt(2*pi)))*exp(-.5*x^2))
}> integrate(fun3,lower=2,upper=Inf)
0.087456 with absolute error < 5.8e-05
So where did I go wrong?
$$\sqrt{2}\int^\infty_{2}\exp\left(\left(\dfrac{x}{\sqrt{2}}\right)^2\right)d\left(\dfrac{x}{\sqrt{2}}\right)={\mathrm{erfc}(\sqrt 2)}\sqrt{\dfrac{\pi}{2}}$$ Therefore, $$\dfrac{k}{\sqrt{2\pi}}\int^\infty_2\exp\left(\dfrac{x^2}{2}\right)dx=\dfrac{k\times\mathrm{erfc}(\sqrt 2)}{2}$$