title: Python Solving System Of Equations For Variable On Both Sides Of Equality
body: <p>Is there a way to solve a linear system of equations in python where the unknown is on both sides of the equality. So for instance if I have:</p>
  
  <pre><code>x_1 = 0.7 + 0.5 * x_1 - 0.4 * x_2
  x_2 = 0.7 * x_1 + 0.5 - 0.4 * x_1
  x_3 = 0.7 * x_2 + 0.5 * x_1 - 0.4
  </code></pre>
  
  <p>where this can be expressed as:</p>
  
  <pre><code>|x_1|   | 1   x_1  x_2|| 0.7|
  |x_2| = |x_1   1   x_1|| 0.5|
  |x_3|   |x_2  x_1   1 ||-0.4|
  </code></pre>
  
  <p>where the we have a <a href="https://en.wikipedia.org/wiki/Toeplitz_matrix" rel="nofollow noreferrer">Toeplitz Matrix</a>. </p>
  
  <p>I could easily solve such an expression by hand, but it gets laborious as I have large sets. I was looking at </p>
  
  <p><a href="https://stackoverflow.com/questions/6789927/is-there-a-python-module-to-solve-linear-equations">Is there a python module to solve linear equations?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/8739227/how-to-solve-a-pair-of-nonlinear-equations-using-python">How to solve a pair of nonlinear equations using Python?</a></p>
  
  <p>and the <a href="http://docs.sympy.org/dev/modules/solvers/solvers.html" rel="nofollow noreferrer">SymPy Solvers</a> modules, but I can't seem to find a way of going about this.</p>