Using Fourier analysis to show a function is positive Let
$$f(x)=  \sum_{n=-\infty}^{\infty} \frac{\mathrm{e}^{i nx}}{n^2+1}$$
on $[-\pi, \pi]$. Prove that $f(x)>0$ for any $x \in [-\pi, \pi]$.
How to use Fourier analysis to show that function is positive? I try to differentiate it, but it seems that the derivative is not convergent. Right?
 A: Positivity
Since
$$
\frac1{2\pi}\int_{-\infty}^\infty e^{-|x|}e^{-inx}\,\mathrm{d}x=\frac1\pi\frac1{n^2+1}
$$
we have
$$
\frac1{2\pi}\int_{-\pi}^\pi\pi\sum_{k\in\mathbb{Z}}e^{-|x+2k\pi|}e^{-inx}\,\mathrm{d}x=\frac1{n^2+1}
$$
Therefore, inverting the transform, we get
$$
\sum_{n\in\mathbb{Z}}\frac{e^{inx}}{n^2+1}=\pi\sum_{k\in\mathbb{Z}}e^{-|x+2k\pi|}
$$

Convergence of the Derivative
The derivative converges everywhere except for $x\in2\pi\mathbb{Z}$. However, the convergence is only conditional. We can apply the Generalized Dirichlet Convergence Test to
$$
\sum_{k\in\mathbb{Z}}\frac{ine^{inx}}{n^2+1}
$$
since $\frac{in}{n^2+1}$ has bounded variation, tends to $0$ as $|n|\to\infty$, and the partial sums of $\sum\limits_{n\in\mathbb{Z}}e^{inx}$ are bounded except where $e^{ix}=1$.

Motivation
What prompted me to look at $e^{-|x|}$ was to note that the second derivative of
$$
f(x)=\sum_{n\in\mathbb{Z}}\frac{e^{inx}}{n^2+1}
$$
is
$$
f''(x)=-\sum_{n\in\mathbb{Z}}\frac{n^2e^{inx}}{n^2+1}
$$
which does not converge in the standard sense, but in the sense of distributions
$$
\begin{align}
f(x)-f''(x)
&=\sum_{n\in\mathbb{Z}}e^{inx}\\
&=\sum_{k\in\mathbb{Z}}\delta(x-2k\pi)
\end{align}
$$
where $\delta(x)$ is the Dirac delta distribution, which is $0$ away from $2\pi\mathbb{Z}$. Now, two solutions to $f(x)-f''(x)=0$ are $e^x$ and $e^{-x}$, so this brought to mind $e^{-|x|}$, whose first derivative has a jump discontinuity, which would lead to a Dirac delta distribution at $x=0$.
Adding
$$
\int_0^\infty e^{-x}e^{-inx}\,\mathrm{d}x=\frac1{1+in}
$$
and
$$
\int_{-\infty}^0e^xe^{-inx}\,\mathrm{d}x=\frac1{1-in}
$$
gave
$$
\int_0^\infty e^{-|x|}e^{-inx}\,\mathrm{d}x=\frac2{1+n^2}
$$
which is where I started the first section.
A: Hint:
$$
f(x)=  \sum_{n=-\infty}^{\infty} \frac{\mathrm{e}^{i nx}}{n^2+1}=
\sum_{n=-\infty}^{\infty} \frac{\cos nx + i\sin nx}{n^2+1}=\cdots
$$
What happens with the imaginary part ($\sin$ is odd)?
