Proving $\sum_{n=1}^{\infty }\frac{\cos(n)}{n^4}=\frac{\pi ^4}{90}-\frac{\pi ^2}{12}+\frac{\pi }{12}-\frac{1}{48}$

Start with : $$\tag{1}f(x):=\sum_{n=1}^{\infty }\frac{\cos(n\,x)}{n^4}$$ and observe that (from the "Sawtooth Wave" Fourier series with $L=2\pi$ and $x=2X$) : $$\tag{2}f^{(3)}(x)=\sum_{n=1}^{\infty }\frac{\sin(n\,x)}{n}=\frac{\pi-x}2,\quad \text{for}\;x\in(0,2\pi)$$

At this point it remains only to integrate $(2)$ three times with the appropriate constant of integration :

$$\tag{3}f^{(2)}(x)=\sum_{n=1}^{\infty }\frac{-\cos(n\,x)}{n^2}=C+\frac{\pi}2x-\frac 14x^2$$ with $\;\displaystyle C=f^{(2)}(0)=-\zeta(2)=-\frac{\pi^2}6$. $$\tag{4}f'(x)=\sum_{n=1}^{\infty }\frac{-\sin(n\,x)}{n^3}=-\frac{\pi^2}6x+\frac{\pi}4x^2-\frac 1{12}x^3$$ (since $f'(0)=0$) and the final solution : $$\tag{5}f(x)=\sum_{n=1}^{\infty }\frac{\cos(n\,x)}{n^4}=\zeta(4)-\frac{\pi^2}{12}x^2+\frac{\pi}{12}x^3-\frac 1{48}x^4,\quad \text{for}\;x\in(0,2\pi)$$ Of course $x=1$ and $\zeta(4)=\dfrac{\pi^4}{90}$ will return the wished conclusion.

Generalization

It is clear that $\;\displaystyle\sum_{n=1}^{\infty }\frac{\cos(n\,x)}{n^{2m}}\;$ and $\;\displaystyle\sum_{n=1}^{\infty }\frac{\sin(n\,x)}{n^{2m-1}}\;$ may be evaluated by this method for $x\in(0;2\pi)$ and $m$ any positive integer. The polynomials obtained are well known since they correspond to the Bernoulli polynomials as given in Abramowitz and Stegun $(23.1.18)$ and $(23.1.17)$.

The remaining cases $\;\displaystyle\sum_{n=1}^{\infty }\frac{\cos(n\,x)}{n^{2m-1}}\;$ and $\;\displaystyle\sum_{n=1}^{\infty }\frac{\sin(n\,x)}{n^{2m}}\;$ are not so easy to evaluate and got the name of Clausen functions $\;\operatorname{Cl}_{2m-1}(x)\;$ and $\;\operatorname{Cl}_{2m}(x)$.

The origin of the difficulty is that $\;\displaystyle\operatorname{Cl}_1(x):=\sum_{n=1}^{\infty }\frac{\cos(n\,x)}{n}=-\ln(2\,\sin(x/2))\;$ (see for example here) implying that the integrals will be harder to evaluate (except for specific fractions of $\pi$).