Assignment 5 (100 pts)

北美数学作业代写 It should carry out deflation and root polishing via Newton’s method.  Also, use the solver implemented in Problem 4 as a  subroutine.

Due before class

In all programming problems you must use a general purpose programming language. Do not use built-in routines from a mathematical software such as Mathematica, Matlab, or Maple. You need to turn in your code on Canvas and its run time results on the hard copy.

1.(a) (9  pts)  Implement a procedure evalPoly(n,  a[],  t,  v[]) which takes as input the n + 1coefficients of a polynomial of degree n stored in the array a[].    北美数学作业代写

Here a[n] is the leading  At a point t, the procedure produces the values of the polynomial and its derivative in v[0] and v[1], respectively. Your procedure should support complex numbers.

(b) (6 pts) Use the procedure to evaluate the polynomial p(x) = x8 − 170x6 + 7392x4 − 39712x2 +51200 at 1.414214 and 1 + 2i. Also, obtain its derivatives at these two points.

北美数学作业代写

2.(26 pts) In this problem you are asked to implement fast Fourier transform and polynomial multiplication. Your code should have at least the followingcomponents:     北美数学作业代写

(a)(10 pts) A procedure DFT(n,  a[],  ahat[]) which takes as input the coefficients a[0], a[1], . . ., a[n] of a polynomial of degree n, where a[n] is the leading coefficient. It generates an array ahat[] that stores the images of these coefficients under the discrete Fourier transform.

(b)(6 pts)  A  procedure  IDFT(n,  ahat[],  a[])  which  performs  the  inverse  DFT.  Namely,  itoutputs the coefficients a[0], a[1], . . ., a[n] from their images ahat[0], ahat[1], . . ., ahat[n] under DFT.   北美数学作业代写

(c)(6 pts) A  procedure  multiplyPolys(n,  m,  a[],  b[],  c[])  which  uses  FFT  to  compute the product of two polynomials of degrees n and m,  The coefficients of these two polynomials are stored in the arrays a[] and b[], respectively, with leading coefficients a[n] andb[m].  The coefficients of the product polynomial will be stored in the array c[].

(d)(4 pts)  Use  the  procedure multiplyPolys to  compute  the  product  of  the  two  polynomials below:

p(x) = x7 − 70.1x6 + 2.4x5 − 3.7x4 + 7.4x3 − 10.8x2 + 10.8x − 6.8

q(x) = x8 − 170x6 + 0.614x5 + 7392x4 + 104.2x3 − 39712x2 + 51200

3.(a) (20 pts) Write code to find the real roots of cubic and quartic polynomials. You should use their closed forms given in the notes.    北美数学作业代写

(b) (4 pts) Run your code on the following two polynomials:

p(x) = 110x3 − 23x2 + 87x + 4

q(x) = 43x4 + 1.34x3 − 7x2 − 3400

  1. (a) (27  pts)  Implement  Muller’s  method.   Your  code  must  be  able  to  handle  complex  arith- metic.  It should carry out deflation and root polishing via Newton’s method.  Also, use the solver implemented in Problem 4 as a  subroutine.   北美数学作业代写

(b)  (8  pts)  Use  Muller’s  method  to  find  all  the  zeros,  real  and  complex,  of  the  following  two polynomials:

p(x) = x5 − 3.7x4 + 7.4x3 − 10.8x2 + 10.8x − 6.8

q(x)= x9 − 0.843121x8 − 8.35979x7 + 10.1887x6 + 14.6196x5 − 25.7634x4 + 9.15636x3

− 0.360995x2 − 0.180591x + 0.00787276

北美数学作业代写

 

联系客服提交作业获取报价与时间?

最快2~12小时即可完成,用技术和耐心帮助客户高效高质量完成作业.