I have a functional:
$$F=\int_0^l \left[ V(h)+{1\over 2}\left(h_x\right)^2 \right] dx$$
where $V(h)$ is just a function of $h=h(x,t)$, and $h$ subjects to periodic boundary conditions
$$h[0,t]=h[l,t]$$ $$h_x[0,t]=h_x[l,t]$$ $$h_{xx}[0,t]=h_{xx}[l,t]$$ How can I obtain its first variation
$$\frac {\delta F}{\delta h}=?$$
I have tried as follows:
Let $F\equiv\int f(h,h_x) dx $, $x\in [0,l]$, and a small perturbation $\delta h=\epsilon \eta (x)$ subjects to $\eta (0)=0, \eta (l)=0$ $$\delta F=F(h+\delta h)-F(h)=F(h+\epsilon \eta)-F(h)=\int f(h+\epsilon \eta,h_x+\epsilon \eta_x)dx-\int f(h,h_x)dx= \int\left[f(h,h_x)+ {\partial f\over \partial h}\epsilon \eta+{\partial f\over \partial h_x}\epsilon \eta_x \right]dx+O(\epsilon^2)-\int f(h,h_x)dx=\epsilon\int\left[{\partial f\over \partial h} \eta+{\partial f\over \partial h_x} \eta_x \right]dx+O(\epsilon^2) $$
Thus at leading order of $\epsilon$,
$$\frac {\delta F}{\delta h}=\frac {\delta F}{\epsilon \eta}=\frac {1}{\eta} \int\left[{\partial f\over \partial h} \eta+{\partial f\over \partial h_x} \eta_x \right]dx=\frac {1}{\eta} \int\left[{dV\over dh} \eta+h_x \eta_x \right]dx=$$
$$ \frac {1}{\eta} \int \eta [\frac {dV}{dh}-h_{xx}]dx=??$$
Then, how can I get the finial result which should contain $\frac{dV}{dh}$ and $h_{xx}$. Can I eliminate $\eta$? Any one can give me a hint? If you can find some mistakes, it will be also appreciated!