Camassa-Holm functional derivative I'm a physicist, and I am reading the Wikipedia article of the well known integrable system Camassa-Holm equation (original article)
\begin{align}
\dot{u}+2\kappa u'-\dot{u}''+3u u'=2u'u''+uu''',
\end{align}
where $u=u(x,t$), dots are derivatives with respect to time, primes derivatives with respect to $x$ and $\kappa\geq 0$ is a constant. If we define the momentum
\begin{align}
m=u-u''+\kappa,
\end{align}
we can write the Camassa-Holm equation as a Hamiltonian system, i.e.,
\begin{align}
\dot{m}=\mathcal{D}_1\frac{\delta H_1}{\delta m},
\end{align}
where
\begin{align}
H_1=\frac{1}{2}\int dx\;\left(u^2+u'^2\right),\quad \mathcal{D}_1=-m\frac{\partial}{\partial x}-\frac{\partial}{\partial x}m.
\end{align}
It is not difficult to compute, after an integration by parts in the second term, and neglecting boundary terms, the variation of $H_1$ with respect to momentum $m$,
\begin{align}
\delta H_1=\int dx\;\left(u\delta u+u'\delta u'\right)=\int dx\;\left(u\delta u-u\delta u''\right)&=\int dx\;u\left(\delta u-\delta u''\right)\equiv \int dx\;u\;\delta m\\
\rightarrow \frac{\delta H_1}{\delta m}&=u,
\end{align}
and then, it is direct to calculate the action of the operator $\mathcal{D}_1$ in order to obtain the Camassa-Holm equation, however, it can also be written as a bi-Hamiltonian system
\begin{align}
\dot{m}=\mathcal{D}_1\frac{\delta H_1}{\delta m}=\mathcal{D}_2\frac{\delta H_2}{\delta m},
\end{align}
where
\begin{align}
H_2=\frac{1}{2}\int dx\;\left(u^3+u\,u'^2-\kappa u^2\right),\quad \mathcal{D}_2=-\frac{\partial}{\partial x}-\frac{\partial^3}{\partial x^3}.
\end{align}
How on earth I can obtain the variation of $H_2$ with respect to $m$?
 A: I'm a student who just took Darryl Holm's course on this! In the lecture notes for the course this problem is discussed on page 102 (on his general page, there is a link to further teaching resources). It appears there is an inconsistency in $\kappa$ from his lecture notes and the Wikipedia page - equation (7.8) on page 102 suggests $2\kappa = c_0$. The Hamiltonian on the Wikipedia page has a $-\kappa u^2$ term, whereas on the next page of the notes the term is $c_0 u^2$, suggesting $\kappa = -c_0$. However, the Hamiltonian is introduced as a variational principle at the bottom of page 102, so I would expect the value of $\kappa$ to be consistent throughout. There are also slight differences in $\mathcal{D}_1$ and $\mathcal{D}_2$. These do not materially change the derivation. My working follows from the equations in your post.
Note first that by Hamilton's equations we have
$$\dot{m} = -\partial_x \frac{\delta H_2}{\delta u} $$
We compute
$$
\begin{aligned}
\delta H_2 &= \frac{1}{2} \delta \int (u^3 + u u_x^2 - \kappa u^2 ) dx\\
&= \frac{1}{2} \int (3u^2 \delta u + u_x^2 \delta u + 2u u_x \delta (u_x) - 2\kappa u\delta u) dx \\
&= \frac{1}{2} \int (3u^2 - 2\kappa u - u_x^2 - 2uu_{xx}) \delta u dx
\end{aligned} $$
where the last line follows via integration by parts and the fact that endpoints vanish:
$$2\int uu_x\delta(u_x) dx = 2|u u_x^2|_\mathbb{R} - 2\int (u u_x)_x \delta u = -2\int (u_x^2 + uu_{xx}) \delta u dx$$
so we have
$$ 
\begin{aligned} \frac{\delta H_2}{\delta u} &= \frac{1}{2} (3u^2 - 2\kappa u - u_x^2 - 2uu_{xx}) \\
\implies \dot{m} &= - (3uu_x - \kappa u_x - 2u_xu_{xx} - u_xu_{xxx}) \\
&= -\bigg ((\partial_x m + m\partial_x )u - \kappa  u_x \bigg ) \\
&= -(\partial_x - \partial_{xxx}) \frac{\delta H_2}{\delta m} =: -\mathcal{D}_2 \frac{\delta H_2}{\delta m} \\
&= -\bigg ((\partial_x m + m\partial_x ) - \kappa  \partial_x \bigg ) u =: -\mathcal{D}_1 \frac{\delta H_1}{\delta m}
\end{aligned} $$
where we have used the fact that
$$\frac{\delta H_2}{\delta u} = (1 - \partial_{xx}) \frac{\delta H_2}{\delta m}  $$
See also related
