Let $ \alpha \ne \pm 1 $ be a real number. Find all functions $ f : \mathbb R \to \mathbb R $ and $ g : ] 0 , \infty [ \to \mathbb R $ such that $$ f ( \ln x + \alpha \ln y ) = g ( \sqrt x ) + g( \sqrt y ) \quad \forall x , y > 0 \text . $$
My work:
Interchanging $ x $ and $ y $ we obtain $$ f ( \ln x + \alpha \ln y ) = f ( \ln y + \alpha \ln x ) \quad \forall x , y > 0 \text . $$ Let $$ a = \ln x + \alpha \ln y \quad \text {and} \quad b = \ln y + \alpha \ln x \text . $$ Then $$ x = \exp \left( \frac { \alpha b - a } { \alpha ^ 2 - 1 } \right) \quad \text {and} \quad y = \exp \left( \frac { \alpha a - b } { \alpha ^ 2 - 1 } \right) \text , $$ hence $$ f ( a ) = f ( b ) = g \left( \exp \left( \frac { \alpha b - a } { 2 ( \alpha ^ 2 - 1 ) } \right) \right) + g \left( \exp \left( \frac { \alpha a - b } { 2 ( \alpha ^ 2 - 1 ) } \right) \right) \text . $$ It follows that $ f $ is a constant function. Let $ f ( x ) = c $. Then if $ x = y $, we have $ g ( \sqrt x ) = \frac c 2 $, so $ g $ is constant and $ g ( x ) = \frac c 2 $.
I am not sure about the conclusion that $ f $ is constant.
Your conclusion is correct. You've shown that given any $ a , b \in \mathbb R $, you must have $ f ( a ) = f ( b ) $, which is exactly what it means for $ f $ to be a constant function. You've done it by showing that given $ a $ and $ b $, you can choose suitable $ x , y \in \mathbb R $, so that the equation $$ f ( \log x + \alpha \log y ) = f ( \log y + \alpha \log x ) \tag 0 \label 0 $$ exactly becomes $ f ( a ) = f ( b ) $.
If that is hard to understand for you, maybe breaking down the procedure and doing it step by step makes it easier. We know that \eqref{0} holds for all $ x , y \in ( 0 , + \infty ) $. We also know that for any $ u \in \mathbb R $, $ \exp u $ is in $ ( 0 , + \infty ) $. From these two facts we can conclude that for any $ u , v \in \mathbb R $ we have $$ f \big( \log ( \exp u ) + \alpha \log ( \exp v ) \big) = f \big( \log ( \exp v ) + \alpha \log ( \exp u ) \big) \text , $$ or equivalently $$ f ( u + \alpha v ) = f ( v + \alpha u ) \text . \tag 1 \label 1 $$ Now, for any given $ a , b \in \mathbb R $, the following system of linear equations has solutions for the variables $ u $ and $ v $: $$ \begin {cases} u + \alpha v = a \\ \alpha u + v = b \end {cases} $$ That's because $$ \det \begin {bmatrix} 1 & \alpha \\ \alpha & 1 \end {bmatrix} = 1 - \alpha ^ 2 \ne 0 \text , $$ since $ \alpha \notin \{ - 1 , 1 \} $. The solution is $$ u = \frac { \alpha b - a } { \alpha ^ 2 - 1 } \text , \qquad v = \frac { \alpha a - b } { \alpha ^ 2 - 1 } \text . $$ The last step goes like the following. We know that \eqref{1} holds for all $ u , v \in \mathbb R $. In particular, given any $ a , b \in \mathbb R $, $ \frac { \alpha b - a } { \alpha ^ 2 - 1 } $ and $ \frac { \alpha a - b } { \alpha ^ 2 - 1 } $ are in $ \mathbb R $, and thus we have $$ f \left( \frac { \alpha b - a } { \alpha ^ 2 - 1 } + \alpha \frac { \alpha a - b } { \alpha ^ 2 - 1 } \right) = f \left( \frac { \alpha a - b } { \alpha ^ 2 - 1 } + \alpha \frac { \alpha b - a } { \alpha ^ 2 - 1 } \right) \text , $$ or equivalently $ f ( a ) = f ( b ) $.