# System of equations with $n$ variables

I am trying to find extremum of some interesting function and get stuck on solving the following system of equations:

$x_1=\sqrt{x_2a}$
$x_2=\sqrt{x_3x_1}$
$x_3=\sqrt{x_4x_2}$
...
$x_n=\sqrt{bx_{n-1}}$
$x_i>0$ $\forall i$, $a>0$, $b>0$

Can someone help me here?

• I think there is a mistake in the equations, you have on the left side $x_1$ to $x_n$ (n terms), but on the right side: $x_2$ to $x_{n-1}$ (that are n-2 terms). Also, is the term before $b$, $x_{n-2}$? Nov 19, 2017 at 16:18
• @TobiasMolenaar I swaped multipliers in the last term so now it's easier to understand that there is $n$ terms. Before $b$ we have $x_{n-1}=\sqrt{x_{n}x_{n-2}}$.
– Some
Nov 19, 2017 at 16:37

Let $x_0 = a$ and $x_{n+1} = b$. I'll assume you are trying to solve following system of equations: $$x_{k} = \sqrt{x_{k+1}x_{k-1}}\quad\text{ for }\quad 1 \le k \le n$$ Introduce $y_k = \log x_k$, this is equivalent to $$y_{k+1} - 2y_k + y_{k-1} = 0\quad\text{ for }\quad 1 \le k \le n$$ This is a linear recurrence relation with characteristic polynomial $\lambda^2 - 2\lambda + 1 = (\lambda-1)^2$. Since the characteristic polynomial has a double root at $\lambda = 1$, the general solution of it has the form $y_k = A + Bk$ for suitably chosen constants $A, B$.
Since $y_0 = \log a$ and $y_{n+1} = \log b$, we find $\displaystyle\;A = \log a, B = \frac{\log b - \log a}{n+1}$.
As a result, for any $1 \le k \le n$, we have $$y_k = \log a + \frac{\log b - \log a}{n+1} k \quad\iff\quad x_k = a \left(\frac{b}{a}\right)^{\frac{k}{n+1}}$$