title: How to define and solve mutually referencing expressions in SymPy
body: <p>Suppose I have the following system of equations:</p>
  
  <pre><code>x = 1/y + b
  y = 2*x
  </code></pre>
  
  <p>It follows that <code>b = x-1/(2*x)</code></p>
  
  <p>If I try to define these expressions in SymPy though,</p>
  
  <pre><code>from sympy import *
  b = symbols('b')
  x = 1/y + b
  y = 2*x
  </code></pre>
  
  <p>it gives me</p>
  
  <pre><code>---------------------------------------------------------------------------
  NameError                                 Traceback (most recent call last)
  &lt;ipython-input-4-5a9b5f6b923e&gt; in &lt;module&gt;()
        1 from sympy import *
        2 b = symbols('b')
  ----&gt; 3 x = 1/y + b
        4 y = 2*x
        5 
  
  NameError: name 'y' is not defined
  </code></pre>
  
  <p>What's the proper way to set up this set of equations so that I can solve it for x?  Extending that, how to do an evalf on it?</p>