381 - A2 - Rootfinding can be unstable

337 days ago by Professor381

var('x,k') f = product((x-k),k,1,20) g = f+0.00000001*x^19 print(f) # show(solve(f,x)) G = plot(f,(x,0.8,20.2)) G += plot(g,(x,0.8,20.2),color='red') G.show(ymin=-10000000000000,ymax=10000000000000) 
       
x^20 - 210*x^19 + 20615*x^18 - 1256850*x^17 + 53327946*x^16 -
1672280820*x^15 + 40171771630*x^14 - 756111184500*x^13 +
11310276995381*x^12 - 135585182899530*x^11 + 1307535010540395*x^10 -
10142299865511450*x^9 + 63030812099294896*x^8 - 311333643161390640*x^7 +
1206647803780373360*x^6 - 3599979517947607200*x^5 +
8037811822645051776*x^4 - 12870931245150988800*x^3 +
13803759753640704000*x^2 - 8752948036761600000*x + 2432902008176640000
x^20 - 210*x^19 + 20615*x^18 - 1256850*x^17 + 53327946*x^16 - 1672280820*x^15 + 40171771630*x^14 - 756111184500*x^13 + 11310276995381*x^12 - 135585182899530*x^11 + 1307535010540395*x^10 - 10142299865511450*x^9 + 63030812099294896*x^8 - 311333643161390640*x^7 + 1206647803780373360*x^6 - 3599979517947607200*x^5 + 8037811822645051776*x^4 - 12870931245150988800*x^3 + 13803759753640704000*x^2 - 8752948036761600000*x + 2432902008176640000
f = x^20 - 210*x^19 + 20615*x^18 - 1256850*x^17 + 53327946*x^16 - 1672280820*x^15 + 40171771630*x^14 - 756111184500*x^13 + 11310276995381*x^12 - 135585182899530*x^11 + 1307535010540395*x^10 - 10142299865511450*x^9 + 63030812099294896*x^8 - 311333643161390640*x^7 + 1206647803780373360*x^6 - 3599979517947607200*x^5 + 8037811822645051776*x^4 - 12870931245150988800*x^3 + 13803759753640704000*x^2 - 8752948036761600000*x + 2432902008176640000