【正文】
= fx * x + a[k1]。 } Notice: dfx 要先於 fx 牛頓法解根 (example) f(x) f’(x) x1 x2 )(39。)(21xfxfxxx ????)(39。)(12xfxfxx ?? x1 = xinit。 do { fdf = poly(x, a, n)。 dx = (x, a, n)/(x, a, n)。 x1 = dx。 } while ( fabs(dx) xcrit )。 Scheme input(a) Read n Read a[0]a[n] Return n poly(x,a,n) Horing method Return famp。df 1 3,4 2 5,6 main input n, a[0]a[n] dx = df/f x = x dx |dx|xcrit ? end 2 3,4 5,6 1 no yes Read xinit |xinit|100? Output x yes no Int TwoDouble Project. 4 Root of polynomial ? Using Newton’s method found the root of f(x) = x5 + 2x4 + 4x3 + 8x2+ 3x + 6 with xcrit = 108 xinit =