Calculate $\sum_{k=1}^{\infty}\frac{|\sin(k x)|}{1+k^2}$ In https://math.stackexchange.com/a/4015346/198592 it was shown that the sum
$$s(x) = \sum_{k=1}^{\infty}\frac{\sin(k x)}{1+k^2}$$
is exactly expressible in terms of the hypergeometric function.
I wonder what happens íf we replace the sine by its absolute value, i.e. ask for the properties of the function $a(x)$ defined by the sum
$$a(x) = \sum_{k=1}^{\infty}\frac{|\sin(k x)|}{1+k^2}$$
Questions
(1) can you find a closed expression for $a(x)$ if $x$ is a rational multiple of $\pi$?
(2) is there a closed expression for $a(x)$?
Here is a plot of the two functions $a(x)$ and $s(x)$


Here I provide a "semi-closed" form expression for $a(x)$ in case of $x\in \mathbb{Q}$ (rational numbers). Perhaps from it, we can obtain the closed form expression for $a(x)$ for $x\in \mathbb{R}$.
As $a(x)$ is a periodic function, it suffices to calculate $a(x)$ for $x\in (0,\pi)$.
Suppose  $x\in \mathbb{Q}$, then $x=\frac{p}{q}\pi$ with $p,q\in \mathbb{N}$, $p<q$ and $(p,q)=1$.
\begin{align}
a(x) &= \sum_{k=1}^{\infty}\frac{|\sin(k x)|}{1+k^2} \\
&= \sum_{k=1}^{\infty}\frac{|\sin(k\frac{p}{q}\pi)|}{1+k^2} \\
&= \sum_{k=1}^q \left(\left|\sin \left(k\frac{p}{q}\pi \right)\right| \sum_{n=0}^{\infty}\frac{1}{1+(k+nq)^2} \right) \tag{1} \\
\end{align}
Denote
$$u(k,q)=\sum_{n=0}^{\infty}\frac{1}{1+(k+nq)^2}$$
We have
\begin{align}
u(k,q) &=\frac{i}{2q} \sum_{n=0}^{\infty}\frac{-2\frac{i}{q}}{(n+\frac{k}{q})^2+\frac{1}{q^2}} \\
&=\frac{i}{2q} \sum_{n=0}^{\infty} \left(\frac{1}{n+\frac{k}{q}+\frac{i}{q}}-\frac{1}{n+\frac{k}{q}-\frac{i}{q}}  \right) \tag{1} \\
\end{align}
We know that the digamma function for complex number is calculated as
$$\psi(z)=-\gamma + \sum_{n=0}^{\infty}\frac{1}{n} - \sum_{n=0}^{\infty}\frac{2}{n+z}=\int_0^{+\infty} \left( \frac{e^{-t}}{t} -\frac{e^{-zt}}{1-e^{-t}}  \right)dt \tag{3}$$
From (2) and (3), we can easily deduce
$$u(k,q)=\int_0^{+\infty} \frac{e^{-\frac{k}{q}t}}{1-e^{-t}}\frac{\sin \left( \frac{t}{q} \right)}{q}dt$$
Hence, from (1) we have
\begin{align}
a(x) &=\sum_{k=1}^q \left(\left|\sin \left(k\frac{p}{q}\pi \right) \right| \int_0^{+\infty} \frac{e^{-\frac{k}{q}t}}{1-e^{-t}}\frac{\sin \left( \frac{t}{q} \right)}{q}dt\right) \tag{4} \\
\end{align}
The formulas (4) can be considered to be the "semi-closed form expression" for $a(x)$ in case of $x\in \mathbb{Q}$ (rational numbers).
Find the closed-form expression for $a(x)$ in general case ($x\in \mathbb{R}$) is equivalent to find the closed-form expression of $a(\frac{p}{q}\pi)$
We have this identity from Fourier transform (link)
$$\left|\sin x\right| = \frac{2}{\pi}-\sum_{j = 1}^\infty \frac{4}{\pi(4j^2-1)}\cos(2j x)$$
Then
\begin{align}
a \left(\frac{p}{q}\pi \right)&=\sum_{k=1}^q \left(\left(\frac{2}{\pi}-\sum_{j = 1}^\infty \frac{4}{\pi(4j^2-1)}\cos \left(2j k\frac{p}{q}\pi\right) \right) \int_0^{+\infty} \frac{e^{-\frac{k}{q}t}}{1-e^{-t}}\frac{\sin \left( \frac{t}{q} \right)}{q}dt\right) \tag{5}\\
\end{align}
Remark: It's possible that from (5), we can transform $a(x)$ to a function $f\left(\frac{p}{q}\right)$. If the function $f\left(\frac{p}{q}\right)$ exists, it suffices then replace $\frac{p}{q}$ by $r \in \Bbb R$.
We can use the formula $(5)$ by noticing that $\sin(x)\cos(y) =\frac{1}{2}(\sin(x+y)+\sin(x-y))$ and
$$\sum_{i=1}^n \sin(nx) = \frac{\sin\left(\frac{nx}{2}\right)\sin\left(\frac{(n+1)x}{2}\right)}{\cos\left(\frac{x}{2}\right)}$$
We have
\begin{align}
a \left(\frac{p}{q}\pi \right)&=\sum_{k=1}^q \left(\left(\frac{2}{\pi}-\sum_{j = 1}^\infty \frac{4}{\pi(4j^2-1)}\cos \left(2j k\frac{p}{q}\pi\right) \right) \int_0^{+\infty} \frac{e^{-\frac{k}{q}t}}{1-e^{-t}}\frac{\sin \left( \frac{t}{q} \right)}{q}dt\right) \\
&=\frac{2}{\pi}\sum_{k=1}^q  \int_0^{+\infty} \frac{e^{-\frac{k}{q}t}}{1-e^{-t}}\frac{\sin \left( \frac{t}{q} \right)}{q}dt - \sum_{j = 1}^\infty \left( \frac{4}{\pi(4j^2-1)} \int_0^{+\infty} \frac{\sum_{k=1}^q  e^{-\frac{k}{q}t}\cos \left(2j k\frac{p}{q}\pi \right) \sin \left( \frac{t}{q} \right)}{(1-e^{-t})q}dt \right)\\
&= I_1 - I_2 \\
\end{align}
The first term $I_1$ is equal to
$$I_1 = \frac{2}{\pi} \int_0^{+\infty} \frac{\sin \left( \frac{t}{q} \right)}{q(e^{\frac{t}{q}}-1)}dt = \frac{2}{\pi} \int_0^{+\infty} \frac{\sin (t)}{e^t-1}dt$$
The second term $I_2$ is equal to
\begin{align}
I_2 &=\sum_{j = 1}^\infty \left( \frac{4}{\pi(4j^2-1)} \int_0^{+\infty} \frac{\sum_{k=1}^q  e^{-\frac{k}{q}t}\cos \left(2j k\frac{p}{q}\pi \right) \sin \left( \frac{t}{q} \right)}{(1-e^{-t})q}dt \right)\\
&=\sum_{j = 1}^\infty \left( \frac{4}{\pi(4j^2-1)} \int_0^{+\infty} 
\frac{
\sin(\frac{t}{q})(-e^{-t}+\cos(2jpt)+e^{t+\frac{t}{q}}\cos(2j\frac{p}{q}t)-e^{\frac{t}{q}}\cos(2j(\frac{p}{q}+p)t))}{q(e^t-1)(1+e^{\frac{2t}{q}} -2e^{\frac{t}{q}}\cos(2j\frac{p}{q}t))
}
\right)\\
\end{align}
Denote $r = \frac{p}{q}$
\begin{align}
I_2 &=\sum_{j = 1}^\infty \left( \frac{4}{\pi(4j^2-1)} \int_0^{+\infty} 
\frac{
\sin(\frac{t}{q})(-e^{-t}+\cos(2jrqt)+e^{t+\frac{t}{q}}\cos(2jrt)-e^{\frac{t}{q}}\cos(2jr(1+q)t))}{q(e^t-1)(1+e^{\frac{2t}{q}}+-2e^{\frac{t}{q}}\cos(2jrt))
}
\right)\\
\end{align}
We can transform the integrand into a function depended on only $r$ and $t$. But it's too calculating. I must stop here.
