Given that $$\sum_{i=1}^n \sin^2 \alpha_i=1$$ and $0<\alpha_i<\frac{\pi}{2}, \forall i$, how to derive the maximum value of $$\frac{\sum_{i=1}^n \sin \alpha_i}{\sum_{i=1}^n \cos \alpha_i}.$$ When does the maximum occur?
It is a problem from my brother in high school. The problem I want to solve gives $n=2023$ in specific, but I guess this number does not matter.
Hint:
$$\sum_{i=1}^n x_i = \frac1{n-1}\sum_{i=1}^n \sum_{j\neq i} x_j \le \frac1{n-1} \sqrt{n-1} \sum_{i=1}^n \sqrt{\sum_{j\neq i} x_j^2}$$
Can you finish the proof?