find the maximum $\frac{\frac{x^2_{1}}{x_{2}}+\frac{x^2_{2}}{x_{3}}+\cdots+\frac{x^2_{n-1}}{x_{n}}+\frac{x^2_{n}}{x_{1}}}{x_{1}+x_{2}+\cdots+x_{n}}$

give the postive intger $n\ge 2$,and postive real numbers $a<b$ if the real numbers such $x_{1},x_{2},\cdots,x_{n}\in[a,b]$ find the maximum of the value $$\dfrac{\frac{x^2_{1}}{x_{2}}+\frac{x^2_{2}}{x_{3}}+\cdots+\frac{x^2_{n-1}}{x_{n}}+\frac{x^2_{n}}{x_{1}}}{x_{1}+x_{2}+\cdots+x_{n}}$$

it seem the polya-szego inequality http://journalofinequalitiesandapplications.springeropen.com/articles/10.1186/1029-242X-2013-591


Let $M$ is a maximum value (it exists because continuous function on compact gets there a maximum value) and $$f(x_1,x_2,...x_n)=\frac{x_1^2}{x_2}+\frac{x_2^2}{x_3}+...+\frac{x_n^2}{x_1}-M(x_1+x_2+...+x_n).$$ Since $f$ is a convex function for all $x_i$, we obtain $$0=\max_{\{x_1,x_2,...,x_n\}\subset[a,b]}f=\max_{\{x_1,x_2,...,x_n\}\subset\{a,b\}}f$$ From here if $n$ is even we have $$M=\frac{\frac{a^2}{b}+\frac{b^2}{a}}{a+b}=\frac{a}{b}+\frac{b}{a}-1,$$ which occurs for $x_1=x_3=...=a$ and $x_2=x_4=...=b$.

If $n$ is odd we have for $n=2m+1$: $$M=\frac{m\left(\frac{a^2}{b}+\frac{b^2}{a}\right)+a}{(m+1)a+mb},$$ which occurs for $x_1=x_3=...=x_{2m+1}=a$ and $x_2=x_4=...=x_{2m}=b$.


This is a proof of the discrete case for Michael Rozenberg's reply, assuming $n\ge 2$ and therefore $M>1$.

Consider a cyclic word $x$ on $\{a,b\}^n$ maximizing $f$. We can write $f(x)$ as a linear function of the counts of the $n$ cyclic bigrams $x_i x_{(i+1)\bmod n}$: $$f(x) = n_{aa} w(a,a) + n_{ab} w(a,b) + n_{ba} w(b,a) + n_{bb} w(b,b)$$ where $w(s,t)=\frac{s^2}{t} - M s$.

Because $M>1$, $w(b,b) < w(a,a)$ therefore $x\ne b^n$ and if $x$ contained an instance of $bb$, we could increase $f(x)$ by replacing it with $b$ and inserting another $a$ next to any $a$. Thus $n_{bb}=0$.

And because there are as many $ba$ bigrams as $ab$, we have: $$f(x) = \left(n-2n_{ab}\right) w(a,a) + n_{ab} \left(w(a,b)+w(b,a)\right)$$ This is a linear function of $n_{ab}$ so the maximum is reached when $x$ is either of the form $a^n$ or $(ab)^* a?$. The former is never maximal because $M>1$, therefore Michael Rozenberg's construction is optimal.