title: Mathematical equation manipulation in Python
body: <p>I want to develop a GUI application which displays a given mathematical equation. When you click upon a particular variable in the equation to signify that it is the unknown variable ie., to be calculated, the equation transforms itself to evaluate the required unknown variable.</p>
  
  <p>For example:</p>
  
  <hr>
  
  <pre><code>a = (b+c*d)/e
  </code></pre>
  
  <p><i>Let us suppose that I click upon "d" to signify that it is the unknown variable. Then the equation should be re-structured to:</i></p>
  
  <pre><code>d = (a*e - b)/c
  </code></pre>
  
  <hr>
  
  <p>As of now, I just want to know how I can go about rearranging the given equation based on user input. One suggestion I got from my brother was to use pre-fix/post-fix notational representation in back end to evaluate it.</p>
  
  <p>Is that the only way to go or is there any simpler suggestion?
  Also, I will be using not only basic mathematical functions but also trignometric and calculus (basic I think. No partial differential calculus and all that) as well. I think that the pre/post-fix notation evaluation might not be helpful in evaluation higher mathematical functions. </p>
  
  <p>But that is just my opinion, so please point out if I am wrong.
  Also, I will be using <a href="http://en.wikipedia.org/wiki/SymPy" rel="noreferrer">SymPy</a> for mathematical evaluation so evaluation of a given mathematical equation is not a problem, creating a specific equation from a given generic one is my main problem.</p>