I'm searching method to create a general form of function from recursive sequence. I've tried to use the linear fractional transformation, however I don't know whether this is a good idea to implement in this case.
From the begining - I've defined following sequence: $$b_{0}= \frac{c \cdot a_{0}+b_{1}}{a_{0}+c \cdot b_{1}}, \ b_{1}= \frac{c \cdot a_{1}+b_{2}}{a_{1}+c \cdot b_{2}}, \ ...\ , b_{n}= \frac{c \cdot a_{n}+b_{n+1}}{a_{n}+c \cdot b_{n+1}}$$
Which in next step, I compare to function F(c) - I mean that: $$F(c) = b_{0}$$
In such case, function F(c) can be presented in form which contains a continued fractions: $$F(c)= \frac{c \cdot a_{0}+\frac{c \cdot a_{1}+\frac{c \cdot a_{2}+b_{2}}{a_{2}+c \cdot b_{2}}}{a_{1}+c \cdot \frac{c \cdot a_{2}+b_{2}}{a_{2}+c \cdot b_{2}}}}{a_{0}+c \cdot \frac{c \cdot a_{1}+\frac{c \cdot a_{2}+b_{2}}{a_{2}+c \cdot b_{2}}}{a_{1}+c \cdot \frac{c \cdot a_{2}+b_{2}}{a_{2}+c \cdot b_{2}}}}$$
As you see, I just substituted the $b_{1}$, and $b_{2}$ into $F(c)$.
Ok, now I want to make $F(c)$ much more elegant, and useful form (as an rational function). I tried to use mentioned linear transform method.
General form of presented sequence is: $$b_{n}= \frac{c \cdot a_{n}+b_{n+1}}{c \cdot b_{n+1}+a_{n}}$$ Which I can present as a matrix: $$\frac{ax+b}{cx+d} = \left[\begin{array}{cc}a_{n}&b_{n+1}\\b_{n+1}&a_{n}\end{array}\right]$$ Next I calculate a determinant of the matrix to find solutions $x_{1}$ and $x_{2}$: $$det\left[\begin{array}{cc}a_{n}-x&b_{n+1}\\b_{n+1}&a_{n}-x\end{array}\right] = (a_{n}-x)^2-b_{n+1}^2=0$$ $$x_{1}=a_{n}-b_{n+1} \\ x_{2}=a_{n}+b_{n+1}$$
Having solutions, I found a vector $V_{1}$ wich is related to the $x_{1}$: $$\left[\begin{array}{cc}a_{n}&b_{n+1}\\b_{n+1}&a_{n}\end{array}\right] \cdot \left[\begin{array}{c}x\\y\end{array}\right]=(a_{n}-b_{n+1}) \cdot \left[\begin{array}{c}x\\y\end{array}\right]$$
$$\begin{cases} a_{n} \cdot x + b_{n+1} \cdot y = (a_{n}-b_{n+1}) \cdot x \\b_{n+1} \cdot x + a_{n} \cdot y = (a_{n}-b_{n+1}) \cdot y\end{cases}$$
$$V_{1}=\left[\begin{array}{c}1\\-1\end{array}\right]$$
I calculated the same way a vector $V_{2}$ for the $x_{2}$: $$\left[\begin{array}{cc}a_{n}&b_{n+1}\\b_{n+1}&a_{n}\end{array}\right] \cdot \left[\begin{array}{c}x\\y\end{array}\right]=(a_{n}+b_{n+1}) \cdot \left[\begin{array}{c}x\\y\end{array}\right]$$
$$\begin{cases} a_{n} \cdot x + b_{n+1} \cdot y = (a_{n}+b_{n+1}) \cdot x \\b_{n+1} \cdot x + a_{n} \cdot y = (a_{n}+b_{n+1}) \cdot y\end{cases}$$ $$V_{2}=\left[\begin{array}{c}1\\1\end{array}\right]$$
Having all elements, I multiplaed the vectors, and the matrices as follows: $$\left[\begin{array}{cc}a_{n}&b_{n+1}\\b_{n+1}&a_{n}\end{array}\right]=\left[\begin{array}{cc}1&1\\-1&1\end{array}\right] \cdot \left[\begin{array}{cc}a_{n}-b_{n+1}&0\\0&a_{n}+b_{n+1}\end{array}\right] \cdot \left[\begin{array}{cc}1&1\\-1&1\end{array}\right]^{-1}$$ $$\left[\begin{array}{cc}a_{n}&b_{n+1}\\b_{n+1}&a_{n}\end{array}\right]^{n}=\left[\begin{array}{cc}1&1\\-1&1\end{array}\right] \cdot \left[\begin{array}{cc}(a_{n}-b_{n+1})^{n}&0\\0&(a_{n}+b_{n+1})^{n}\end{array}\right] \cdot \left[\begin{array}{cc}0.5&-0.5\\0.5&0.5\end{array}\right]$$ $$\left[\begin{array}{cc}a_{n}&b_{n+1}\\b_{n+1}&a_{n}\end{array}\right]^{n}= \left[\begin{array}{cc} 0.5 \cdot \left[ (a_{n}-b_{n+1})^{n} + (a_{n}+b_{n+1})^{n}\right] & 0.5 \cdot \left[ (a_{n}+b_{n+1})^{n} - (a_{n}-b_{n+1})^{n}\right]\\ 0.5 \cdot \left[ (a_{n}+b_{n+1})^{n} - (a_{n}-b_{n+1})^{n}\right]& 0.5 \cdot \left[ (a_{n}-b_{n+1})^{n} + (a_{n}+b_{n+1})^{n}\right] \end{array}\right]$$
From the final matrix, I defined the function $F(c)$: $$F^{n}(c)= \frac{ 0.5 \cdot c \cdot \left[ (a_{n}-b_{n+1})^{n} + (a_{n}+b_{n+1})^{n}\right] + 0.5 \cdot \left[ (a_{n}+b_{n+1})^{n} - (a_{n}-b_{n+1})^{n}\right] }{ 0.5 \cdot c \cdot \left[ (a_{n}+b_{n+1})^{n} - (a_{n}-b_{n+1})^{n}\right] + 0.5 \cdot \left[ (a_{n}-b_{n+1})^{n} + (a_{n}+b_{n+1})^{n}\right] }$$
Now... 1) I don't know, whether presented method can be implemented in this case. 2) Whether presented calculation are correct.
Could you give me some tips due to this problem ? I'll be greatful.
Best Regards, E.