In Landau's Mechanics, there is a special trick for determining the potential energy from the period of oscillation.
Landau calculates the integral $\int_0^\alpha \frac{T(E) dE}{\sqrt{\alpha - E}}$ and then changes the order of integration, reducing the integral to $\pi\sqrt{2m} [x_2(\alpha)-x_1(\alpha)]$(You may refer to Landau's book for more details)
But why? Why should I consider the integral $\int_0^\alpha \frac{T(E) dE}{\sqrt{\alpha - E}}$. Is it just a trick? What's the motivation? Is there any deeper theory behind the trick?


The calculation boils down to finding a solution to an integral equation of the form $$ T(E) = \int \limits_0^E \frac{f(U)}{\sqrt{E-U}} \, \mathrm{d} U \, . \tag{1}$$ This equation is called Abel integral equation, since it was (according to e.g. Kress, 'Linear Integral Equations') first considered and solved by Abel in 1823 in the context of a closely related mechanical problem.
In general, only a select few integral equations can be solved by analytical solution methods (or 'tricks') and it is often unclear how their inventor came up with these (i.e. what the 'motivation' was). Here, the trick is to divide the right-hand side by $\sqrt{\alpha - E}$ and integrate. This works because of the crucial observation that (by virtue of the substitution $x = (E - U)/(\alpha - U)$) the integral $$ \int \limits_U^\alpha \frac{\mathrm{d} E}{\sqrt{(\alpha - E)(E-U)}} = \int \limits_0^1 \frac{\mathrm{d} x}{\sqrt{(1-x)x}} = \pi $$ is independent of $\alpha$ and $U$. Therefore, we obtain the solution $$ f(\alpha) = \frac{1}{\pi} \frac{\mathrm{d}}{\mathrm{d} \alpha} \int \limits_0^\alpha \frac{T(E)}{\sqrt{\alpha - E}} \, \mathrm{d} E \tag{2} $$ (in our case we do not need to take the derivative here, since we are interested in the integral of $f$ anyway). Note that a slight modification of this method can be used to solve the generalised Abel equation $$ T(E) = \int \limits_0^E \frac{f(U)}{(E-U)^\gamma} \, \mathrm{d} U $$ with $\gamma \in (0,1)$.
As for a 'deeper theory' behind this idea, there is a close connection between these integral equations and fractional calculus (which was in part also developed by Abel): $(1)$ means that $T$ is the half-integral of $f$, so the solution $(2)$ for $f$ is found by taking the half-derivative of $T$ (up to constant factors of $\sqrt{\pi}$).