I am having difficulty in doing this integration. Actually, I don't even know from where I have to proceed. The integral is $$\int_{-\infty}^{\infty}(-1)^xe^{\frac{-\pi x}{2}(nx+1)}dx=\frac{1}{\sqrt{n}}$$ We have to find the value of $n$. After seeing this gigantic integral, I decided to give some calculators a try for it and the result that I received is even more horrendous. The result is $$\dfrac{\mathrm{exp}\left(\dfrac{4\ln^2\left(-1\right)+{\pi}^2}{8{\pi}n}\right)\operatorname{erf}\left(\dfrac{2{\pi}nx-2\ln\left(-1\right)+{\pi}}{2^\frac{3}{2}\sqrt{{\pi}}\sqrt{n}}\right)}{\sqrt{2}\sqrt{n}\left(-1\right)^\frac{1}{2n}}$$ This result is actually without calculating the bounds. After calculating the definite integral we get, $$\sqrt{\dfrac{2}{n}}\cdot\mathrm{exp}\left(\frac{\ln^2\left(-1\right)}{2{\pi}n}-\frac{\ln\left(-1\right)}{2n}+\frac{\pi}{8n}\right)$$
Now if we think of equating it to $\frac{1}{\sqrt{n}}$, God knows what will happen. Here I have assumed that $n>0$
Any help is greatly appreciated.
Let's let $(-1)^x = \exp(i \pi x)$. If $(-1)^x = \exp(-i \pi x)$ is preferred, take the complex conjugate of everything that follows. Also, we must have $\operatorname{Re}[n] > 0$, or else the integral doesn't converge. We have $$ \int_{-\infty}^\infty\exp\left[i\pi x-\frac{\pi x}{2}(nx+1)\right]dx = \int_{-\infty}^\infty \exp\left[-\frac{n\pi}{2}\left(x - \frac{1-2i}{2n}\right)^2+\frac{n\pi}{2}\left(\frac{1-2i}{2n}\right)^2\right]dx \\=\exp\left(-\frac{(3+4i)\pi}{8n}\right)\int_{-\infty}^\infty \exp\left[-\frac{n\pi}{2}\left(x - \frac{1-2i}{2n}\right)^2\right]dx = \exp\left[-\frac{(3+4i)\pi }{8n}\right]\sqrt{\frac{2}{n}}, $$ where $\sqrt{n}$ is taken to have positive real part. Assuming $\sqrt{n}$ in the original equation is the principal branch, we can cancel the square roots and get $$ \exp\left[-\frac{(3+4i)\pi}{8n}\right]\sqrt{2} = 1. $$ This can be inverted to give $$ n = \frac{\pi}{4}\frac{3+4i}{\ln 2 + 4ik\pi}\,,\,k\in \mathbb N, $$ where solutions with $k < 0$ are disallowed because they would have negative real part.