Fourier Series/x over 0 to 2, x-2 over 2 to 4/Mistake

Source Work

 * : Chapter One: $\S 6$. Half-Range Cosine Series: Example $5$

Mistake
Find the half-range cosine series for
 * $f \left({x}\right) = \begin{cases}

1 &, 0 < x < 2 \\ x - 2 &, 2 < x < 4 \end{cases}$ for the half-range $0 < x < 4$.

The subsequent analysis is performed for the function:


 * $f \left({x}\right) = \begin{cases}

x & : 0 < x \le 2 \\ x - 2 & : 2 < x < 4 \end{cases}$

and it is questionable whether it has actually been performed accurately.