Lagrange Multipliers for the derivation of Maxwell-Boltzmann distribution When deriving the MB-Distribution while taking the number of quantum states $g_j$ into account, the final equation I'd have to solve would be:
$$\ln(g_j)-\ln(n_j)+\alpha+\beta\cdot E_j=0$$
Where $n_j$ is the number of particles at energy level $E_j$. The $\alpha$ and $\beta$ are the applied Lagrange Multipliers restrictions. 
I have understood that adding or subtracting the Lagrangian Multipliers should not matter for the end result. 
Now, when I continue with this equation, I'd eventually get:
$$n_j=e^\alpha\cdot e^{\beta\cdot E_j} \cdot g_j$$
When I want to derive the probability distribution formula of Maxwell-Boltzmann, I'd have to consider energy to be continuous. Substituting $g_j$ with the energy density formula times $\mathrm dE$, the total number of particles $N$ would then be:
$$\int_0^\infty\frac{V\cdot 2^{2.5}\pi\cdot m^{1.5}}{h^3}\cdot \sqrt E\cdot e^{\alpha}\cdot e^{\beta\cdot E}\cdot \mathrm dE=N$$
However, the result of this integration up to infinity would simply give the outcome $0$. But when you subtract the Lagrange Multipliers in the initial equation, the constants would have negative signs and the integration would give the correct formula for $N$. 

But this means that it does matter whether you add or subtract the Lagrange Constants. What am I doing wrong here?
Ignoring multiplicative constants, the required integral is (in general form)

$$ \int \sqrt{x} e^{ax} \mathrm{d} x = \frac{1}{a}\sqrt{x}e^{ax}+\frac{i\sqrt{\pi}}{2a^{3/2}} \mathrm{erf}(i\sqrt{ax})$$ 

where $$ \mathrm{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2}\mathrm{d}t$$

Setting $x=E$, $a=\beta$, and the integration limits as $0$ and $\infty$, gives

$$ \int_0^\infty \sqrt{E} e^{\beta E} \mathrm{d} E = \frac{1}{\beta}\sqrt{E}e^{\beta E}\Bigg|_{0}^\infty + \frac{i\sqrt{\pi}}{2\beta^{3/2}} \mathrm{erf}(i\sqrt{\beta E})\Bigg|_{0}^\infty = \frac{1}{\beta}\sqrt{E}e^{\beta E}\Bigg|^\infty +\frac{i\sqrt{\pi}}{2\beta^{3/2}} \mathrm{erf}(i\sqrt{\beta E})\Bigg|^\infty $$

since $\mathrm{erf}(0)=0$.
To make further progress, consider that the function $\mathrm{erf}(x)$ must have a real input $x$ (otherwise it will "blow up" to $\infty$), which implies that $\beta$ must be negative, or, explicitly, that  $\beta = -|\beta| $ (we could also argue that the second term on the r.h.s must be real and come to the same conclusion). With negative $\beta$ we have that

$$\mathrm{erf}(i\sqrt{\beta E})=\mathrm{erf}(i\sqrt{-|\beta|E})=\mathrm{erf}(-\sqrt{|\beta|E})=-\mathrm{erf}(\sqrt{|\beta|E})$$

With this condition we also see that the first term on the r.h.s. is zero and as a result that

$$ \int_0^\infty \sqrt{E} e^{-|\beta| E} \mathrm{d} E =  \frac{\sqrt{\pi}}{2|\beta|^{3/2}} $$