a(iq + x/a)²/2 = a(iq + ix/ia)²/2 = a(i(q  ix/a))²/2 = ai²(q  ix/a)²/2 = a(q  ix/a)²/2, so your exponent is just the negative of mine. However, I'm pretty sure I completed the square correctly. Also, when you complete the square, say, in the variable q, then you want to end up with something of the form A(q  B)² + C, you shouldn't have iq or anything like that (you should have factored the i out, but there was no i to factor). Actually, you should be able to see that yours is wrong, because when you square it, the q² term will be a(iq)² = aq², but we know that the original thing we were working with had aq² as the q² term.
