solution

if you have the following polynomial function p(x):

Px=an Xn+an-1Xn-1+an-2 Xn-2+…+ a1x+a0

Where an,a n-1…a0 are constant coefficients ? X=x0

do the following list data structure

The list should contain the coefficients of the polynomial function such that the position 0 has the coefficient a0 and the position 1 has the coefficient a1 while the position n has the coefficient an

You should create the number of polynomial functions you should evaluate randomly between (1 and 10)

For example, if the number is 7, you should create a dynamic array of integers of size 7 and fill it with random integer n between (0 and 12) where n is representing the heist coefficient of the polynomial function, for example if n=4 then the max degree is 4 and you should create a list of 5 integer items to fill it with the function double coefficients randomly between (-100.0 to + 100.0)

For example, if the five coefficients are a0=4.5 and a1=0 and a2 = -55.4 and a3= -22 and a4=11.75 then the polynomial function P(x) = 11.75 X4 – 22 X3 – 55.5 X2 + 4.5

Then each function should determine the x0 to be solved randomly between (-10 and 10). i.e. solve it for x0=2, so P(2)= – 205.5

  • Find the function that has the largest value.

  • Which function that has more zero coefficients.

  • Choose random coefficient and makes it 0. (find the value of the function)

  • Choose random function and print it in polynomial form p(x)=….

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp