I am trying to solve the following integral, $$ I = \int_0^\infty \mathrm{e}^{z/2 - {\left(z - \ln a\right)^2}/4b} - \mathrm{e}^{z/2 - {\left(z + \ln a\right)^2}/4b}dz $$ where $a$ and $b$ are some positive constants. I am not quite sure how to complete those squares.
Thank you
Hint $$A=\frac{z}{2}-\frac{(z-\log (a))^2}{4 b}=-\frac{z^2}{4 b}+\frac{ (\log (a)+b)}{2 b}z-\frac{\log ^2(a)}{4 b}$$ $$A=-\left(\frac{z^2}{4 b}-\frac{ (\log (a)+b)}{2 b}z+\frac{\log ^2(a)}{4 b} \right)=-\frac 1{4b}\left(z^2-2 (\log (a)+b)z+\log ^2(a)\right)$$ Completing the square and making the appropriate change of variable will make you facing the Gaussian integral.