During my self study to the calculus of variations I come across this problem. Because of my search, I know what I wanted to do but I need some help to do them.

The function $f:[-1,1] \times \mathbb R \to \mathbb R$ is defined by
$$
f(x,\xi) = \left[ w(x) \xi - 2 x w(x) \sin\left(\frac{\pi}{x}\right) + \pi w(x) \cos\left(\frac{\pi}{x}\right) \right]^2,
$$
where
$$
w(x) =
\begin{cases}
e^{- \frac{1}{x^2}},& x\not = 0\\
0, & x=0
\end{cases}.
$$
In this problem we consider the regularity of solutions of the Euler-Lagrange equation corresponding to the one-dimensional minimization problem
$$
\inf_{u \in X} I[u],
$$
where $X= \big\{ u \in \operatorname{Lip}[-1,1]: u(-1) = u(1)=0 \big\}$ and
$$
I[u] = \int_{-1}^1 f(x, u'(x)) dx.
$$
I want to prove the so-called **regularity theorem**; Let $\overline{u} \in \operatorname{Lip}[a,b]$ satisfy the integral Euler equation for the functional $\displaystyle \int_a^b f(x,u(x),u'(x)) dx$, where for every $x \in [a,b]$ the function $\xi \to f(x,\overline{u}(x),\xi)$ is strictly convex. Then $\overline{u}$ lies in $C^1 [a,b]$.

As far as reached, to prove the theorem we can solve the following sub-problems, to explain why the regularity theorem does not apply to this minimization problem.

**The steps are:**

- Showing that $f$ is infinitely differentiable, $\xi \mapsto f(x,\xi)$ is convex and $f_{\xi \xi} (x,\xi) > 0$ holds for all $x$ except for $x=0$.
- Showing that the function $$\overline{u}(x) = \begin{cases} x^2 \sin \frac \pi x,& x \not = 0\\ 0, & x=0\end{cases}$$ yields the minimum of the minimization problem. Also confirm that this function is Lipschitz continuous on $[-1,1]$.
- And we show that there is no other minimizer except for the function $\overline{u}$ above.
- And we need to show that $\overline{u}$ does not belong to $C^1 ([-1,1])$.

The main step is to explain why the regularity theorem does not apply

**My Proof:**
First we prove that the function $w(x)$ is infinitely differentiable. The function to be infinitely differentiable, one would need to show that in the limit the function $w(x)$, and all its derivatives, go to zero as $x$ goes to $0$. Since $x \mapsto \frac{1}{x}$ is smooth for $x \neq 0$ and $x \mapsto e^x$ is smooth, it is clear that $w$ is smooth for $x \neq 0$.

Suppose $x \ne 0$, then ${w}^{(k)}$ has the form ${w}^{(k)}(x) = e^{-{1 \over x^2}} p_k({1 \over x})$ for some polynomial $p_k$. This is clearly true for $k=0$, so suppose it is true for $k=0,...,n$. Then ${w}^{(n)}(x) = e^{-{1 \over x^2}} p_n({1 \over x})$ and the chain rule gives $$ \begin{split} {w}^{(n+1))}(x) & = {w}^{(1)}(x) p_n\left({1 \over x}\right) - {w}^{(0)}(x) p_n'\left({1 \over x}\right) \left({1 \over x^2}\right) \\ & = e^{-{1 \over x^2}} \left[{2 \over x^3}p_n\left({1 \over x}\right)-p_n'\left({1 \over x}\right) \left({1 \over x^2}\right) \right]. \end{split} $$ If $p_{n+1}(y) = 2 y^3p_n(y)-p_n'(y) y^2 $, then $$ {w}^{(n+1)}(x) = e^{-{1 \over x^2}} p_{n+1}\left( {1 \over x} \right), $$ and so the result is true for all $n$. If $x \neq 0$, we have $$ e^{-{1 \over x^2}} = {1 \over {e^{1 \over x^2}}}\quad \text{ and }\quad e^{1 \over x^2} \ge \sum_{k=0}^n {1 \over k!} {1 \over x^{2k}} $$ and thus $$ e^{-{1 \over x^2}} \le {x^{2n} \over \sum_{k=0}^n {1 \over k!} {x^{2(n-k)}}} \le {x^{2n} \over n!}. $$ Suppose $p$ is a polynomial of degree $d$. Then for any $n$ we see that there is some constant $K$ such that $|e^{-{1 \over x^2}} p({1\over x})| \le K |x|^{2n-d}$ whenever $0 <|x| \le 1$. In particular, there is some $K$ such that $|e^{-{1 \over x^2}} p({1\over x})| \le K x^2$ for all $0 < |x| \le 1$. We have ${w}^{(0)}(x) \le x^2$ for all $x$, and so ${w}$ is continuous at $x=0$. Since $|{w}^{(0)}(x) - {w}^{(0)}(0) -0| \le x^2$, we see that ${w}^{(0)}$ is differentiable at $x=0$, and ${w}^{(1)}(0) = 0$.

Now suppose ${w}^{(k)}$ is differentiable at $x=0$ and ${w}^{(k)}(0) = 0$ for $k=0,...,n$. Then $|{w}^{(n)}(x) - {w}^{(n)}(0) -0| \le K x^2$ for some $K$ and $|x| \le 1$. Hence ${w}^{(n)}$ is differentiable at $x=0$, and ${w}^{(n+1)}(0) = 0$. With a similar argument we find that the function

$$ \cos {\pi \over x} + i \sin \frac \pi x= \begin{cases} e^{- \frac{\pi}{x}},& x\not = 0\\ 0, & x=0 \end{cases}$$ is infinitely differentiable. Therefore, $\cos{\frac \pi x}$ and $\sin \frac{\pi}{x}$ are smooth functions. Since the summation and product of smooth functions is smooth function then $f$, defined above, is smooth.

Next step is showing $f(x,\xi)$ is convex w.r.t. $\xi$. For notational simplicity we put $$g=2 x \sin \frac{\pi}{x} + \pi \cos\frac{\pi}{x}.,$$ then for fix $x \in [-1,1]$, we have $f(\xi)= w^2(\xi-g)^2$ is a convex function, for let $\lambda\in [0,1]$, then $$ \begin{split} f&(x,\lambda \xi_1 + (1-\lambda) \xi_2) - \lambda \xi_1 f( \xi_1) - (1-\lambda) f(\xi_2) \\ & = w^2(\lambda \xi_1 + (1-\lambda) \xi_2 -g)^2 - \lambda w^2( \xi_1-g)^2 - (1-\lambda) w^2(\xi_2-g)^2 \\ & = w^2(\lambda (\xi_1-g) + (1-\lambda) (\xi_2 -g))^2 - \lambda w^2( \xi_1-g)^2 - (1-\lambda) w^2(\xi_2-g)^2 \\ &=w^2(\lambda^2 (\xi_1-g)^2 +2\lambda(1-\lambda)(\xi_1-g)(\xi_2 -g) + (1-\lambda)^2 (\xi_2 -g)^2 -\lambda( \xi_1-g)^2 -(1-\lambda)(\xi_2-g)^2 )\\ & = w^2( (\lambda^2-\lambda)(\xi_1-g)^2 + 2\lambda(1-\lambda)(\xi_1-g)(\xi_2 -g) + ((1-\lambda)^2 - (1-\lambda) ) (\xi_2 -g)^2)\\ & = w^2(\lambda(1-\lambda)(\xi_1-g)^2 +2\lambda(1-\lambda)(\xi_1-g)(\xi_2 -g) + \lambda(1-\lambda) (\xi_2 -g)^2)\\ & = \lambda(1-\lambda)w^2( (\xi_1-g)^2 + 2)(\xi_1-g)(\xi_2 -g) + (\xi_2 -g)^2) \\ &= \lambda(1-\lambda)w^2((\xi_1-g) + (\xi_2 -g))^2 \geq 0 \end{split} $$ (The last inequality is as a product of two non-negative numbers and two square numbers is non-negative)

Could you please help with the other steps!