Consider following polynomials.
- 2x3 + 5x2+8x+3
This is how the first polynomial is represented using nodes.
This is how the second is represented using nodes.
The node consists of 2 parts. First part has the coefficient and the second part consists of the power of the variable.
Addition of polynomials
Adding above polynomials is as following.
Coefficients of same powered nodes are added together, powers are not added and they remain same.
Multiplication of polynomials
Multiplication of above polynomials is as following.
Each and every node of the first polynomial is multiplied with each and every node of the second polynomial.
When multiplying, the coefficients are multiplied and the powers are added. Then nodes with the same powers are added.
Edited and Posted By: