Is the minimum of this functional $C^{\infty}$? The problem:
Let us define
$$
\mathscr{F}(u)=\int_0^1(u'(x))^4-e^x\sin (u(x))\, \mathrm{d}x
$$
for $u \in W^{1,1}([0,1])$ such that $u(0)=A$ and $u(1)=B$.
It don't matters what $A$ or $B$ are, because I am interested in the reasoning.
I am asked to study if the minimum $u$ is such that $u \in C^{\infty}([0,1])$ or eventually $u \in C^{\infty}([0,1]-E)$ where $E$ is a closed and negligible subset of $[0,1]$, i.e. it is closed and $\mu(E)=0$.
An attempt:
First of all, thanks to Ioffe's theorem, we know that $\mathscr{F}$ is sequentially weakly lower semi continuous in $W^{1,1}([0,1])$. Further more, because $(u'(x))^4-e^x\sin (u(x)) \geq (u'(x))^4-e$, a minimum $u \in W^{1,1}$ exists.
But what can be said about the regularity of $u$? I know the Tonelli’s partial regularity theorem but I cannot directly apply it here because $F_{pp}$ is not defined positive but we only have $F_{pp} \geq 0$.
I know that if $u'(x) \neq 0$ then $u$ is $C^{\infty}$ in a neighborhood of $x$.
My question is: $u \in C^{\infty}([0,1])$?
Further more I would like to understand when can we apply Tonelli’s theorem if $F_{pp} \geq 0$ but not $F_{pp} > 0$ i.e. if $F_{pp}$ is positive semidefinite but not positive definite.
Remark: I tried first solving the related Question.
 A: $$
F(u)=\int_{0}^{1}(u^{\prime}(x))^{4}-e^{x}\sin(u(x))\,dx.
$$
If $u$ is a minimum, then for every $v\in C_{0}^{1}([0,1])$ and every
$t\in\mathbb{R}$,
$$
g(t):=F(u+tv)\geq F(u)=g(0),
$$
and so
$$
0=g^{\prime}(0)=\int_{0}^{1}4(u^{\prime}(x))^{3}v^{\prime}(x)-e^{x}
\cos(u(x))v(x)\,dx.
$$
It follows that the weak derivative of $4(u^{\prime}(x))^{3}$ is the function
$-e^{x}\cos(u(x))$. Thus, $4(u^{\prime})^{3}\in W^{1,1}((0,1))$. By a
characterization of Sobolev functions of one variables, we have that
$$
4(u^{\prime})^{3}(x)=-\int_{0}^{x}e^{t}\cos(u(t))\,dt
$$
for a.e. $x\in\lbrack0,1]$. It follows that
$$
u^{\prime}(x)=\left(  -\frac{1}{4}\int_{0}^{x}e^{t}\cos(u(t))\,dt\right)
^{1/3}=:f(x)
$$
Since the right-hand side is continuous, the function $u^{\prime}$ has a
continuous representative. Since $u\in W^{1,1}((0,1))$, we have that
$$
u(x)=\int_{0}^{x}u^{\prime}(t)\,dt=\int_{0}^{x}f(t)\,dt
$$
for a.e. $x\in\lbrack0,1]$. Define
$$
\bar{u}(x):=\int_{0}^{x}f(t)\,dt.
$$
Then $\bar{u}$ is a representative of $u$ of class $C^{1}$ and $\bar
{u}^{\prime}(x)=f(x)$ for all $x\in\lbrack0,1]$. So
$$
\bar{u}^{\prime}(x)=\left(  -\frac{1}{4}\int_{0}^{x}e^{t}\cos
(u(t))\,dt\right)  ^{1/3}=\left(  -\frac{1}{4}\int_{0}^{x}e^{t}\cos(\bar
{u}(t))\,dt\right)  ^{1/3}.
$$
Consider the set $V=\{x\in(0,1):\,\bar{u}^{\prime}(x)\neq0\}$. Since $\bar
{u}^{\prime}\ $is continuous, this set is open. If $x\in V$, we can
differentiate to obtain
$$
\bar{u}^{\prime\prime}(x)=-\frac{1}{3}\left(  -\frac{1}{4}\int_{0}^{x}
e^{t}\cos(\bar{u}(t))\,dt\right)  ^{-2/3}\frac{1}{4}e^{t}\cos(\bar{u}(x)).
$$
Since the right-hand side is $C^{2}$ in $V$, we can keep differentiating to show that $\bar{u}$ is $C^{\infty}$ in $V$. It remains to study what happens in $[0,1]\setminus V$.
Define
$$
h(x):=(\bar{u}^{\prime}(x))^{3}=-\frac{1}{4}\int_{0}^{x}e^{t}\cos(\bar
{u}(t))\,dt.
$$
Since the right hand-side is of class $C^{2}$, we have that
$$
h^{\prime}(x)=-\frac{1}{4}e^{x}\cos(\bar{u}(x))
$$
for all $x\in\lbrack0,1]$.
If $h(x)=0$, and $\bar{u}(x)\neq\frac{\pi}{2} +2k\pi$, then $h^{\prime}(x)\neq0$. In particular, $x$ is isolated.
If $\bar{u}(x_{0})=\frac{\pi}{2}$ and $\bar{u}^{\prime}(x_{0})=0$, then I am not sure about what to do.
If we had uniqueness of the ODE, then I would be
tempted to say that the constant solution $\bar{u}=\frac{\pi}{2}$ is the only
solution (this would require $A=B=\frac{\pi}{2}$). But it is not obvious to me
why there is uniqueness, since we have
$$
\bar{u}(t)=A+\int_{0}^{x}\bar{u}^{\prime}(t)\,dt=A+\int_{0}^{x}h^{1/3}(t)\,dt,
$$
and so
$$
h^{\prime}(x)=-\frac{1}{4}e^{x}\cos\left(  A+\int_{0}^{x}h^{1/3}%
(t)\,dt\right) .
$$
The ODE
$$
p^{\prime}=p^{1/3}%
$$
does not have a unique solution exactly at points $p=0$.
