title: Finding root of two functions with scipy.optimize.brentq
body: <p>I am trying to find the roots(i.e. where their curves cross) of the functions:</p>
  
  <pre><code>def f1(x):
      return np.cos(2 * np.pi * x) * np.exp(-x ** 2)
  
  def f2(x):
      return np.log(x + 2.2)
  </code></pre>
  
  <p>from looking at the graphs of the two functions I know that there are two roots where -2 &lt; x &lt; 2 but I want the root for 0.5 > x > 0 (the other root occurs at x &lt; 0)</p>
  
  <p>I have done some research and it seems that scipy.optimize.brentq is used for finding roots of functions but I don't know how to do it for the root of two functions.</p>
  
  <p>any suggestions?</p>