Fourier transform, inverse derivative and derivation of PDE Let $f,g$ be $L-$periodic functions, that is $f(x+L,t)=f(x,t)$ and $g(x+L,t)=g(x,t)$ such that
$$\partial_t f=\alpha \partial_x^2 f+\partial^2_x(\vert g \vert^2), \quad \alpha>0 \tag 1$$
Multiplying both sides by $f$ and integrating the previous PDE over the interval $[0,L]$, we obtain
$$\frac{1}{2}\frac{d}{dt}\int_0^L \vert f \vert^2\;dx=-\int_0^L \alpha\vert \partial_x f \vert^2\;dx-\int_0^L \partial_x f \partial_x (g^2) \;dx \tag 2$$
Using the Fourier transform, $(2)$ can be written equivalently as
$$\frac{1}{2}\frac{d}{dt}\int_0^L \vert \partial_x^{-1}  f \vert^2\;dx=-\int_0^L \alpha\vert f \vert^2\;dx-\int_0^L  f (g^2) \;dx \tag 3$$
where $\partial_x^{-1} f$ is defined via $\hat f(k)/ik$ using $\hat f(0)=0$.

While I can naively see that $(3)$ follows by $(2)$, if we set $f=\partial_x^{-1} \hat f$, there still a few things that I find hard to grasp.
QUESTIONS:

*

*How does the last term in $(2)$ come up? More precisely, I can see that due to periodicity, when integrating the last term in $(1)$ after multiplying with $f$, we find
$$\int_0^L f \partial^2_x(g^2)\;dx=-\int_0^L\partial_x f \partial_x (g^2)\;dx.\;$$ Then letting $f=\partial_x^{-1} \hat f$ we obtain $\int_0^L\hat f \partial_x (g^2)\;dx.\;$ What can we tell about $\partial_x (g^2)$?

*Motivated by the previous question, I realize that there has to be something with the Fourier transform of the differential operator $\partial_x $ in general (since $\partial_x \partial_x^{-1} g^2=g^2$) but I can't proceed with some rigorous justification.

It's been ages since I've dealt with any Fourier or Laplace transform and I feel completely stuck here (although it feels sort of basics). I would highly appreciate if someone could provide a rigorous derivation of $(3)$ from $(2)$ and shed some light on my questions.
Many many thanks in advance!
 A: For simplicity I will assume that $L=2\pi.$ Then the complex Fourier coefficients of a function $h\in C_{\rm per}[0,2\pi]$ are defined by
$$\widehat{h}(k)={1\over 2\pi}\int\limits_0^{2\pi}h(x)e^{-ikx}\,dx,\quad k\in \mathbb{Z}$$ If $h\in C^2_{\rm per}[0,2\pi]$ then
$$\widehat{h'}(k)=ik\,\widehat{h}(k),\quad \widehat{h''}(k)=-k^2\,\widehat{h}(k)$$In the OP case we consider $h_t(x)=f(x,t)$. Denote the Fourier coefficients of $h_t(x)$ by
$\widehat{f}(k,t).$  Calculating the Fourier coefficients (with respect to the variable $x$) of $(1)$ we get
$${\partial\over \partial t}\widehat{f}(k,t)=-\alpha k^2\, \widehat{f}(k,t)-k^2\widehat{|g|^2}(k,t)$$
Multiplying both sides by $\overline{\widehat{f}(k,t)}$ and dividing by $k^2$ gives
$${1\over 2k^2}{\partial\over \partial t}|\widehat{f}(k,t)|^2= {1\over k^2}\left ({\partial\over \partial t}\widehat{f}(k,t)\right )\,\overline{\widehat{f}(k,t)}=-\alpha|\widehat{f}(k,t)|^2- \widehat{|g|^2}(k,t)\overline{\widehat{f}(k,t)}$$
Summing up over $k\in \mathbb{Z},$ applying the Parseval identity and multiplying by $2\pi$ yields
$${1\over 2} {d\over dt}\int\limits_0^{2\pi}|\partial_x^{-1}f|^2\,dx=-\alpha\int\limits_0^{2\pi}|f|^2\,dx-\int\limits_0^{2\pi}|g|^2\overline{f}\,dx
$$
where $\partial_x^{-1}f$ is the function with Fourier coefficients equal $\displaystyle {1\over ik}\widehat{f}(k,t)$ for $k\neq 0$ and $0$ for $k=0.$
Remark The calculations are correct provided that $\widehat{f}(0,t)=0$ for every $t$ i.e.
$$\int\limits_0^{2\pi}f(x,t)\,dx=0$$
