We can now formulate some programming tasks:
- Write a class called PolyNomial with the attributes points, degree, coeff, and basis, where:
- points is a list of tuples .
- degree is the degree of the corresponding interpolation polynomial.
- coeff contains the polynomial coefficients.
- basis is a string stating which representation is used.
- Provide the class with a method for evaluating the polynomial at a given point.
- Provide the class with a method called plot that plots the polynomial over a given interval.
- Write a method called __add__ that returns a polynomial that is the sum of two polynomials. Be aware that only in the monomial case the sum can be computed by just summing up the coefficients.
- Write a method that computes the coefficients of the polynomial represented in a monomial form.
- Write a method that computes the polynomial's companion matrix.
- Write a method that computes the zeros of the polynomial by computing the eigenvalues of...