# Does this formula correspond to a series representation of the Dirac delta function $\delta(x)$?

Consider the following formula which defines a piece-wise function which I believe corresponds to a series representation for the Dirac delta function $$\delta(x)$$. The parameter $$f$$ is the evaluation frequency and assumed to be a positive integer, and the evaluation limit $$N$$ must be selected such that $$M(N)=0$$ where $$M(x)=\sum\limits_{n\le x}\mu(n)$$ is the Mertens function.

(1) $$\quad\delta(x)=\underset{N,f\to\infty}{\text{lim}}\ 2\left.\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\ n}\ \left(\left\{ \begin{array}{cc} \begin{array}{cc} \cos \left(\frac{2 k \pi (x+1)}{n}\right) & x\geq 0 \\ \cos \left(\frac{2 k \pi (x-1)}{n}\right) & x<0 \\ \end{array} \\ \end{array} \right.\right.\right),\quad M(N)=0$$

The following figure illustrates formula (1) above evaluated at $$N=39$$ and $$f=4$$. The red discrete dots in figure (1) below illustrate the evaluation of formula (1) at integer values of $$x$$. I believe formula (1) always evaluates to exactly $$2\ f$$ at $$x=0$$ and exactly to zero at other integer values of $$x$$.

Figure (1): Illustration of formula (1) for $$\delta(x)$$

Now consider formula (2) below derived from the integral $$f(0)=\int_{-\infty}^{\infty}\delta(x)\ f(x)\, dx$$ where $$f(x)=e^{-\left| x\right|}$$ and formula (1) above for $$\delta(x)$$ was used to evaluate the integral. Formula (2) below can also be evaluated as illustrated in formula (3) below.

(2) $$\quad e^{-\left| 0\right|}=1=\underset{N,f\to\infty}{\text{lim}}\ 4\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\ n}\frac{n\ \cos\left(\frac{2\ \pi\ k}{n}\right)-2\ \pi\ k\ \sin\left(\frac{2\ \pi\ k}{n}\right)}{4\ \pi^2\ k^2+n^2}\,,\quad M(N)=0$$

(3) $$\quad e^{-\left| 0\right|}=1=\underset{N\to\infty}{\text{lim}}\ \mu(1)\left(\coth\left(\frac{1}{2}\right)-2\right)+4\sum\limits_{n=2}^N\frac{\mu(n)}{4 e \left(e^n-1\right) n}\\\\$$ $$\left(-2 e^{n+1}+e^n n+e^2 n-e \left(e^n-1\right) \left(e^{-\frac{2 i \pi }{n}}\right)^{\frac{i n}{2 \pi }} B_{e^{-\frac{2 i \pi }{n}}}\left(1-\frac{i n}{2 \pi },-1\right)+e \left(e^n-1\right) \left(e^{-\frac{2 i \pi }{n}}\right)^{-\frac{i n}{2 \pi }} B_{e^{-\frac{2 i \pi }{n}}}\left(\frac{i n}{2 \pi }+1,-1\right)+\left(e^n-1\right) \left(B_{e^{\frac{2 i \pi }{n}}}\left(1-\frac{i n}{2 \pi },-1\right)-e^2 B_{e^{\frac{2 i \pi }{n}}}\left(\frac{i n}{2 \pi }+1,-1\right)\right)+2 e\right),\quad M(N)=0$$

The following table illustrates formula (3) above evaluated for several values of $$N$$ corresponding to zeros of the Mertens function $$M(x)$$. Note formula (3) above seems to converge to $$e^{-\left| 0\right|}=1$$ as the magnitude of the evaluation limit $$N$$ increases.

$$\begin{array}{ccc} n & \text{N=n^{th} zero of M(x)} & \text{Evaluation of formula (3) for e^{-\left| 0\right|}} \\ 10 & 150 & 0.973479\, +\ i\ \text{5.498812269991985\grave{ }*{}^{\wedge}-17} \\ 20 & 236 & 0.982236\, -\ i\ \text{5.786047752866836\grave{ }*{}^{\wedge}-17} \\ 30 & 358 & 0.988729\, -\ i\ \text{6.577233629689039\grave{ }*{}^{\wedge}-17} \\ 40 & 407 & 0.989363\, +\ i\ \text{2.6889189402888207\grave{ }*{}^{\wedge}-17} \\ 50 & 427 & 0.989387\, +\ i\ \text{4.472005325912989\grave{ }*{}^{\wedge}-17} \\ 60 & 785 & 0.995546\, +\ i\ \text{6.227857765313369\grave{ }*{}^{\wedge}-18} \\ 70 & 825 & 0.995466\, -\ i\ \text{1.6606923419056456\grave{ }*{}^{\wedge}-17} \\ 80 & 893 & 0.995653\, -\ i\ \text{1.1882293286557667\grave{ }*{}^{\wedge}-17} \\ 90 & 916 & 0.995653\, -\ i\ \text{3.521050901644269\grave{ }*{}^{\wedge}-17} \\ 100 & 1220 & 0.997431\, -\ i\ \text{1.2549006768893629\grave{ }*{}^{\wedge}-16} \\ \end{array}$$

Finally consider the following three formulas derived from the Fourier convolution $$f(y)=\int\limits_{-\infty}^\infty\delta(x)\ f(y-x)\ dx$$ where all three convolutions were evaluated using formula (1) above for $$\delta(x)$$.

(4) $$\quad e^{-\left|y\right|}=\underset{N,f\to\infty}{\text{lim}}\ 4\sum\limits_{n=1}^N\mu(n)\sum\limits_{k=1}^{f\ n}\frac{1}{4\ \pi^2\ k^2+n^2}\ \left(\left\{ \begin{array}{cc} \begin{array}{cc} n \cos\left(\frac{2\ k\ \pi\ (y+1)}{n}\right)-2\ k\ \pi\ e^{-y} \sin\left(\frac{2\ k\ \pi}{n}\right) & y\geq 0 \\ n \cos\left(\frac{2\ k\ \pi\ (y-1)}{n}\right)-2\ k\ \pi\ e^y \sin\left(\frac{2\ k\ \pi}{n}\right) & y<0 \\ \end{array} \\ \end{array}\right.\right),\ M(N)=0$$

(5) $$\quad e^{-y^2}=\underset{N,f\to\infty}{\text{lim}}\ \sqrt{\pi}\sum\limits_{n=1}^N\frac{\mu(n)}{n}\\\\$$ $$\ \sum\limits_{k=1}^{f\ n}e^{-\frac{\pi\ k\ (\pi\ k+2\ i\ n\ y)}{n^2}}\ \left(\left(1+e^{\frac{4\ i\ \pi\ k\ y}{n}}\right) \cos\left(\frac{2\ \pi\ k}{n}\right)-\sin\left(\frac{2\ \pi\ k}{n}\right) \left(\text{erfi}\left(\frac{\pi\ k}{n}+i\ y\right)+e^{\frac{4\ i\ \pi\ k\ y}{n}} \text{erfi}\left(\frac{\pi\ k}{n}-i\ y\right)\right)\right),\ M(N)=0$$

(6) $$\quad\sin(y)\ e^{-y^2}=\underset{N,f\to\infty}{\text{lim}}\ \frac{1}{2} \left(i \sqrt{\pi }\right)\sum\limits _{n=1}^{\text{nMax}} \frac{\mu(n)}{n}\sum\limits_{k=1}^{f n} e^{-\frac{(2 \pi k+n)^2+8 i \pi k n y}{4 n^2}} \left(-\left(e^{\frac{2 \pi k}{n}}-1\right) \left(-1+e^{\frac{4 i \pi k y}{n}}\right) \cos\left(\frac{2 \pi k}{n}\right)+\right.\\\\$$ $$\left.\sin\left(\frac{2 \pi k}{n}\right) \left(\text{erfi}\left(\frac{\pi k}{n}+i y+\frac{1}{2}\right)-e^{\frac{4 i \pi k y}{n}} \left(e^{\frac{2 \pi k}{n}} \text{erfi}\left(-\frac{\pi k}{n}+i y+\frac{1}{2}\right)+\text{erfi}\left(\frac{\pi k}{n}-i y+\frac{1}{2}\right)\right)+e^{\frac{2 \pi k}{n}} \text{erfi}\left(-\frac{\pi k}{n}-i y+\frac{1}{2}\right)\right)\right),\qquad M(N)=0$$

Formulas (4), (5), and (6) defined above are illustrated in the following three figures where the blue curves are the reference functions, the orange curves represent formulas (4), (5), and (6) above evaluated at $$f=4$$ and $$N=39$$, and the green curves represent formulas (4), (5), and (6) above evaluated at $$f=4$$ and $$N=101$$. The three figures below illustrate formulas (4), (5), and (6) above seem to converge to the corresponding reference function for $$x\in\mathbb{R}$$ as the evaluation limit $$N$$ is increased. Note formula (6) above for $$\sin(y)\ e^{-y^2}$$ illustrated in Figure (4) below seems to converge much faster than formulas (4) and (5) above perhaps because formula (6) represents an odd function whereas formulas (4) and (5) both represent even functions.

Figure (2): Illustration of formula (4) for $$e^{-\left|y\right|}$$ evaluated at $$N=39$$ (orange curve) and $$N=101$$ (green curve) overlaid on the reference function in blue

Figure (3): Illustration of formula (5) for $$e^{-y^2}$$ evaluated at $$N=39$$ (orange curve) and $$N=101$$ (green curve) overlaid on the reference function in blue

Figure (4): Illustration of formula (6) for $$\sin(y)\ e^{-y^2}$$ evaluated at $$N=39$$ (orange curve) and $$N=101$$ (green curve) overlaid on the reference function in blue

Question (1): Is it true formula (1) above is an example of a series representation of the Dirac delta function $$\delta(x)$$?

Question (2): What is the class or space of functions $$f(x)$$ for which the integral $$f(0)=\int\limits_{-\infty}^\infty\delta(x)\ f(x)\ dx$$ and Fourier convolution $$f(y)=\int\limits_{-\infty}^\infty\delta(x)\ f(y-x)\ dx$$ are both valid when using formula (1) above for $$\delta(x)$$ to evaluate the integral and Fourier convolution?

Question (3): Is formula (1) above for $$\delta(x)$$ an example of what is referred to as a tempered distribution, or is formula (1) for $$\delta(x)$$ more general than a tempered distribution?

Formula (1) for $$\delta(x)$$ above is based on the nested Fourier series representation of $$\delta(x+1)+\delta(x-1)$$ defined in formula (7) below. Whereas the Fourier convolution $$f(y)=\int\limits_{-\infty}^\infty\delta(x)\ f(y-x)\ dx$$ evaluated using formula (1) above seems to converge for $$y\in\mathbb{R}$$, Mellin convolutions such as $$f(y)=\int\limits_0^\infty\delta(x-1)\ f\left(\frac{y}{x}\right)\ \frac{dx}{x}$$ and $$f(y)=\int\limits_0^\infty\delta(x-1)\ f(y\ x)\ dx$$ evaluated using formula (7) below typically seem to converge on the half-plane $$\Re(y)>0$$. I'll note that in general formulas derived from Fourier convolutions evaluated using formula (1) above seem to be more complicated than formulas derived from Mellin convolutions evaluated using formula (7) below which I suspect is at least partially related to the extra complexity of the piece-wise nature of formula (1) above.

(7) $$\quad\delta(x+1)+\delta(x-1)=\underset{N,f\to\infty}{\text{lim}}\ 2\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\ n}\cos\left(\frac{2 k \pi x}{n}\right),\quad M(N)=0$$

The conditional convergence requirement $$M(N)=0$$ stated for formulas (1) to (7) above is because the nested Fourier series representation of $$\delta(x+1)+\delta(x-1)$$ defined in formula (7) above only evaluates to zero at $$x=0$$ when $$M(N)=0$$. The condition $$M(N)=0$$ is required when evaluating formula (7) above and formulas derived from the two Mellin convolutions defined in the preceding paragraph using formula (7) above, but I'm not sure it's really necessary when evaluating formula (1) above or formulas derived from the Fourier convolution $$f(y)=\int\limits_{-\infty}^\infty\delta(x)\ f(y-x)\ dx$$ using formula (1) above (e.g. formulas (4), (5), and (6) above). Formula (1) above is based on the evaluation of formula (7) above at $$|x|\ge 1$$, so perhaps formula (1) above is not as sensitive to the evaluation of formula (7) above at $$x=0$$. Formula (1) above can be seen as taking formula (7) above, cutting out the strip $$-1\le x<1$$, and then gluing the two remaining halves together at the origin. Nevertheless I usually evaluate formula (1) above and formulas derived from the Fourier convolution $$f(y)=\int\limits_{-\infty}^\infty\delta(x)\ f(y-x)\ dx$$ using formula (1) above at $$M(N)=0$$ since it doesn't hurt anything to restrict the selection of $$N$$ to this condition and I suspect this restriction may perhaps lead to faster and/or more consistent convergence.

See this answer I posted to one of my own questions on Math StackExchange for more information on the nested Fourier series representation of $$\delta(x+1)+\delta(x-1)$$ and examples of formulas derived from Mellin convolutions using this representation. See my Math StackExchange question related to nested Fourier series representation of $$h(s)=\frac{i s}{s^2-1}$$ for information on the more general topic of nested Fourier series representations of other non-periodic functions.

• Since this question mentions the Mertens function, rather than several analysis tags I would tag it as (analytic) number theory Jun 8, 2020 at 19:52
• @Mizar Thanks for your suggestion. I changed the fourier-transform tag to analytic-number-therory. Jun 8, 2020 at 20:24
• $$\int_{-\infty}^\infty \delta(x)f(y-x)\,dx$$ makes no sense in traditional math (e.g. see encyclopediaofmath.org/wiki/Generalized_function). Sep 30, 2020 at 7:56
• @user64494 $g(x)\to\delta(x)$ if $\forall\,f(x)\in C^\infty_c(\Bbb{R}), \int_{-\infty}^\infty g(x)f(x)dx\to f(0)$. Most representations of $\delta(x)$ are limit representations (e.g. see formulas 34-40 at mathworld.wolfram.com/DeltaFunction.html and functions.wolfram.com/GeneralizedFunctions/DiracDelta/09). Formula (1) above is of interest to me because it is a series representation. Oct 1, 2020 at 16:30

$$\sum_k e^{2i\pi kx} = \sum_m \delta(x-m)$$

Convergence in the sense of distributions

$$\lim_{N\to \infty,M(N)=0}\sum_{n=1}^N \frac{\mu(n)}{n} \sum_k e^{2i\pi kx/n} =\lim_{N\to \infty,M(N)=0}\sum_{n=1}^N \mu(n) \sum_n\delta(x-mn)$$ $$=\lim_{N\to \infty,M(N)=0}\sum_{l\ge 1}(\delta(x+l)+\delta(x-l))\sum_{d| l,d\le N} \mu(d) =\delta(x+1)+\delta(x-1)$$

• Can you ground your "Convergence in the sense of distributions". TIA. Sep 30, 2020 at 7:53

I suspect the original formula for $$\delta(x)$$ defined in my question above is not quite correct as the associated derived formula for $$\delta'(x)$$ has a discontinuity at $$x=0$$. The definition of $$\delta(x)$$ in formula (1) below eliminates the piecewise nature of my original formula which resolves this problem and also seems to provide simpler results for formulas derived via the Fourier convolution defined in formula (2) below. The formula for $$\delta(x)$$ defined in formula (1) below also seems to provide the ability to derive formulas for a wider range of functions via the Fourier convolution defined in formula (2) below. The evaluation limit $$f$$ in formula (1) below is the evaluation frequency and assumed to be a positive integer. When evaluating formula (1) below (and all formulas derived from it) the evaluation limit $$N$$ must be selected such that $$M(N)=0$$ where $$M(x)$$ is the Mertens function. Formula (1) is illustrated in Figure (1) further below. I believe the series representation of $$\delta(x)$$ defined in formula (1) below converges in a distributional sense.

(1) $$\quad\delta(x)=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\sum\limits_{n=1}^N\frac{\mu(n)}{n}\left(\sum\limits_{k=1}^{f\ n}\left(\cos\left(\frac{2 \pi k (x-1)}{n}\right)+\cos\left(\frac{2 \pi k (x+1)}{n}\right)\right)-\frac{1}{2}\sum\limits_{k=1}^{2\ f\ n}\cos\left(\frac{\pi k x}{n}\right)\right)$$

(2) $$\quad g(y)=\int\limits_{-\infty}^\infty\delta(x)\,g(y-x)\,dx$$

Formula (1) for $$\delta(x)$$ above leads to formulas (3a) and (3b) for $$\theta(x)$$ below (illustrated in Figures (2) and (3) further below) and formula (4) for $$\delta'(x)$$ below (illustrated in Figure (4) further below). Note formula (3b) for $$\theta(x)$$ below contains a closed form representation of the two nested sums over $$k$$ in formula (3a) for $$\theta(x)$$ below.

(3a) $$\quad\theta(x)=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\frac{1}{2}+\frac{1}{\pi}\sum\limits_{n=1}^N\mu(n)\left(\sum\limits_{k=1}^{f\ n}\frac{\cos\left(\frac{2 \pi k}{n}\right) \sin\left(\frac{2 \pi k x}{n}\right)}{k}-\frac{1}{2}\sum\limits_{k=1}^{2\ f\ n} \frac{\sin\left(\frac{\pi k x}{n}\right)}{k}\right)$$

(3b) $$\quad\theta(x)=\underset{\underset{M(N)=0}{N\to\infty}}{\text{lim}}\quad\frac{1}{2}+\frac{i}{4 \pi}\sum\limits_{n=1}^N\mu(n) \left(\log\left(1-e^{\frac{2 i \pi (x-1)}{n}}\right)-\log\left(1-e^{\frac{i \pi x}{n}}\right)+\log\left(1-e^{\frac{2 i \pi (x+1)}{n}}\right)-\log\left(1-e^{-\frac{2 i \pi (x-1)}{n}}\right)+\log\left(1-e^{-\frac{i \pi x}{n}}\right)-\log\left(1-e^{-\frac{2 i \pi (x+1)}{n}}\right)\right)$$

(4) $$\quad\delta'(x)=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\pi\sum\limits_{n=1}^N\frac{\mu(n)}{n^2}\left(\sum\limits_{k=1}^{f\ n} -2 k \left(\sin \left(\frac{2 \pi k (x-1)}{n}\right)+\sin \left(\frac{2 \pi k (x+1)}{n}\right)\right)+\frac{1}{2}\sum\limits_{k=1}^{2\ f\ n} k\ \sin\left(\frac{\pi k x}{n}\right)\right)$$

The following formulas are derived from the Fourier convolution defined in formula (2) above using the series representation of $$\delta(x)$$ defined in formula (1) above. All of the formulas defined below seem to converge for $$x\in\mathbb{R}$$. Note one of the two nested sums over $$k$$ in formula (6) below for $$e^{-y^2}$$ has a closed form representation. Both of the nested sums over $$k$$ in formulas (5), (8), and (9) below have closed form representations which were not included below because they're fairly long and complex.

(5) $$\quad e^{-|y|}=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\sum\limits_{n=1}^N\mu(n)\ n\left(\sum\limits_{k=1}^{f\ n}\frac{2 \left(\cos\left(\frac{2 \pi k (y-1)}{n}\right)+\cos\left(\frac{2 \pi k (y+1)}{n}\right)\right)}{4 \pi^2 k^2+n^2}-\sum\limits_{k=1}^{2\ f\ n}\frac{\cos\left(\frac{\pi k y}{n}\right)}{\pi^2 k^2+n^2}\right)$$

(6) $$\quad e^{-y^2}=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\sqrt{\pi}\sum\limits_{n=1}^N\frac{\mu(n)}{n}\left(\sum\limits_{k=1}^{f\ n} e^{-\frac{\pi^2 k^2}{n^2}} \left(\cos\left(\frac{2 \pi k (y-1)}{n}\right)+\cos\left(\frac{2 \pi k (y+1)}{n}\right)\right)-\frac{1}{4}\sum\limits_{k=1}^{2\ f\ n} \left(e^{-\frac{\pi k (\pi k+4 i n y)}{4 n^2}}+e^{-\frac{\pi k (\pi k-4 i n y)}{4 n^2}}\right)\right)$$

$$\qquad\quad=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\sqrt{\pi}\sum\limits_{n=1}^N\frac{\mu (n)}{n}\left(\frac{1}{2} \left(\vartheta_3\left(\frac{\pi (y-1)}{n},e^{-\frac{\pi^2}{n^2}}\right)+\vartheta_3\left(\frac{\pi (y+1)}{n},e^{-\frac{\pi^2}{n^2}}\right)-2\right)-\frac{1}{4} \sum\limits_{k=1}^{2\ f\ n} \left(e^{-\frac{\pi k (\pi k+4 i n y)}{4 n^2}}+e^{-\frac{\pi k (\pi k-4 i n y)}{4 n^2}}\right)\right)$$

(7) $$\quad\sin(y)\ e^{-y^2}=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\sqrt{\pi } \sum\limits_{n=1}^N\frac{\mu (n)}{n}\left(2 \sum\limits_{k=1}^{f\ n} e^{-\frac{\pi^2 k^2}{n^2}-\frac{1}{4}} \cos\left(\frac{2 \pi k}{n}\right) \sinh\left(\frac{\pi k}{n}\right) \sin\left(\frac{2 \pi k y}{n}\right)-\frac{1}{2}\sum\limits_{k=1}^{2\ f\ n} e^{-\frac{\pi^2 k^2}{4 n^2}-\frac{1}{4}} \sinh\left(\frac{\pi k}{2 n}\right) \sin\left(\frac{\pi k y}{n}\right)\right)$$

(8) $$\quad\frac{1}{y^2+1}=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\pi\sum\limits_{n=1}^N\frac{\mu (n)}{n}\left(2 \sum\limits_{k=1}^{f\ n} e^{-\frac{2 \pi k}{n}} \cos\left(\frac{2 \pi k}{n}\right) \cos\left(\frac{2 \pi k y}{n}\right)-\frac{1}{2}\sum\limits_{k=1}^{2\ f\ n} e^{-\frac{\pi k}{n}} \cos\left(\frac{\pi k y}{n}\right)\right)$$

(9) $$\quad\frac{y}{y^2+1}=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\quad\pi\sum\limits_{n=1}^N\frac{\mu(n)}{n}\left(2\sum\limits_{k=1}^{f\ n} e^{-\frac{2 \pi k}{n}} \cos\left(\frac{2 \pi k}{n}\right) \sin\left(\frac{2 \pi k y}{n}\right)-\frac{1}{2}\sum\limits_{k=1}^{2\ f\ n} e^{-\frac{\pi k}{n}} \sin\left(\frac{\pi k y}{n}\right)\right)$$

The remainder of this answer illustrates formula (1) for $$\delta(x)$$ above and some of the other formulas defined above all of which were derived from formula (1). The observational convergence of these derived formulas provides evidence of the validity of formula (1) above.

Figure (1) below illustrates formula (1) for $$\delta(x)$$ evaluated at $$f=4$$ and $$N=39$$. The discrete portion of the plot illustrates formula (1) for $$\delta(x)$$ evaluates exactly to $$2 f$$ times the step size of $$\theta(x)$$ at integer values of $$x$$ when $$|x|.

Figure (1): Illustration of formula (1) for $$\delta(x)$$

Figure (2) below illustrates the reference function $$\theta(x)$$ in blue and formulas (3a) and (3b) for $$\theta(x)$$ in orange and green respectively where formula (3a) is evaluated at $$f=4$$ and formulas (3a) and (3b) are both evaluated at $$N=39$$.

Figure (2): Illustration of formulas (3a) and (3b) for $$\theta(x)$$ (orange and green)

Figure (3) below illustrates the reference function $$\theta(x)$$ in blue and formula (3b) for $$\theta(x)$$ evaluated at $$N=39$$ and $$N=101$$ in orange and green respectively.

Figure (3): Illustration of formula (3b) for $$\theta(x)$$ evaluated at $$N=39$$ and $$N=101$$ (orange and green)

Figures (2) and (3) above illustrate formulas (3a) and (3b) above evaluate at a slope compared to the reference function $$\theta(x)$$, and Figure (3) above illustrates the magnitude of this slope decreases as the magnitude of the evaluation limit $$N$$ increases. This slope is given by $$-\frac{3}{4}\sum\limits_{n=1}^N\frac{\mu(n)}{n}$$ which corresponds to $$-0.0378622$$ at $$N=39$$ and $$-0.0159229$$ at $$N=101$$. Since $$-\frac{3}{4}\sum\limits_{n=1}^\infty\frac{\mu(n)}{n}=0$$, formulas (3a) and (3b) above converge to the reference function $$\theta(x)$$ as $$N\to\infty$$ (and as $$f\to\infty$$ for formula (3a)).

Figure (4) below illustrates formula (4) for $$\delta'(x)$$ above evaluated at $$f=4$$ and $$N=39$$. The red discrete portion of the plot illustrates the evaluation of formula (4) for $$\delta'(x)$$ at integer values of $$x$$.

Figure (4): Illustration of formula (4) for $$\delta'(x)$$

Figure (5) below illustrates the reference function $$\frac{y}{y^2+1}$$ in blue and formula (9) for $$\frac{y}{y^2+1}$$ above evaluated at $$f=4$$ and $$N=101$$.

Figure (5): Illustration of formula (9) for $$\frac{y}{y^2+1}$$

My question above, original answer, and this new answer are all based on analytic formulas for

$$u(x)=-1+\theta(x+1)+\theta(x-1)\tag{1}\,.$$

and

$$u'(x)=\delta(x+1)+\delta(x-1)\tag{2}\,.$$

My question and original answer are both based on the analytic formula

$$u'(x)=\delta(x+1)+\delta(x-1)=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\left(\sum\limits_{n=1}^N\frac{\mu(n)}{n}\,\left(1+2\sum\limits_{k=1}^{f\,n}\cos\left(\frac{2\,\pi\,k\,x}{n}\right)\right)\right)\tag{3}$$

where the evaluation frequency $$f$$ is assumed to be a positive integer and

$$M(N)=\sum\limits_{n=1}^N \mu(n)\tag{4}$$

is the Mertens function.

Formula (3) above simplifies to

$$u'(x)=\delta(x+1)+\delta(x-1)=\underset{\underset{M(N)=0}{N,f\to\infty}}{\text{lim}}\left(2\sum\limits_{n=1}^N\frac{\mu(n)}{n}\sum\limits_{k=1}^{f\ n}\cos\left(\frac{2 k \pi x}{n}\right)\right)\tag{5}$$

since

$$\sum\limits_{n=1}^\infty\frac{\mu(n)}{n}=\frac{1}{\zeta(1)}=0\,.\tag{6}$$

I originally defined formulas (3) and (5) above in this answer I posted to one of my own questions on Math StackExchange.

The formula in my question above wasn't quite right as it wasn't a smooth function at $$x=0$$ (there's a discontinuity in the first-order derivative corresponding to $$\delta'(x)$$). My original answer fixed this problem but still required the upper evaluation limit $$N$$ be selected such that $$M(N)=0$$.

This new answer is based on the analytic formula

$$u'(x)=\delta(x+1)+\delta(x-1)=\underset{N,f\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N \mu(n) \left(-2 f \text{sinc}(2 \pi f x)+\frac{1}{n}\sum\limits_{k=1}^{f\,n} \left(\cos\left(\frac{2 \pi (k-1) x}{n}\right)+\cos\left(\frac{2 \pi k x}{n}\right)\right)\right)\right)=\underset{N,f\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N \mu(n) \left(-2 f\,\text{sinc}(2 \pi f x)+\frac{\sin(2 \pi f x) \cot\left(\frac{\pi x}{n}\right)}{n}\right)\right)\tag{7}$$

which no longer requires $$N$$ to be selected such that $$M(N)=0$$.

Formula (7) above is a result related to this answer I posted to another one of my questions on Math Overflow and this answer I posted to a related question on Math StackExchange.

I believe formula (7) above is exactly equivalent to

$$u'(x)=\delta(x+1)+\delta(x-1)=\underset{f\to\infty}{\text{lim}}\left(2 f\ \text{sinc}(2 \pi f (x+1))+2 f\ \text{sinc}(2 \pi f (x-1))\right)\tag{8}$$

in that formulas (7) and (8) above both have the same Maclaurin series.

My original answer and this new answer are based on the relationship

$$\delta(x)=\frac{1}{2}\left(u'(x+1)+u'(x-1)-\frac{1}{2} u'\left(\frac{x}{2}\right)\right)\tag{9}$$

which using formula (7) above for $$u'(x)$$ leads to

$$\delta(x)=\underset{N,f\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N\mu(n) \Bigg(f (-\text{sinc}(2 \pi f (x+1))-\text{sinc}(2 \pi f (x-1))+\text{sinc}(2 \pi f x))+\right.$$ $$\left.\frac{1}{2 n}\left(\sum\limits_{k=1}^{f\,n}\left(\cos\left(\frac{2 \pi (k-1) (x+1)}{n}\right)+\cos\left(\frac{2 \pi k (x+1)}{n}\right)+\cos\left(\frac{2 \pi (k-1) (x-1)}{n}\right)+\cos\left(\frac{2 \pi k (x-1)}{n}\right)\right)-\frac{1}{2} \sum\limits_{k=1}^{2 f\,n}\left(\cos\left(\frac{\pi (k-1) x}{n}\right)+\cos\left(\frac{\pi k x}{n}\right)\right)\right)\Bigg)\right)$$

$$=\underset{N,f\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N\mu(n)\left(f (-\text{sinc}(2 \pi f (x+1))-\text{sinc}(2 \pi f (x-1))+\text{sinc}(2 \pi f x))+\frac{\sin(2 \pi f (x+1)) \cot\left(\frac{\pi (x+1)}{n}\right)+\sin(2 \pi f (x-1)) \cot\left(\frac{\pi (x-1)}{n}\right)-\frac{1}{2} \sin(2 \pi f x) \cot\left(\frac{\pi x}{2 n}\right)}{2 n}\right)\right)\tag{10}$$

I believe the formula (10) above is exactly equivalent to the integral representation

$$\delta(x)=\underset{f\to\infty}{\text{lim}}\left(\int\limits_{-f}^f e^{2 i \pi t x}\,dt\right)=\underset{f\to\infty}{\text{lim}}\left(2 f\ \text{sinc}(2 \pi f x)\right)\tag{11}$$

in that formulas (10) and (11) above both have the same Maclaurin series.

Now consider the slightly simpler analytic formula

$$u'(x)=\delta(x+1)+\delta(x-1)=\underset{N,f\to\infty}{\text{lim}}\left(\sum\limits_{n=1}^N\frac{\mu(2 n-1)}{2 n-1}\left(\frac{1}{2}+\sum\limits_{k=1}^{2 f (2 n-1)} (-1)^k \cos\left(\frac{\pi k x}{2 n-1}\right)\right)\right)=\underset{N,f\to\infty}{\text{lim}}\left(\frac{1}{2}\sum\limits_{n=1}^N\frac{\mu(2 n-1)}{2 n-1} \sec\left(\frac{\pi x}{4 n-2}\right) \cos\left(\pi x \left(2 f+\frac{1}{4 n-2}\right)\right)\right)\tag{12}$$

which also no longer requires $$N$$ to be selected such that $$M(N)=0$$.

I believe formula (12) above is exactly equivalent to formulas (7) and (8) above in that all three formulas have the same Maclaurin series.

The Maclaurin series terms for formula (12) above can be derived based on the relationship

$$\sum\limits_{n=1}^\infty\frac{\mu(2 n-1)}{(2 n-1)^s}=\frac{1}{\lambda(s)}\,,\quad\Re(s)\ge 1\tag{13}$$

where $$\lambda(s)=\left(1-2^{-s}\right)\,\zeta(s)$$ is the Dirichlet lambda function. I believe formula (13) above is valid for $$\Re(s)>\frac{1}{2}$$ assuming the Riemann hypothesis.

The relationship in formula (9) above and formula (12) for $$u'(x)$$ above leads to

$$\delta(x)=\underset{N,f\to\infty}{\text{lim}}\left(\frac{1}{2}\sum\limits_{n=1}^N\frac{\mu(2 n-1)}{2 n-1}\left(\frac{3}{4}+\sum\limits_{k=1}^{2 f (2 n-1)} (-1)^k \left(\cos\left(\frac{\pi k (x+1)}{2 n-1}\right)+\cos\left(\frac{\pi k (x-1)}{2 n-1}\right)\right)\right.\right.$$ $$\left.\left.-\frac{1}{2}\sum\limits_{k=1}^{4 f (2 n-1)} (-1)^k \cos\left(\frac{\pi k x}{2 (2 n-1)}\right)\right)\right)$$

$$=\underset{N,f\to\infty}{\text{lim}}\left(\frac{1}{4}\sum\limits_{n=1}^N\frac{\mu(2 n-1)}{2 n-1} \left(\sec\left(\frac{\pi (x+1)}{4 n-2}\right) \cos\left(\pi (x+1) \left(2 f+\frac{1}{4 n-2}\right)\right)+\sec\left(\frac{\pi (x-1)}{4 n-2}\right) \cos\left(\pi (x-1) \left(2 f+\frac{1}{4 n-2}\right)\right)-\frac{1}{2} \sec\left(\frac{\pi x}{2 (4 n-2)}\right) \cos\left(\frac{1}{2} \pi x \left(4 f+\frac{1}{4 n-2}\right)\right)\right)\right)\tag{14}$$

which I believe is exactly equivalent to formula (10) above and the integral representation in formula (11) above in that all three formulas have the same Maclaurin series.