title: Using python to solve nested functions (reccurring equations)?
body: <p>Is it possible to use python to find local maxima/minima for a nested function?</p>
  <p>For example <code>f(a,b) = a*5 / (a-b)</code>
  And nesting them -&gt; <code>f( f( f(a, b), b ), b)</code></p>
  <p>The nesting would need to be dynamically created, for example in a for loop:</p>
  <pre><code>def f(a,b):
      return a*5 / (a-b)
  
  input = 1
  for x in range(3):
      input = f(input, b)
  </code></pre>
  <p>This is easy, but could I get an equation out of it and then using <code>Numpy/Sympy/SciPy</code> or something to find local <code>maxima/minima</code> for given input range?</p>
  <p>Thanks!</p>