Question: Polynomials (as one dimensional array) You have learned polynomials in high school, for example, the quadratic polynomial x2 5x + 4, the cubic polynomial x3

Polynomials (as one dimensional array) You have learned polynomials in high school, for example, the quadratic polynomial x2 5x + 4, the cubic polynomial x3 + x + 1 etc. We will / can express x2 5x + 4 as an int array of 3 elements {4, -5, 1} starting with the constant item (or if you like, it can be {1, -5, 4}), and x3 + x + 1 as an int array {1, 1, 0, 1} again starting with the constant item 1. A general polynomial a n x n + a n-1 x n-1 + .. + a1x + a0 is expressed as { a0, a1, .., a n } starting from the lowest degree (constant) term a0. Can you calculate the sum of two polynomials? Can you calculate the product of two polynomials such as a(x) = x +1 and b(x) = x2 + x + 1? The product is x3 + 2x2 + 2x + 1 mathematically, but how do you do that by C# programming (with class concept or as a method like public static double [] product (double [] a, double [] b)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!