Define f(x)=(1+x)/(1-x) and g(x)=(-2)/(x+1). Find the value of g(f(g(f(... g(f(12)) ... )))) where the function f is applied 8 times, and the function g is applied 8 times, alternating between the two.
f(x) = (1 + x) / (1 - x) g(x) = -2 / (x + 1)
f(12) = (1 + 12) / (1 - 12) = 13 / -11 g( f(12) ) = -2 / ( 13/-11 + 1 ) = 11
Next iteration:
f = ( 1 + 11) / (1 - 11) = 12 / -10 g = -2 / ( 12/-10 + 1) = 10
Next:
f = ( 1 + 10) / (1 - 10) = 11 / -9 g = -2 / ( 11/-9 + 1) = 9
Keep going ...