How did you prove this integral? This  is my problem, true or false?
prove that: 
$$\int_{0}^{\infty}\frac{\displaystyle{\sum_{k=1}^{\infty}}k\sin(kx)\,e^{-tk^2}}{\displaystyle{\sum_{k=1}^{\infty}}\cos(kx)\,e^{-tk^2}}dt=\frac{\pi^2({\pi-x})}{8}$$ and
$0<x<\dfrac{\pi}{2}$
Thank you.
 A: The answer seems not to be true. Here are the arguments. Let $x=\pi/4$, then the denominator is a differentiable function of $t$ on $[0.05,1]$ as the series $$ \sum_{k=1}^\infty e^{-0.05k^2}$$ rapidly converges. Up to a numerical solution, the denominator equals zero at $t=0.08560978493249566136215339$ and the numerator is positive on $[0.05,1].$ Therefore, the integral under consideration diverges in the case $x=\pi/4.$ See the calculations  in a Maple file exported as a *.pdf file which can be downloaded from RapidShare.
A: Let us put $q = e^{-t}$ so that $dq/q = -dt$. Also if we see the definition of theta function$\vartheta_{3}(z, q)$ given by
$$\vartheta_{3}(z, q) = 1 + 2\sum_{k = 1}^{\infty}q^{k^{2}}\cos (2kz)$$
then we find that the denoninator in the integral can be written as
$$\frac{\vartheta_{3}(x/2, q) - 1}{2} = \sum_{k = 1}^{\infty}q^{k^{2}}\cos (kx)$$
Differentiating this with respect to $x$ we get
$$-\frac{1}{2}\vartheta_{3}'(x/2,q) = \sum_{k = 1}^{\infty}q^{k^{2}}k\sin(kx)$$
which is the numerator in the integral. Thus the desired integral is
$$I = -\int_{0}^{1}\frac{\vartheta_{3}'(x/2, q)}{\vartheta_{3}(x/2, q) - 1}\frac{dq}{q}$$
After this I tried to use various theta function identities and differentiation under integral sign, but nothing seems to be working especially because of the $-1$ in the denominator.
