Show that for $0This a question from Fourier Series:
Show that for $0<x<\pi$
$x(\pi-x)=\frac{\pi^2}{6}-\big(\frac{\cos2x}{1^2}+\frac{\cos4x}{2^2}+\frac{\cos6x}{3^2}+.....\big)$
First of all, the interval given is an open interval i.e. $(0,\pi)$, but I have read that Fourier Series are only applicable for closed intervals. Then how can I solve this question using Fourier Series ?
Finding out the Fourier coefficients considering the interval $[-\pi,\pi]$, I have calculated the following:
$a_{0}=-\frac{\pi^2}{3}$
$a_{k}=\frac{4(-1)^{k+1}}{k^2},\forall k=1,2,3....$
$b_k=\frac{2(-1)^{k+1}}{k},\forall k=1,2,3,....$
But I think all this not useful in this question as the interval given is different. Also, even if I consider the Fourier series in the interval $[0,\pi]$, then also I will not be able to write the equality ($=$) sign in the equality to be shown in the question because equality means the series converges to the function $x(\pi-x)$ and for convergence of the Fourier series, the initial assumption is that the given function is a periodic function of periodicity $2\pi$. But here the function $x(\pi-x)$ is defined over a period of $\pi$.
Can anyone help me out here ? I will be highly grateful.,

Hint: You can use :Fourier expansion  of $f(x)=|x|$ which is:
$$|x|=\frac{\pi}2-\frac{4}{\pi}\big(\frac{  cos x}{1^2}+\frac{  cos 3x}{3^2}+ . . . \frac{  cos (2n-1)x}{(2n+1)^2}+ . . .\big)$$; $(-\pi≤x≤\pi)$
$f(x)=|x|=\frac{\pi^2}8$ for $x=±\pi$ or $x=0$
And that of function $f(x)=x^2$  which is:
$$x^2=\frac{\pi^2}{3}-4\big[\frac{cos x}{1^2}-\frac{cos 2x}{2^2}+\frac{cos 3x}{3^2}-\frac{cos 4x}{4^2} . . .\big]$$; $(-\pi, \pi)$
$f(x^2)=\frac{\pi^2}6$ for $x=\pi$
