title: (python) solving for roots of equation that includes probabilistic distribution
body: <p>I am quite new to this, but I need solution to mathematical problem, which involves finding roots of a function, that involves cumulative density function (several).</p>
  
  <p>For simplicity I tried to code similar procedure, but with as simple function as possible but even that doesn't work.</p>
  
  <p>Would anyone tell me please what am I doing wrong?</p>
  
  <pre><code>from scipy.optimize import fsolve
  import sympy as sy
  import numpy as np
  from scipy.stats import norm
  y=sy.Symbol('y')
  
  def cdf(x):
   cdf_norm=norm.cdf(x,100,20)
   return cdf_norm
  
  result=fsolve(y**2-14*y+7-cdf(y))
  print(result)
  </code></pre>