Artificial intelligent assistant

Does definite integration invalidate equalities? Given any old equation, say $$x^2+x+a=0$$ Rearranging and raising by $e$ $$e^{-x^2}=e^{x+a}$$ Integrating both sides w.r.t. x over the domain $[-\infty, \infty]$ gives $$\sqrt{\pi} = e^{a} \int_{-\infty}^{\infty}e^x\:dx$$ But this cannot be true since the RHS diverges. Why is the equation no longer valid after integration? Differentiation preserves equalities. Why does it seem that differentiation's inverse operation not preserve equality?

What is $a$?

$\bullet$ A fixed constant? Then $x^2+x+a=0$ is satisfied by only (at most) two values $x$. So it makes no sense to integrate over $x$.

$\bullet$ A function of $x$, defined implicitly by $x^2+x+a$? Then you can integrate, but $$ \int_{-\infty}^{\infty}e^{x+a}x\;dx \
e e^{a} \int_{-\infty}^{\infty}e^x\:dx $$ because $a$ is a function of $x$ and cannot be factored out.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 29bddb9963192218e1ba307abbd6b2c4