Constant area under $e^{-Ax^2}$ for different $A$ I am trying to find a solution to calculate relationship between an amplitude and boundaries of a Gaussian function so that an area under the curve is constant, let's say 2.
I found a solution via integration to calculate area under a Gaussian function $e^{-Ax^2}$, which happens to be of a $\mathrm{erf}$ function form: $\frac{1}{\sqrt{A}}\, \frac{\sqrt{\pi}}{2}\mathrm{erf}(\sqrt{A}x)$. I found that setting boundaries to $x=-2.76$ and $x=2.76$ make the area equal to 1.9998. I would like to be able to change the parameter $A$ and make this to be related to boundaries such that the area stays 1.9998. Because $A$ is inside erf and I don't know anything about erf I cannot figure out if this is possible. I hope someone can help.
Any clue is very appreciated :)
 A: It seems that you are interested in the function $A\mapsto x(A)$ defined by the identity
$$
\int_{-x(A)}^{x(A)}\mathrm e^{-At^2}\mathrm dt=2.
$$
Then, as you observed, $x(A)$ is defined implicitly by the identity
$$
\sqrt\pi\cdot\mathrm{erf}(x(A)\sqrt{A})=2\sqrt{A}.
$$
Thus, $x$ is defined on $[0,\pi/4)$ and increasing from $x(0)=1$ to $\lim\limits_{A\to(\pi/4)^-}x(A)=+\infty$. In particular, $x(A)$ does not exist when $A\gt\pi/4\approx0.785$.
A: If I properly understand, you want that the integral between $-a$ and $+a$ be a constant, say $Area$. As you noticed by yourself, this leads to the equation the value of the integral is $$Area=\frac{\sqrt{\pi } \text{erf}\left(a \sqrt{A}\right)}{\sqrt{A}}$$ This gives you an equation which relates all your parameters. You can notice from this equation that   $$\frac{\text{Area}}{a}=\frac{\sqrt{\pi } \text{erf}\left(a \sqrt{A}\right)}{a \sqrt{A}}$$
Working numerically the inverse of the $\text{erf}$ function is not the easiest thing but it is doable.
If you need more, just post please.
