Let the two coupled Euler-Lagrange equations giving the stationary path of the functional $S[y_{1}, y_{2}]=\int [y_{1}'^2+2y_{2}'^2+(2y_{1}+y_{2})^2]dx$ be $y_{1}''-2(2y_{1}+y_{2})=0$ and $2y_{2}''-(2y_{1}+y_{2})=0$. By making the linear transformation $z_{1}=y_{1}+ay_{2}, z_{2}=2y_{1}+y_{2}$ to the new dependent variables $(z_{1}, z_{2})$, where $a$ is a constant, find the value of $a$ such that the functional can be written as the sum of two functionals, one of which depends only on $z_{1}$ and the other only on $z_{2}$.
Here's my work:
Consider the functional $S[y_{1}, y_{2}]=\int [y_{1}'^2+2y_{2}'^2+(2y_{1}+y_{2})^2]dx$ with the linear transformation $z_{1}=y_{1}+ay_{2}, z_{2}=2y_{1}+y_{2}$ to the new dependent variables $(z_{1}, z_{2})$, where $a$ is a constant.
Then $y_{1}=z_{1}-ay_{2}$ and $y_{2}=z_{2}-2y_{1}$.
This means $y_{1}'=z_{1}'-ay_{2}'$ and $y_{2}'=z_{2}'-2y_{1}'$.
Observe that $S[y_{1}, y_{2}]=\int [y_{1}'^2+2y_{2}'^2+(2y_{1}+y_{2})^2]dx\implies S[y_{1}, y_{2}]=\int [(z_{1}'-ay_{2}')^2+2(z_{2}'-2y_{1}')^2+(2y_{1}+y_{2})^2]dx\implies S[y_{1}, y_{2}]=\int (z_{1}'^2-2az_{1}'y_{2}'+a^2y_{2}'^2+2z_{2}'^2-8z_{2}'y_{1}'+8y_{1}'^2+4y_{1}^2+4y_{1}y_{2}+y_{2}^2)dx.$
From here I'm stuck. How should I find the value of $a$?
We have the functional $S$ given by
$$S[y_1,y_2]=\int_{x_0}^{x_1}(y_1'(x)^2+2y_2'(x)^2+(2y_1(x)+y_2(x))^2)\,\mathrm{d}x.$$
We make the change of variables
$$\begin{pmatrix} z_1\\ z_2 \end{pmatrix}=\begin{pmatrix} 1&a\\ 2&1 \end{pmatrix}\begin{pmatrix} y_1\\ y_2 \end{pmatrix},$$
where $a\in\mathbb{R}\setminus\left\{\frac{1}{2}\right\}$. The square matrix above can easily be inverted to give us that
$$\begin{pmatrix} y_1\\ y_2 \end{pmatrix}=\frac{1}{2a-1}\begin{pmatrix} -1&a\\ 2&-1 \end{pmatrix}\begin{pmatrix} z_1\\ z_2 \end{pmatrix}.$$
Observing quickly that
$$S[\alpha y_1,\alpha y_2]=\alpha^2S[y_1,y_2]$$
for all $\alpha\in\mathbb{R}$ we compute
$$S[y_1,y_2]=\frac{1}{(2a-1)^2}S[-z_1+az_2,2z_1-z_2].$$
Furthermore then
\begin{align*} S[-z_1+az_2,2z_1-z_2] &=\int_{x_0}^{x_1}((-z_1'(x)+az_2'(x))^2+2(2z_1'(x)-z_2'(x))^2+(2a-1)^2z_2(x)^2)\,\mathrm{d}x \\ &=\int_{x_0}^{x_1}(9z_1'(x)^2+(a^2+2)z_2'(x)^2+(2a-1)^2z_2^2(x)-2(a+4)z_1'(x)z_2'(x))\,\mathrm{d}x. \end{align*}
Now for this to be able to be written as the sum of two functionals where only depends only on $z_1$ and the other only on $z_2$, it must be the case that the term $2(a+4)z_1'(x)z_2'(x)$ vanishes for all $z_1',z_2'$, and so it must be the case that $a=-4$. With $a=-4$ we then also get that
$$S[y_1,y_2]=\frac{1}{9}\left(\int_{x_0}^{x_1}z_1'(x)^2\,\mathrm{d}x+\int_{x_0}^{x_1}\left(2z_2'(x)^2+9z_2(x)^2\right)\,\mathrm{d}x\right),$$
giving you the two desired functionals as well.