$$
f(x) = x\left(\pi^{2} - x^{2} \right) \qquad \Rightarrow \qquad f'(x) = \pi^{2}-3x^{2}
$$
A: Fourier series of derivative $\ f'(x) = \pi^{2}-3x^{2}$
The derivative has even parity and will be a sum of cosines.
The Fourier amplitudes are computed via
$$
\begin{align}
a_{0} &= \frac{1}{\pi} \int_{-\pi }^{\pi } f'(x) dx \\
%
a_{k} &= \frac{1}{\pi} \int_{-\pi }^{\pi } f'(x) \cos (k x) dx \\
%
b_{k} &= \frac{1}{\pi} \int_{-\pi }^{\pi } f'(x) \sin (k x) dx
\end{align}
$$
There are two basic integrals:
$$
\begin{align}
%
\int_{-\pi }^{\pi } \cos (k x) dx &=
0 \\
%
\int_{-\pi }^{\pi } x^{2} \cos (k x) dx &=
\left( -1 \right)^{k+1}\frac{4\pi}{k^{2}} \\
%
\end{align}
$$
The Fourier amplitudes for the derivative are
$$
\begin{align}
%
a_{0} &= 0 \\
%
a_{k} &= \left( -1 \right)^{k+1} \frac{12}{k^{2}} \\
%
b_{k} &= 0 \\
%
\end{align}
$$
The approximation of the derivative is
$$
f'(x) = \pi^{2}-3x^{2} =
\sum_{k=1}^{\infty}
a_{k} \cos (kx)
= \color{blue}{\sum_{k=1}^{\infty}
\left( -1 \right)^{k+1} \frac{12}{k^{2}} \cos (kx)}
$$
The plot sequence below provides a quality check on the computation. The parameter $m$ represents the highest value of $k$.
B: Derivative of Fourier series for $\ f(x) = x\left(\pi^{2} - x^{2} \right)$
The derivative has odd parity and will be a sum of sines.
Construct the Fourier series using these building blocks:
$$
\begin{align}
%
\int_{-\pi }^{\pi } x \sin (k x) \, dx &= \left( -1 \right)^{k+1} \frac{2\pi}{k}\\
%
\int_{-\pi }^{\pi } x^{3} \sin (k x) dx &=
\left( -1 \right)^{k+1} \frac{2\pi \left(k^{2}\pi^{2} - 6 \right)}{k^{3}}
%
\end{align}
$$
The Fourier amplitudes are
$$
\begin{align}
%
a_{0} &= 0 \\
%
a_{k} &= 0 \\
%
b_{k} &= (-1)^{k+1}\frac{12 }{k^3} \\
%
\end{align}
$$
The approximation of the function is
$$
f(x) = x\left(\pi^{2} - x^{2} \right)
= \sum_{k=1}^{\infty}
b_{k} \sin (kx)
= \sum_{k=1}^{\infty}
\left( -1 \right)^{k+1} \frac{12}{k^{3}} \sin (kx)
$$
The derivative of the Fourier series is
$$
f'(x)
= \frac{d}{dx} \left( \sum_{k=1}^{\infty}
b_{k} \sin (kx) \right)
= \sum_{k=1}^{\infty}
\frac{d}{dx} \left( b_{k} \sin (kx) \right)
= \color{blue}{\sum_{k=1}^{\infty}
\left( -1 \right)^{k+1} \frac{12}{k^{2}} \cos (kx)}
$$
which matches the series for the derivative term-by-term.