# (in)equivalence of the sine and cosine representations of Dirac comb

Going through these lecture notes, I have seen two representations of the Dirac comb. The first one is obtained through the complex Fourier series of a periodic functions $$f(x)= f(x+L)$$ (see the case of $$L=2\pi$$ in page 27) and in reads as $$\begin{equation} \frac{1}{L} + \frac{2}{L} \sum_{n=1}^\infty \cos (\frac{2n \pi (z-z')}{L} ) = \sum_{m=-\infty}^{\infty} \delta(z-z'-mL) \qquad\qquad (I) \end{equation}$$

The second representation comes from the sine representation of functions that satisfy Dirichlet boundary conditions (see page 32 of the notes) and reads as $$\begin{equation} \frac{2}{\ell} \sum_{n=1}^\infty \sin(\frac{n\pi z}{\ell}) \sin(\frac{n\pi z'}{\ell}) = \sum_{m=-\infty}^\infty \delta(z-z'-2m \ell). \qquad\qquad (II) \end{equation}$$

I am trying to see the equivalence of the l.h.s of these relations, by starting from the l.h.s of the second one and setting $$\ell=L/2$$ and then using trigonometric formulae. Here is what I get: \begin{align} \sum_{m=-\infty}^\infty \delta(z-z'-m L) &\stackrel{(II)}{=} \frac{4}{L} \sum_{n=1}^\infty \sin( \frac{2n\pi z}{L}) \sin(\frac{2n\pi z'}{L})\\ &= \frac{4}{L} \sum_{n=1}^\infty \frac{1}{2} \left[ \cos (\frac{2n\pi (z-z')}{L}) - \cos (\frac{2n\pi (z+z')}{L}) \right]\\ &= \frac{2}{L} \sum_{n=1}^\infty \cos (\frac{2n\pi (z-z')}{L}) -\frac{2}{L} \sum_{n=1}^\infty \cos (\frac{2n\pi (z+z')}{L}) \\ &\stackrel{(I)}{=} \sum_{m=-\infty}^\infty \delta(z-z'-mL) - \sum_{m=-\infty}^\infty \delta(z+z'-mL) \end{align}

which seems to be a contradiction. Am I doing something wrong here, or does this mean these two representations are not equivalent?

Although you've not said what you yourself mean by "equivalent" exactly, you are correct that, as tempered distributions for example, the two infinite sums are not equal.

In some ways, it's even worse than that: the second version, using $$\sin(\pi nx)$$'s, makes best sense as a functional on smooth functions (etc) vanishing at endpoints. A fundamental issue is that these functions with odd $$n$$ are being construed as $$1$$-periodic, even though they are only $$2$$-periodic, and the $$1$$-periodic extensions are not smooth (they have corners!).

Some troubles are already visible if we just look at the two families as orthogonal bases for $$L^2[0,1]$$. The $$\sin(\pi n x)$$ with $$n$$ odd are not finite sums of the others. And the expansion in terms of the $$\sin(\pi nx)$$'s of smooth $$1$$-periodic functions $$f$$ does not converge very well if $$f(0)\not=0$$. The expansion of $$f(x)=1$$ already has this problem.

The latter issues mean that conditions for convergence of those series in any strong sense is problemmatical. Taking duals, the characterizations of periodic distributions by such series expansions are not quite comparable. Perhaps amusingly, computing somewhat naively at the level of expansions of distributions easily overlooks that disconnect, leading to the seeming paradox of your computation. Your first expression is valid for the Dirac comb as a distribution, that is, a continuous functional on smooth functions. The second version (as your computation shows) cannot be that, although it will agree (for example) on smooth functions vanishing to infinite order at integers.

EDIT: in response to comments... Yes, indeed, in an $$L^2$$ sense the Dirichlet boundary conditions (can't really be on $$L^2$$, since pointwise values don't quite make sense... ominous) give the $$\sin(n\pi x)$$ expansion, and Neumann boundary conditions give the analogous cosine expansion. And both (as well as the "smoothly periodic") give orthogonal bases for $$L^2$$. Check.

But at the point that we are interested in smoothness properties of functions, and in how well their various expansions reflect this (meaning that the finite partial sums of the expansions converge to the function in a stronger topology reflecting derivatives...), the happy-naive boundary-value story is inadequate.

Again, observe that the periodicized versions of $$\sin(\pi nx)$$ and $$\cos(\pi nx)$$ are not smooth at the "joints" (EDIT-EDIT: for odd $$n$$). Bad omen.

• I don't seem to understand your point regarding 1-periodic vs 2-periodic. What I understand is that $\sin (n\pi z/L)$ make a basis for an interval $L$ with Dirichlet boundaries, and in that interval they are normal to each other. They do look like the $\sin$ part of a Fourier series with period $2 L$, but maybe this is just incidental? Jul 16 '20 at 23:37
• Also, for an interval $L$ with Neumann boundaries, the basis are $\cos(n \pi z /L)$ and this can be used to reproduce the first equality in my question. So I don't see how one of those two equalities could be more 'general' than the other. Jul 16 '20 at 23:40
• The issue is a bit tricky, and apparently I've failed to explain... :) I'll edit the answer, since it's likely that I've equally badly failed to communicate to others... Thanks for the prompt! Jul 16 '20 at 23:40
• Ok thank you :) and one more thing is that since these equalities involve infinite series, I was wondering if any of the steps I have taken are actually not allowed - causing the paradox Jul 16 '20 at 23:44
• Well, the assertion that Dirac delta is "equal to" a certain expansion is only correct inside a certain topological vector space... which is not exactly the space of distributions. So, yeah, comparing the two expressions is itself not legit. To say exactly why not is far more complicated than the manipulation of the formulas, unfortunately. Right, "in some sense" both expressions are correct, but those senses do not admit the naive comparison that your computation embodies. Jul 16 '20 at 23:47
1. Yes, OP is correct: The Dirac comb/Shah function $$III_{2\ell}(z-z^{\prime})\tag{P}$$ in OP's eq. (II) [or equivalently, eq. (2.145) in the linked lectures by Kevin Cahill] should be$$^1$$ $$III_{2\ell}(z-z^{\prime})-III_{2\ell}(z+z^{\prime}),\tag{D}$$ where $$z,z^{\prime}\in\mathbb{R}.$$

2. The link considers a problem on an interval $$I=[0,\ell]$$ with vanishing Dirichlet boundary conditions. This is equivalent to an $$\mathbb{Z}_2$$-orbifold $$\mathbb{S}^1/\mathbb{Z}_2$$, where the circle $$\mathbb{S}^1\cong\mathbb{R}/\mathbb{Z}$$ has circumference $$2\ell$$, and functions of the problem should obey $$-f(-z)~=~f(z)~=~f(z+2\ell), \qquad z~\in~\mathbb{R}.$$ See also the method of images.

--

$$^1$$ If we restrict to $$0\leq z,z^{\prime}\leq \ell$$, the second term only affects boundary points. E.g. OP's eq. (II) is clearly not satisfied at the point $$z=0=z^{\prime}$$. However since the Dirac comb is a distribution note that all evaluations should strictly speaking be done with the help of test functions.

• It's actually these boundary points that are confusing. One thing is that the $\sin$ expression is obtained for an interval $[0,L]$ or maybe $(0,L)$, which in principal can only give a $\delta$ function in the same interval. So I don't fully understand how can it be extended to form a Dirac comb? For the $\cos$ expression, eq 2.113 in the notes is utilised to get the Dirac comb, but I don't think the same works for the $\sin$ series. Am I right? Jul 17 '20 at 12:56
• On the other hand, these completeness / closures identities, with only one $\delta$ instead of a Dirac comb, are also familiar from electrostatics. See for example chapter 2 of Jackson. In my 1999 ed, there is a section on orthogonal functions and expansions where it is stated that $\sum_n U_n^*(\xi') U_n(\xi) = \delta (\xi' - \xi)$ and $U_n$'s form the orthonormal basis... Jul 17 '20 at 13:01
• ...If one takes this, then both expressions $I$ and $II$ should be valid with only $m=0$, however for different boundary conditions. Jul 17 '20 at 13:03
• Regarding the method of images: I am somewhat familiar with this from electrostatics and from diffusion problems. As far as I know, you can convert a solution obtained from the method of images to that obtained from eigenfunction decomposition, using something like Poisson summation formula. Doing this essentially looks like you take an arbitrary source, use the images to obtain the solution with required BCs, then if you use the Poisson summation it suddenly looks like you have decomposed the original source on a basis that satisfies the BCs... Jul 17 '20 at 13:07
• ... While this effectively neglects those modes in the source term that do not satisfy the boundary conditions (because, for example, their projection on the basis that satisfies the BC is zero), the method of images doesn't seem to have this issue - and I suspect this point is also related to the question above. Jul 17 '20 at 13:11