Newton's method xnew=x-f(x)/f'(x) can be used to obtain the real or complex roots of polynomials with real or complex coefficients.
The following program segment (more often than not) solves the complex polynomial (roots are printed to 3 decimal places): You are prompted for the degree of the polynomial and the coefficients, highest power first, constant term last (the RHS is zero.) How is the rate of change calculated for a complex polynomial? Numerical approximations or partial derivatives can be used, but even the apparently crude method of using a 'polynomial' derivative gives surprisingly good results. The approximation is checked for validity, before the program performs division in order to obtain the remaining roots. If the program gets stuck, you could try a different seed (initial x, y values.) It is also possible to modify the program in order to obtain fractal boundaries between the regions of convergence for the different roots: Do you want to view the source code? There is also a simple demonstration
Electronics links:
Computer Projects: