title: Sympy Subs, Replace, and Xreplace not working with expressions
body: <p>I am trying to substitute an expression that is the output of a solved system of equations and am getting errors.</p>
  <pre><code>q,a,b,c=symbols('q,a,b,c')
  def p(q):
      return a-b*q
  some_equation=eqn1-eqn2
  new_equation=sol(some_equation,q)
  </code></pre>
  <p>New equation returns</p>
  <pre><code>[(a-c)/(2*b)]
  </code></pre>
  <p>when I use p(q).subs(q,new_equation) I get p(q) and return gives me a type error no matter what I do. Xreplace throws a Sympify error. Any suggestions to get what should be a simple sub to work???</p>