title: Designing a symbolic equation solver
body: <p>For a class I was assigned to a project to do a basic equation solver. It needs to solve linear equations. E.g. of some equations I should be able to solve:</p>
  
  <ul>
  <li>a*x + b = c</li>
  <li>a<em>x + b = c</em>x + d</li>
  <li>16*x – 9*x = a</li>
  <li>x/16 – x/9 = a</li>
  <li>8*(x+3) – 5*(x + 4) = 12</li>
  <li>x^2 + 2*x + 1 = 0</li>
  <li>(x + 1)*(x – 1) = 0</li>
  <li>(x + 1)<em>(x – 1) = 2</em>(x-1)</li>
  <li>x – 2*sqrt(x) + 1 = 0</li>
  <li>log 3*x - log 6 = 1</li>
  <li>log 3*x – log 6*x^2 = a</li>
  <li>2^(x-1) * a = 2^(3*x+1)</li>
  </ul>
  
  <p>I have looked and only found a handful of helpful suggestions. I tried to understand <a href="https://stackoverflow.com/questions/1010583/mathematical-equation-manipulation-in-python">this implementation</a> but failed to see where I put the arithmetic rules. I tried to read the Sympy source code but I don't know were to look for what I am looking for. I thought of defining certain rules in a txt files. For example u - v + v = u and tried look how to apply this rule to the equations.</p>
  
  <p>Do any of you have an idea how I could design this? </p>