i have this problem :

The solutions of P correspond to critical points of the fuctional
$$\phi(x)=\frac12 \int_0^{2\pi} |x'|^2 dt - \int_0^{2\pi} F(t,x) dt , x\in E $$
where $F(t,x)=\int_0^x f(t,s) ds$ and $E$ is the Hilbert space $$E=\lbrace x\in L^2([0,2\pi],\mathbb{R}),x'\in L^2([0,2\pi],\mathbb{R}]), x(0)=x(2\pi)\rbrace$$
My question is how to prove that $\phi$ is $C^2$ ?
Please
Thank you
To start with, we first show that $x\in E$ is bounded almost everywhere. Since $x'\in L^2([0,2\pi])$ we have that using Cauchy-Schwarz
$$ \int_0^{2\pi} |x'| \mathrm{d}t \leq \sqrt{2\pi} \left(\int_0^{2\pi} |x'|^2 \mathrm{d}t\right)^{\frac12} $$
or that $x'$ is in $L^1$, hence $x$ is absolutely continuous. Integrating directly we have that
$$\sup_{t\in[0,2\pi]}x(t) - \frac{1}{2\pi}\int_0^{2\pi} x~\mathrm{d}t \leq \sup_{t\in [0,2\pi]} x(t) - \inf_{t\in [0,2\pi]} x(t) \leq \int_0^{2\pi}|x'| ~\mathrm{d}t $$
(The first inequality follows from the fact that the average of $x$ is greater than its infimum.) This implies (by considering also the difference of the infimum to the mean)
$$ \sup_{t\in [0,2\pi]} |x(t)| \leq \sqrt{2\pi} \|x'\|_{L^2} + \sqrt{2\pi} \|x\|_{L^2} $$
the second term on the RHS coming from estimating the mean of $x$ using Cauchy-Schwarz again. Hence we have that
$$ |x(t)| \leq \sqrt{2\pi} \|x\|_E $$
Okay, first let us show that the mapping is $C^1$. You have computed
$$ \phi'(x)\cdot y = \int_0^{2\pi} x' y' - f(t,x) y~ \mathrm{d}t $$
So fixing an $x$, and let $\|\tilde{x} - x\|_E < \delta < 1$, we have
$$ | \phi'(x)\cdot y - \phi'(\tilde{x})\cdot y| \leq \int_0^{2\pi} \big|(x' - \tilde{x}')y'\big| + \big|[f(t,x) - f(t,\tilde{x})]y\big| ~\mathrm{d}t $$
The first term on the LHS we estimate by Cauchy-Schwarz, and it is bounded by $\delta \|y\|_E$. To estimate the second term, we use that $f$ is continuous. Since both $x$ and $\tilde{x}$ verify $\|x\|_E, \|\tilde{x}\|_E < \|x\|_E + \delta < \|x\|_E + 1$, we have that
$$ |x(t)|, |\tilde{x}(t)| < \sqrt{2\pi} (\|x\|_E + 1) $$
Note that the RHS is a constant, since we have already chosen a fixed $x$. This means that it suffices to consider $f$ on the subdomain $[0,2\pi]\times [- \sqrt{2\pi}(\|x\|_E + 1), \sqrt{2\pi}(\|x\|_E + 1)]$, which is compact. Hence $f$ is uniformly continuous.
We note that
$$ |x(t) - \tilde{x}(t)| < \sqrt{2\pi} \|x - \tilde{x}_E \leq \sqrt{2\pi}\delta $$
Now, let $\epsilon > 0$. By uniform continuity of $f$ on the subdomain, we can choose $\delta < \frac12 \epsilon$ sufficiently small such that whenever $|a - b| < \sqrt{2\pi} \delta$, $|f(t,x) - f(t,b)| < \frac{1}{\sqrt{8\pi}}\epsilon$. This implies that by Cauchy-Schwarz
$$ \int_0^{2\pi} |f(t,x) - f(t,\tilde{x})| |y| \mathrm{d}t \leq \left( \int_0^{2\pi} |f(t,x) - f(t,\tilde{x})|^2 \mathrm{d}t\right)\left(\int_0^{2\pi} |y|^2 \mathrm{d}t\right) \leq \frac{\epsilon}{2} \|y\|_E $$
Putting everything together we see that at a fixed $x$, for every $\epsilon > 0$, we can choose a $\delta > 0$ such that whenever $\|x - \tilde{x}\|_E < \delta$, the operator norm $\|\phi'(x) - \phi'(\tilde{x})\| \leq \epsilon$. Giving continuity.
The argument for $C^2$ is similar. Notice that for the $\int y'z'$ term the contribution to $\phi''(x) - \phi''(\tilde{x})$ is exactly 0. So we need to control
$$ \int_0^{2\pi} |f'(t,x) - f'(t,\tilde{x})| |yz| \mathrm{d}t $$
where $f' = \partial f / \partial_x$.
Again we fix $x$, and then if $\|\tilde{x} - x\|_E < \delta < 1$ we have that $f'$ is uniformly continuous on $[0,2\pi]\times [- \sqrt{2\pi}\ldots, \ldots] $. This gives that for every $\epsilon > 0$ we can choose $\delta$ sufficiently small such that $\sup_{t} |f'(t,x) - f'(t,\tilde{x})| < \epsilon$ whenever $|x(t) - \tilde{x}(t)| < \sqrt{2\pi}\delta$. For all such $\tilde{x}$ we then have
$$ \int_0^{2\pi} |f'(t,x) - f'(t,\tilde{x})| |y z| \mathrm{d}t \leq \epsilon \int_0^{2\pi} |y z|~\mathrm{d}t \leq \epsilon\|y\|_E \|z\|_E $$
by Cauchy-Schwarz, and this shows continuity.