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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started