A rather lengthy solution using a neat method I just learned relying on complex analysis.
First observe that
where
.
Normally we would consider the integrand as a function of complex numbers and swapping out
for
, but since it's entire and has no poles, we cannot use the residue theorem right away. Instead, we introduce a new function
such that
has at least one pole we can work with, along with the property (1) that
has period
so
.
Now in the complex plane, we integrate
along a rectangular contour
with vertices at
,
,
, and
with positive orientation, and where
. It's easy to show the integrals along the vertical sides will vanish as
, which leaves us with
Suppose further that our cooked up function has the property (2) that, in the limit, this integral converges to the one we want to evaluate, so
Use (2) to solve for
.
Use (1) to solve for the period
.
Note that
, so in fact
Take the simplest non-zero pole and let
, so
. Of the two possible square roots, let's take the one with the positive imaginary part, which we can write as
and note that the rectangle has height
Find the poles of
that lie inside
.
We only need the pole with
, since it's the only one with imaginary part between 0 and
. You'll find the residue here is
Then by the residue theorem,
We can rewrite
so that the result is equivalent to