Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

allroot

Introduction

Allroot is an implementation of a numerical root solver for polynomials in the form of:

y = an x n + an-1xn-1...+a0

Methodology

This code uses the Newton's method to zero in on the root, the answer is displayed. To find additional roots, synthetic division is done to eliminate the root from the equation. This process is repeated multiple times until Newton's method is non-converging.

Newton's Method

x1 = x0 - f( x0 ) / f'( x0 )

Instructions

  1. Enter the degree of the polynomial. This means the exponent of the highest variable of the polynomial and press the Enter key.
  2. Enter the coefficients of each variable exponent with the Enter key pressed after each coefficent is entered. If there is no coefficent to a corresponding exponent, enter 0.
  3. After all the coefficients are entered, the roots of the polynomial will be displayed below

Example

y = 2x3+4x2-2

For this example, enter 3 for the exponent then 2, 4, 0 and -2 for the coefficents

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages