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?
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$.