Where did we get the DC term of the Accumulator from DTFT? Define $y[n]:=\displaystyle\sum_{m=-\infty}^{n}x[m]$. The DTFT is found as follows:
\begin{align*}
y[n]&amp;=\sum_{m=-\infty}^{n}x[m]\\ \\
&amp;=\sum_{m=-\infty}^{n-1}x[m]+x[n]\\ \\
&amp;=y[n-1]+x[n]\\ \\
\implies x[n]&amp;=y[n]-y[n-1]
\end{align*}
Therefore, applying DTFT :
\begin{align*}
\mathcal{F}\{x\}[n]=X(e^{j\omega})&amp;=\mathcal{F}\{y[n]-y[n-1]\}\\ \\
&amp;=(1-e^{-j\omega})Y(e^{j\omega})
\end{align*}
Hence :
$$
Y(e^{j\omega})=\frac{1}{1-e^{-j\omega}}X(e^{j\omega})
$$
However, the correct answer is :
$$
\frac{1}{1-e^{-j\omega}}X(e^{j\omega})+\color{red}{\pi X(e^{j0})\sum_{k=-\infty}^{\infty}\delta(\omega-2k\pi)}
$$
My question is where did the DC term come from and why didn't it work in my derivation?
Note that the equation
$$x[n]=y[n]-y[n-1]\tag{1}$$
doesn't uniquely determine the sequence $y[n]$. If some $y[n]$ satisfies $(1)$, so does $y[n]+c$ with some constant $c$. Consequently, Eq. $(1)$ determines $y[n]$ only up to a constant, which corresponds to a DC term in the frequency domain.
Hence, the equation
$$Y(e^{j\omega})=\frac{X(e^{j\omega})}{1-e^{-j\omega}}\tag{2}$$
is only valid for $\omega\neq 0$, or, more generally, for $\omega\neq 2\pi k$, $k\in\mathbb{Z}$.
The most straightforward way to derive the DTFT of
$$y[n]=\sum_{m=-\infty}^nx[m]\tag{3}$$
is to realize that $y[n]$ is the convolution of $x[n]$ with the unit step sequence $u[n]$, and, consequently, the DTFT of $y[n]$ is given by
$$Y(e^{j\omega})=X(e^{j\omega})U(e^{j\omega})\tag{4}$$
where $U(e^{j\omega})$ is the DTFT of the unit step $u[n]$:
$$U(e^{j\omega})=\pi\delta(\omega)+\frac{1}{1-e^{-j\omega}}\tag{5}$$
Several ways to derive the result $(5)$ are discussed in the answers to this and this question.
Note that in $(5)$ I use $\delta(\omega)$ instead of $\sum_k\delta(\omega-2\pi k)$ to avoid cluttered notation. The fact that the DTFT is always $2\pi$-periodic is understood.