Mma Fit function
- To: mathgroup at yoda.physics.unc.edu
- Subject: Mma Fit function
- From: herrmann at siam.math.tamu.edu (joe herrmann)
- Date: Fri, 20 Nov 1992 15:36:18 -0600
Hello Math Group, Why does the fit function lose accuracy as I go from a polynomial of degree 8 to a polynomial of degree 9 in the following: Mathematica 2.0 for NeXT Copyright 1988-91 Wolfram Research, Inc. -- NeXT graphics initialized -- In[1]:= D1={{0, 19.6}, {0.92, 16.87}, {1.84, 15.06}, {2.94, 11.15}, {3.87, 16.31}, {4.97, 12.65}, {5.90, 13.80}, {7.00, 12.95}, {7.92, 14.70}, {10.95, 27.04}, {12.03, 28.63}, {12.95, 27.13}, {13.87, 23.34}, {14.98, 24.11}, {15.90, 22.59},{16.82, 21.35}, {17.93, 21.35}, {19.03, 22.59}, {19.95, 22.10},{23.88, 19.57}, {24.98, 17.18}} Out[1]= {{0, 19.6}, {0.92, 16.87}, {1.84, 15.06}, {2.94, 11.15}, > {3.87, 16.31}, {4.97, 12.65}, {5.9, 13.8}, {7., 12.95}, {7.92, 14.7}, > {10.95, 27.04}, {12.03, 28.63}, {12.95, 27.13}, {13.87, 23.34}, > {14.98, 24.11}, {15.9, 22.59}, {16.82, 21.35}, {17.93, 21.35}, > {19.03, 22.59}, {19.95, 22.1}, {23.88, 19.57}, {24.98, 17.18}} In[2]:= Fit[D1,Table[x^i,{i,0,8}],x] 2 3 4 Out[2]= 19.8808 - 7.54938 x + 4.91733 x - 1.68623 x + 0.297257 x - 5 6 7 -7 8 > 0.0276971 x + 0.00138897 x - 0.0000355021 x + 3.63124 10 x In[4]:= Fit[D1,Table[x^i,{i,0,9}],x] 2 3 4 Out[4]= 0.101922 + 0.275108 x + 0.641608 x + 0.885697 x - 0.415304 x + 5 6 7 -6 8 > 0.0721119 x - 0.0063344 x + 0.000300326 x - 7.33029 10 x + -8 9 > 7.22822 10 x Thanks for your help. I encountered this problem while teaching a mathematics modeling class. Joe Herrmann herrmann at math.tamu.edu