<s>[INST] Is this fourier even? $$
f(x) =
\begin{cases}
\frac{\pi}{4}-\frac{x}{2} & [0,\pi] \\
-\frac{3\pi}{4}+\frac{x}{2}, & (\pi,2\pi)
\end{cases}
$$
Is it right to compute only $a_n \text{ and } a_0$ coefficient for fourier series because $f(x)$ is even for fourier? How can I proove it since $f(x)!=f(-x)$
 [/INST] For $2\pi$-periodic function $f(x)$ defined as:
$$f(x) =
\begin{cases}
\frac{\pi}{4}-\frac{x}{2} & x\in [0,\pi] \\
-\frac{3\pi}{4}+\frac{x}{2}, & x\in(\pi,2\pi)
\end{cases}$$
We can calculate
$$f(2\pi-x) =
\begin{cases}
\frac{\pi}{4}-\frac{2\pi-x}{2} & x\in [\pi,2\pi] \\
-\frac{3\pi}{4}+\frac{2\pi-x}{2}, & x\in (0,\pi)
\end{cases}$$
$$ =
\begin{cases}
\frac{-3\pi}{4}+\frac{x}{2} & x\in [\pi,2\pi] \\
+\frac{1\pi}{4}-\frac{x}{2}, & x\in (0,\pi)
\end{cases}$$
Thus we proved
$$f(2\pi-x)=f(x)\text{   (1)}$$.
Since for $2\pi$-periodic function $f(-x)$ we have
 $$f(-x)= f((-x)+2\pi)=f(2\pi-x)\text{   (2)}$$
Combining (1) and (2), we proved
$$f(x)= f(-x)$$.
Thus the coefficients $b_n$ that go with $\sin(2nx)$ are zero.
</s>