I have
\begin{align} r(x)= 1 + \frac{x}{\frac{1}{2}+\frac{x-1}{-1+\frac{x+1}{1+\frac{x-1}{-1}}}} \end{align}
for an interpolation problem, and I need to write $r(x)$ such that nominator and denominator are polynomials. Wolfram Alpha gave me $r(x) = \frac{x+4}{4-x}$ for $x \neq 3$, but I don't know how to do it without computing software.
Any help is highly appreciated!
We follow @Mark's suggestion and define $s(x)$ via
$$\begin{align} r(x)= 1 + \frac{x}{-\frac{1}{2}+s(x)} \end{align}$$
$$\begin{align} s(x)= 1 +\frac{x-1}{-1+\frac{x+1}{1+\frac{x-1}{-1...}}} \end{align}$$
Now we replace $1+\frac{x-1}{*}$ in the denominator of the right hand side of the previous equation and obtain:
$$\begin{align} s(x)= 1 +\frac{x-1}{-1+\frac{x+1}{s(x)}} \end{align}$$
We can now solve the $s(x)$ from the last equation and substitute it into the first equation to solve for $r(x)$.
-mike