const fieldName = "theme"; // Your field with linksconst oldPrefix = "Thoughts/01 Themes/";const newPrefix = "Digital Garden/Topics/";const relatedLinks = dv.current()[fieldName];if (Array.isArray(relatedLinks)) { // Map over the links, replace the path, and output only clickable links dv.el("span", relatedLinks .map(link => { if (link && link.path) { let newPath = link.path.startsWith(oldPrefix) ? link.path.replace(oldPrefix, newPrefix) : link.path; return dv.fileLink(newPath); } }) .filter(Boolean).join(", ") // Remove any undefined/null items );} else { dv.el(dv.current().theme);}
Theorem
For all f∈L2([−π,π]) and all N∈N∪{0},
S_{N}f(x) &= \int _{-\pi}^\pi D_{N}(x-t) f(t) \, dx \\
D_{N}(x) &= \begin{cases}
\frac{2N+1}{2\pi} & x=0 \\
\frac{\sin\left( N+\frac{1}{2} \right)x}{2\pi \sin \frac{x}{2}} & x \neq 0
\end{cases}
\end{align}$$
The function $D_{N}$ is [[Concept Wiki/continuous map\|continuous]] and also smooth and is called the **Dirichlet kernel**.
ie the partial Fourier sum can be written as the integral of f with the Dirichlet kernel
Proof (warmup for some calculations)
For any f∈L2([−π,π]), we know that
S_{N}f(x) &= \sum_{\lvert n \rvert \leq N} \left( \frac{1}{2\pi} \int _{-\pi}^\pi f(t) e^{- i n t} \, dt \right)e^{inx} \\
(*)&= \int _{-\pi}^\pi f(t) \underbrace{\left( \frac{1}{2\pi} \sum_{\lvert n \rvert \leq N} e^{i n (x-t)}\right)}_{D_{N}(x-t)}\, dt \\
\end{align}$$
Where $(*)$ is by [[Concept Wiki/lebesgue integral of sum is sum of the integral\|linearity of the integral]]
$$\begin{align}
D_{N}(x) &= \frac{1}{2\pi} \sum_{\lvert n \rvert \leq N} e^{i n x} \\
&= \frac{1}{2\pi} e^{-i N x} \sum_{n=0}^{2N} e^{i n x} \\
&= \begin{cases}
\frac{1}{2\pi} e^{-i N x} \left[ \frac{1 - e^{i(2N-1)x}}{1-e^{ix}} \right] ,& e^{ix}\neq 1 \iff x\neq 0 \\
\frac{2N+1}{2\pi}, & x=0
\end{cases} \\
&= \begin{cases}
\frac{1}{2\pi} \left[ \frac{e^{i(N + 1/2)x} - e^{i(N+1/2)x}}{e^{ix/2}-e^{-ix/2}} \right] ,& x\neq 0 \\
\frac{2N+1}{2\pi}, & x=0
\end{cases} \\
\left( \sin x = \frac{e^{ix} - e^{-ix}}{2i} \right) \implies&=\begin{cases}
\frac{\sin\left( N+\frac{1}{2} \right)x}{2\pi \sin \frac{x}{2}},& x\neq 0 \\
\frac{2N+1}{2\pi}, & x=0
\end{cases}
\end{align}$$
Which gives us the desired result
$$\tag*{$\blacksquare$}$$