Murphy’s Law

I should have guessed. As soon as I join Math Forum, I figure out the problem. I had an error in the way I was transposing x data, which was showing up as a matrix error. The sum of products (SP) that I tried and failed, was really the right solution.

Here is the final least squares matrix for solving a 3rd degree polynomial:

∑X12 - (∑x1)2/n ∑(x1*x2)-((∑x1)(∑x2))/n ∑(x1*x3)-((∑x1)(∑x3))/n

mirror of cell (1,2) ∑X22 - (∑x2)2/n ∑(x2*x3)-((∑x2)(∑x3))/n

mirror of cell (1,3) mirror of cell (2,3) ∑X32 - (∑x3)2/n

Now just invert and multiply by the y matrix to get your equation coefficients.

TJ

PS. These posts eliminate subscript and superscript, so I hope you can tell which is which. ∑X22 is the sum of x2 squared, etc. Email me if you want a readable pdf copy.