and
Could I use and substitute i for a?
I'm not familiar with a uniqueness principle. All I know is that when is real valued and , the integral diverges. I don't know for what imaginary or complex values the integral is convergent. Substituting does lead to the correct solution, though.
EDIT: It should be OK if I can show that and actually converge.
The question of whether an identity involving a real parameter can extended to complex values comes up a lot in complex analysis. There's more to it than just showing that certain integrals converge. A reference for the uniqueness principle is Gamelin's book on complex analysis. He addresses questions very similiar to the one you're considering.