Extremizing a functional with a non-elementary solution to the Euler-Lagrange equation Someone recently asked this question, but deleted it before I could post an answer. I figured I might as well share it for future internet travellers. The question is problem $10$ here. It states

Part 1
Determine all functions $u(x)$ which extremize
$$
I[u] = \int_{-\infty}^{\infty} \left(\frac{1}{2}[u'(x)]^2 + (1 - \cos[u(x)]) \right)\,\text{d}x
$$
which satisfy $\lim_{x \to -\infty} u(x) = 0$ and $\lim_{x \to \infty}u(x) = 2\pi$. 
Part 2
Show that if $u$ satisfies these limits then
$$
I[u] = \frac{1}{2}\int_{-\infty}^{\infty}\left(u'(x) - 2 \sin [u(x)/2] \right)^2 + 8
$$
Deduce that a lower bound for $I[u]$ amongst such functions is $8$ and write down a first-order differential equation which $u$ must satisfy to realise this lower bound. How does this differential equation relate to the differential equation you derived in the first part of the question?

 A: Part 1
Define
$$
\mathcal{L}[u(x), u'(x)] = \frac{1}{2}[u'(x)]^2 + (1 - \cos[u(x)])
$$
then Euler-Lagrange states that
\begin{align*}
\frac{\partial \mathcal{L}}{\partial u} &= \frac{\text{d}}{\text{d} x} \frac{\partial \mathcal{L}}{\partial u'} \\
\sin[u(x)] &= u''(x) \tag{1}
\end{align*}
This looks hopeless, but we can make some progress by using the Jacobi amplitude function $\text{am}(z|m)$. This function is related to the solution of $(1)$. In particular, let us make the transformation $u(x) = v(x) + \pi/2$ then $(1)$ becomes
$$
\cos[v(x)] = v''(x) \tag{2}
$$
and one of the solutions to this which I will call $v_{+}(x)$ is
$$
v_{+}(x) = 2 \text{am}\left(\frac{1}{2}\sqrt{(C + 2)(x + K)^2} \bigg| \frac{4}{C + 2} \right) + \frac{\pi}{2}
$$
This is useless, but some research into the properties of this function reveals that 
$$
\text{am}(z | 1) = 2 \arctan(e^z) - \frac{\pi}{2}
$$
Therefore, if we take $C = 2$ we have
\begin{align*}
v_{+}(x) &= 2 \text{am}\left(x + K |1 \right) + \frac{\pi}{2} \\
&= 2\bigg(2 \arctan(e^{x+K}) - \frac{\pi}{2} \bigg) + \frac{\pi}{2} \\
&= 4 \arctan(K e^x) - \frac{\pi}{2}
\end{align*}
where $K>0$ is still a constant. Technically, the argument of $\text{am}$ should have an absolute value the way it's written, but it's impossible to satisfy the limit requirements unless we just get rid of it. Anyway,
$$
u_{+}(x) = 4\arctan(K e^x)
$$
You'll note that this satisfies the two limit properties since $\arctan(0) = 0$ and $4 \arctan(\infty) = 2\pi$. Furthermore, this function solves $(1)$ which makes this entire computation nothing short of a miracle. 
Part 2
Now, assuming those original limits are valid, we have
\begin{align*}
I[u] &= \frac{1}{2} \int_{-\infty}^{\infty}\left([u'(x)]^2 + 2(1 - \cos[u(x)]) \right)\,\text{d}x \\
& = \frac{1}{2} \int_{-\infty}^{\infty}\left([u'(x)]^2 + [2 \sin (u(x)/2)]^2 \right)\,\text{d}x \\
& = \frac{1}{2} \int_{-\infty}^{\infty} \left[u'(x) - 2 \sin (u(x)/2)\right]^2 \,\text{d}x + 2 \int_{-\infty}^{\infty} u'(x) \sin(u(x)/2) \,\text{d}x\\
\end{align*}
Now, that second integral can be done with the substitution $y = u(x)/2 \implies u'(x)\,\text{d}x = 2 \text{d}y$
\begin{align*}
2 \int_{-\infty}^{\infty} u'(x) \sin(u(x)/2) \,\text{d}x &= 4 \int_{u(-\infty)/2}^{u(\infty)/2} \sin(y) \,\text{d}y \\
&= 4 \int_{0}^{\pi} \sin(y) \,\text{d}y \\
&= 4
\end{align*}
Therefore,
$$
I[u] = \frac{1}{2} \int_{-\infty}^{\infty} \left[u'(x) - 2 \sin (u(x)/2)\right]^2 \,\text{d}x + 4
$$
Note that the original question has $8$ instead of $4$ but I think that's a mistake. I might have made an algebraic error somewhere, but the essence is the same. Now, in order to deduce that $4$ is a lower bound (or in the original question, $8$) we merely notice that the remaining integral is strictly positive since the integrand is something squared. Therefore, the smallest it could possibly by is $0$ so the smallest $I[u]$ could possibly be is $4$. To satisfy this condition, we have
$$
u'(x) = 2 \sin[u(x)/2] \tag{3}
$$
Going back to $(1)$, if we multiply through by $u(x)$ we have
\begin{align*}
u'(x) \sin[u(x)] = u'(x) u''(x) \\
C -\cos[u(x)] = \frac{1}{2}[u'(x)]^2
\end{align*}
Set $C = 1$ and then
\begin{align*}
[u'(x)]^2 &= 2(1 - \cos[u(x)]) \\
[u'(x)]^2 &= 4 \sin^2[u(x)/2] \\
u'(x) &= 2 \sin[u(x)/2]
\end{align*}
This is exactly the same as $(3)$, obtained through a much simpler method! Therefore, the solution we obtained was a minimum with value $I[u_{+}] = 4$.
A: I know this question is very old, but for anyone else who comes across this in future I can give a more elementary answer to Part 1 than the current accepted answer.
Rather than trying to solve Euler-Lagrange directly, we note that for a functional with integrand $f$,
$$\frac{d}{dx}\left[f-y'\frac{\partial f}{\partial y'}\right]=\frac{\partial f}{\partial x}\hspace{20pt}(*)$$
(if you expand the derivative on the left hand side, all terms except $\frac{\partial f}{\partial x}$ vanish by the Euler-Lagrange equation). In this case we have $f(y,y')$ does not depend explicitly on $x$ ($f$ is just the integrand in the integral we are trying to extremise), so $\frac{\partial f}{\partial x}=0$ and thus $f-y'\frac{\partial f}{\partial y'}=A$ for some constant $A$. Plugging in $f$ we find that
$$(u')^2=2(1-\cos u)-2A,$$ and imposing the boundary conditions on $u$ we have that
$$L=\lim_{x\rightarrow\pm\infty}(u')^2=-2A\implies\lim_{x\rightarrow\pm\infty}u'=\pm\sqrt{-2A}.$$
Since this limit exists and is finite, it must be $0$. (This isn't true if the limit diverges, e.g. $x^{-1}\sin(e^x)$, but since we showed it converges we can deduce that it must be $0$). Thus $A=0$.
Now we have
$$u'=\pm\sqrt{2(1-\cos u)}$$
which we can separate and solve to give
$$u=4\arctan\left(Be^{\pm x}\right)$$
and imposing the boundary conditions forces us to take the solution with $+x$.
Note: the first integral $(*)$ is the same equation we obtain through part 2.
