<s>[INST] Using Fourier series to prove $-\int_0^1 u_{xxx}u_x \eta = \int_0^1 (u_{xx})^2\eta - \int_0^1 \frac{1}{2} (u_x)^2 \eta_{xx}$ Let $u, \eta$ be smooth functions and $\eta$ compactly supported in $(0,1)$. Integrating by parts, we can easily prove $$-\int_0^1 u_{xxx}u_x \eta = \int_0^1 (u_{xx})^2\eta - \int_0^1 \frac{1}{2} (u_x)^2 \eta_{xx}$$
Can we obtain the same result using only the Fourier series
$$u(x) = \sum_{n=1}^\infty \sqrt 2 \cos (\pi n x) \, a_n, \qquad \eta(x) = \sum_{n=1}^\infty \sqrt 2 \cos (\pi n x) \, b_n $$
as a tool?
 [/INST] term on left hand side:
$$L=-\int_0^1 dx\, u_{xxx}u_x \eta =2^{3/2}\pi^4 \sum_{n,m,k=1}^\infty n^3m a_na_mb_k \int_0^1 dx\,\sin(n\pi x)\sin(m\pi x)\cos(k\pi x)=$$
$$=2^{3/2}\pi^4 \frac{1}{4}\sum_{n,m,k=1}^\infty n^3m a_na_mb_k \left(\delta_{m,n+k}+\delta_{n,m+k}-\delta_{k,n+m}\right).$$
two terms on right hand side
$$R_1=\int_0^1 dx\, u_{xx}^2 \eta =2^{3/2}\pi^4 \sum_{n,m,k=1}^\infty n^2m^2 a_na_mb_k \int_0^1 dx\,\cos(n\pi x)\cos(m\pi x)\cos(k\pi x)=$$
$$=2^{3/2}\pi^4 \frac{1}{4}\sum_{n,m,k=1}^\infty n^2m^2 a_na_mb_k \left(\delta_{m,n+k}+\delta_{n,m+k}+\delta_{k,n+m}\right).$$
$$R_2=-\frac{1}{2}\int_0^1 dx\, u_{x}^2 \eta_{xx} =\frac{1}{2}2^{3/2}\pi^4 \sum_{n,m,k=1}^\infty nmk^2 a_na_mb_k \int_0^1 dx\,\sin(n\pi x)\sin(m\pi x)\cos(k\pi x)=$$
$$=\frac{1}{2}2^{3/2}\pi^4 \frac{1}{4}\sum_{n,m,k=1}^\infty nmk^2 a_na_mb_k \left(\delta_{m,n+k}+\delta_{n,m+k}-\delta_{k,n+m}\right).$$
left hand side minus right hand side
$$L-R_1-R_2=2^{3/2}\pi^4 \frac{1}{4}\left(\frac{1}{2}\sum_{n=1}^\infty\sum_{m=n+1}^\infty (mn^3-nm^3)a_na_m b_{m-n}+\frac{1}{2}\sum_{m=1}^\infty\sum_{n=m+1}^\infty (mn^3-nm^3)a_{n}a_m b_{n-m}\right.$$
$$\left.+\frac{1}{2}\sum_{n,m=1}^\infty m n (m^2 -n^2)a_na_m b_{n+m}\right)=0.$$
</s>