# Help understanding Rudin's proof of Theorem 8.14

I'm reading Baby Rudin, and I don't understand his proof of theorem 8.14. He starts by defining an auxiliary function and then asserts that $\frac{1}{2π}$ times the integral of the Dirichlect kernel on $[-π, π]$ is 1. Good so far. But then I don't know what that integral has to do with the rest of the proof. Furthermore, he finds an expression for $s_N(f; x)-f(x)$ and says that it comes from line 78 (picture included) but I don't know where it came from. What's going on?

He is using that $$\frac1{2\pi}\int_{-\pi}^\pi f(x)\,D_N(t)\,dt =f(x).$$ Note the variables.