Let $0<a<b$. Consider the functional $$S[y]=\int_{a}^{b}x^5(y'^2-\frac{2}{3}y^3)dx$$ Prove that a first-integral of $S[y]$ is $$4x^5yy'+x^6(y'^2+\frac{2}{3}y^3)=c,$$ where $c$ is constant, stating any theorems that you use.
I know that the Euler-Lagrange equation for $S[y]$ is $$\frac{d^2y}{dx^2}+\frac{5}{x}\frac{dy}{dx}+y^2=0$$ but how should I prove this? Does it has anything to do with this equation: $$f-y'\frac{\partial f}{\partial y'}=\text{constant}~?$$
If so, then what's $f, y', \frac{\partial f}{\partial y'}$?
Hint: Let
$$ g(x):=4x^5yy'+x^6\left(y'^2+\frac{2}{3}y^3\right). \tag{1} $$ Compute $g'(x)$ and use the Euler-Lagrange equation $y''=-\frac{5}{x}y'-y^2$ to simplify terms containing $y''$. If you do it correctly, you will find that $g'(x)=0$, hence $g(x)=c$.
Remark: The equation $f-y'\frac{\partial f}{\partial y'}=C$, known as Beltrami identity, is true for functionals of the form $$ S[y]=\int_a^bf[x,y(x),y'(x)]\,dx \tag{2} $$ if $\frac{\partial f}{\partial x}=0$. That's not the case for the functional in your question.