title: Solving an implicit quadratic system of 3 variables
body: <p>I am trying to solve a system of equations that has 3 variables and a variable number of equations.</p>
  
  <p>Basically, the system is between 5 and 12 equations long, and regardless of how many equations there are, I am trying to solve for 3 variables.</p>
  
  <p>It looks like this:</p>
  
  <pre><code>(x-A)**2 + (y-B)**2 + (z-C)**2 = (c(t-d))**2
  </code></pre>
  
  <p>I know A,B,C, and the whole right side.
  A,B,C and the right side are all arrays of length n, where n varies randomly between 5 and 12. So then we have a system of equations that changes in size. 
  I believe I need to use numpy's lstsq function and do something like:</p>
  
  <pre><code>data,data1 = getData()        # I will have to do this for 2 unique systems.
  A   = data[:,0]
  B   = data[:,1]
  C   = data[:,2]
  tid = data[:,3]
  P = (x-A)**2 + (y-B)**2 + (z-C)**2              
  b = tid
  solved = lstsq(P,b)
  print solved
  </code></pre>
  
  <p>This however doesn't work, as we know that x,y,z are implicit, and therefore need to be taken out of P in order for this to work. 
  Help!</p>