Question: 1. An ascending polynomial may be represented as a list of its coefficients. a) Write a Miranda function 'polAdd p q' to add two ascending

1. An ascending polynomial may be represented as a list of its coefficients.

a) Write a Miranda function 'polAdd p q' to add two ascending polynomials. Note that the polynomials need not be of the same degree.

b) Write a Miranda function 'polSub p q' to subtract two descending polynomials.

c) Write a Miranda function 'polEval p x' to evaluate a polynomial p at the value x.

d) Physicist's Hermite polynomials are defined by the recurrence

H_(n+1)(x) = 2xH_n (x) - 2nH_(n-1) (x), n >= 1 H_0 (x) = 1 H_1 (x) = 2x

Write a Miranda function to generate Hermite polynomials. Note that multiplication of an ascending polynomial by x only requires a 0 to be prepended to the list representation.

The first eleven polynomials are available on Wikipedia.

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!