title: c# Numerical Polynomial Regression
body: <p>I'm beginning one of my first C# projects--need to find the curve fit for several x-y data points. </p>
  
  <p>For example:</p>
  
  <p>x: 1,2,3,4,5,6
  y: 0.5,5,0.5,2.5,5,0.5</p>
  
  <p>As it happens, the proper curve fit I need for these points is a sixth-order polynomial, according to excel.</p>
  
  <p>How can I get the coefficients and exponents of this curve to write the proper expression in C#? I want to stay away from libraries, because this will most likely end up being converted to C for use on microprocessors.</p>
  
  <p><em><strong>I'm new to C# and know very little about hardware/software integration.</em></strong></p>
  
  <p>That said, I'm reading about numerical methodology right now...step two of this project will be to take the curve and numerically integrate between successive minimums...</p>
  
  <p>Any advice/pointers are greatly appreciated. </p>
  
  <p>The input will be given by six x-y coordinates...</p>
  
  <p><strong>Problem #1:</strong>
  How do I write a polynomial given six coordinates? </p>