How to characterize the non-trivial solutions of this non-linear differential equation? Are they all periodic? Nota Bene:  These remarks are provided by Robert Lewis on Wednesday 15 July 2015 6:50 PM PST  in effort to provide context and motivation for this engaging question.  Our OP originally asked:

"How to prove that if $f$ is a non-trivial solution of the non-linear differential equation $x^{''}+\sin x=0$, then $f$ is periodic?"

Which cannot be done, since the equation has non-trivial, non-periodic solutions (see below), although most of the solutions are in fact periodic.  Therefore we need to broaden the scope of inquiry as indicated in the (now edited) title.  Essentially what we now seek is an answer to something more along the lines of

How may we rigorously describe the non-trivial solutions to

$$x'' + \sin x = 0;$$

are any or all of them periodic?

This, I think, captures much of the spirit of the original question whilst expanding the scope so that an answer is possible.

I have probed, though not to excessive depth, the question data base here and did not find this exact question; hopefully, it's not a duplicate.  It is, to my mind, a good question since it illustrates, in a fundamental way, some essential basic principles of analyzing non-linear ODEs.  

These things being said, let me add that attempts based upon linearization or power series analysis might prove problematic, since the questions asked are global in nature.  

With these modifications and caveats on the table, I bid you have at it, Ladies and Gentlemen of Math Stack Exchange.
Multiplying by $x' $ we get $$x'' x' +x' \sin x =0 $$
hence $$\left(\frac{1}{2} x'^2 \right)' -(\cos x )' =0$$ thus $$x'^2 -2\cos x =c$$ hence $$\pm\int \frac{dx}{\sqrt{2\cos x +c} }=t+c_1 $$
substituting $u =\cos x , $ $dx =\frac{- du}{\sqrt{1-u^2}}$ we get $$\pm \int \frac{du}{\sqrt{(1-u^2)(2u +c)}} =t+c_1 $$
Multiplying by $x' $ we get $$x'' x' +x' \sin x =0 $$
hence $$\left(\frac{1}{2} x'^2 \right)' -(\cos x )' =0$$ thus $$x'^2 -2\cos x =c$$ hence $$\pm\int \frac{dx}{\sqrt{2\cos x +c} }=t+c_1 $$
substituting $u =\cos x , $ $dx =\frac{- du}{\sqrt{1-u^2}}$ we get $$\pm \int \frac{du}{\sqrt{(1-u^2)(2u +c)}} =t+c_1 $$