$B_N(x)=\sum_{n=1}^N\cos nx$
$$\sin(A+B)-\sin(A-B)=\sin A\cos B-\cos A\sin B-\sin A\cos B+\cos A\sin B=2\sin B\cos A$$
$$\sin(x/2)\sum_{n=1}^N\cos(nx)=\frac{1}{2}\sum_{n=1}^N\left(\sin(nx+x/2)-\sin(nx-x/2)\right)$$
כמעט הכל מצטמצם ונשאר:
$$2\sin(x/2)\sum_{n=1}^N\cos(nx)=\sin(Nx+x/2)-\sin(x-x/2)$$
$$\sum_{n=1}^N\cos(nx)=\frac{\sin(Nx+x/2)-\sin(x/2)}{2\sin(x/2)}$$