Error Term for Fourier Series? Suppose I have a piecewise smooth $2 \pi$-periodic function $f$ on $\mathbf{R}$ with a Fourier series $\sum_{n \in \mathbf{Z}}a_n e^{inx}$, a number $x_0 \in \mathbf R$, and $N>0$.  I would like an upper bound for
$|f(x_0)-\sum_{n=-N}^N a_n e^{inx_0}|$.  For example, if $f$ is a periodic function so that $f(x)=x$ on $(-\pi,\pi)$, and I require a partial Fourier series which is within $\frac{1}{2}$ of $f(x_0)$ at, say, $x_0=1$, I want to know how far I should go.  Ideally, I would like an answer in the spirit of estimating the error term for Taylor series.

Fourier series have a spirit quite different from Taylor series, as they are nonlocal. They behavior is affected by everything that  goes on  in the domain of definition. To get an explicit estimate, you can   take a proof of pointwise convergence $s_N(f;x)\to f(x)$ and try to make it quantitative. For example, take Theorem 8.14 in Rudin's Principles of Mathematical Analysis (3rd edition): 

Fix $x$ and suppose there are constants $\delta>0$ and $M<\infty$ such that $$|f(x+t)-f(x)| \le M|t|$$ whenever $|t|<\delta$. Then $s_N(f;x)\to f(x)$. 

Proof: Define $$g(t)=\frac{f(x-t)-f(x)}{\sin (t/2)}$$ so that 
$$s_N(f;x)-f(x)= \frac{1}{2\pi}\int_{-\pi}^\pi \left[g(t)\cos \frac{t}{2}\right]\sin Nt\,dt  +  \frac{1}{2\pi}\int_{-\pi}^\pi \left[g(t)\sin \frac{t}{2}\right]\cos Nt\,dt $$
For Rudin, an application of the Riemann-Lebesgue lemma ends the proof here. But that doesn't give an error estimate. 
Instead, integrate by parts, turning the integrals  into 
$$  \frac{1}{2\pi N}\int_{-\pi}^\pi \frac{d}{dt} \left(g(t)\cos \frac{t}{2}\right)\cos Nt\,dt  -  \frac{1}{2\pi N}\int_{-\pi}^\pi \frac{d}{dt}\left(g(t)\sin \frac{t}{2}\right)\sin Nt\,dt $$ 
plus boundary terms (coming from discontinuities of $g$), each of which also has $N$ in the denominator and is bounded by $\sup |g|$. My (rough) estimate is
$$|s_N(f;x)-f(x)|\le \frac{k}{\pi N}\sup |g|+ \frac{1}{N} \sup \left| \left(g(t)\cos \frac{t}{2}\right)' \right| + \frac{1}{N} \sup \left|  \left(g(t)\sin \frac{t}{2}\right)' \right|$$
where $k$ is the number of discontinuities of $g$. Since you know $g$, you can find $N$ that will achieve the required precision.
