The alternating Fourier series associated with the fourth Bernoulli polynomial The Fourier series $\sum_{n\in\mathbb Z\setminus \{0\}} \frac{\cos(2\pi n t)}{n^4}$ converges on $[0,1]$ to
$-\frac{2^4}{4!}\pi^4B_4(t)$, where $B_4(t)=t^4-2t^3+t^2-1/30$ is the fourth Bernoulli polynomial.
Is the function represented on $[0,1]$ by the alternating version $ \sum_{n\in\mathbb Z\setminus \{0\}}(-1)^n \frac{\cos(2\pi n t)}{n^4}$ also a polynomial? It surely consists of a polynomial on $[0,1/2]$ and  one on $[1/2,1]$.
 A: Let $$f_4(t):=\sum_{n>0} 2\frac{\cos(2\pi n t)}{n^4}$$
and
$$g_4(t):=\sum_{n>0} (-1)^n 2\frac{\cos(2\pi n t)}{n^4}$$
You are right: the expression of $g_4(t)$ on $[0,1]$ is the piecewise polynomial
$$\begin{cases}-\frac{2^4}{4!}\pi^4B_4(t+\tfrac12)&\text{for}&0 \le t \le \tfrac12\\
-\frac{2^4}{4!}\pi^4B_4(t-\tfrac12)&\text{for}&\tfrac12 \le t \le 1\end{cases}$$
This is because $$g_4(t)=f_4(t+\tfrac12)\tag{1}$$
due to the fact that:
$$(-1)^n \cos (2 \pi n t) = \cos(2 \pi n t +n \pi)=\cos(2 \pi n( t + \tfrac12))$$
In fact, (1) is not restricted to $t \in [0,1]$. It is valid for any $t$. Here is a graphical verification that can be followed on the Matlab program below:

Fig.1: Top graphics: the initial Fourier series $f$ (in blue) in perfect coincidence with the graphical representation of $B_4(t)$ (red curve) for  $t \in [0,1]$ and $B_4(t-1)$ (magenta curve) for $t \in [1,2]$. Bottom graphics: The same for Fourier series $g$ with the $\tfrac12$ shift given by (1) .
    t=0:0.01:4;
    p=4;
    K=-((2*pi)^4)/factorial(4);
    B4=@(t)(K*(t.^4-2*t.^3+t.^2-1/30));
    %
    subplot(2,1,1);% top graphics begins here
    hold on;grid on
    axis([0,4,-2.5,2.5]);
    f=0;
    for k=1:10;
       f=f+2*cos(2*pi*k*t)/k^e;
    end;
    plot(t,f,'b')
    t1=0:0.01:1;plot(t1,B4(t1),'r');% red curve on [0,1]
    t2=1:0.01:2;plot(t2,B4(t2-1),'m');% magenta curve on [1,2]
    plot([0,5],[0,0],'k');
    %
    subplot(2,1,2);% bottom graphics begins here
    hold on;grid on
    axis([0,4,-2.5,2.5]);
    g=0;
    for k=1:10;
       g=g+2*((-1)^k)*cos(2*pi*k*t)/k^e;
    end;
    plot(t,g,'linesmoothing','on')
    t1=0.5:0.01:1.5;plot(t1,B4(t1-1/2),'r');% red curve on [1/2,3/2]
    t2=1.5:0.01:2.5;plot(t2,B4(t2-3/2),'m');% magenta curve on [3/2,5/2]
    plot([0,4],[0,0],'k');

Remarks:

*

*This could be done for any $B_p$, not uniquely $B_4$, by comparison with

$$f_p(t):=\sum_{n>0} 2\frac{\cos(2\pi n t-p \tfrac{\pi}{2})}{n^p}$$


*Look how close the graphical representation of $f$ is close to the representation of function $h$ defined by $h(t)=2 \cos(\pi t)$.

A: It is not a polynomial on $[0,1]$, since $B_4(t+1/2)=t^4-\frac{1}{2}t^2+\frac{7}{240}$ on $[0,\frac{1}{2}]$ and $B_4(t-\frac{1}{2})=t^4-4t^3+\frac{11}{2}t^2-3t+\frac{127}{240}$ on $[\frac{1}{2}, 1]$
