question archive In Java and non of the posted work please do not copy test data 1 1

In Java and non of the posted work please do not copy test data 1 1

Subject:Computer SciencePrice: Bought3

In Java and non of the posted work please do not copy test data 1 1.5 0 2 3 3.25 3 1.67 Construct a program that asks the user for a text file which has the x and f(x) values. It then reads the data from this file creates and creates a divided difference table and uses that to create the interpolating polynomial. Print the polynomial in both the Newton's form and Lagrange's form. The example below only shows the Newton's form polynomial, Lagrange's polynomial and the simplified polynomial. You have to print polynomial in all three forms (Newton's, Lagrange and Simplified) The sample output of your program for this input file (download the txt file here Download here) should print out the divided difference table and the interpolating polynomial as shown below: x f[] f[ , ] f[ , , ] f[ , , , ] 1 3 1/2 3/2 13/4 1/3 1/6 -2 0 3 -5/3 -2/3 2 5/3 Interpolating polynomial in Newton's form is: 3 + 1/2(x-1) +1/3(x-1)(x-3/2) - 2(x-1)(x-3/2)x Interpolating polynomial in Laagrange's form is: 6(x-3/2)(x)(x-2) - 26/3(x-1)(x)(x-2) - (x-1)(x-3/2)(x-2) + 5/3(x-1)(x-3/2)(x) Simplified polynomial is: -2x^3 + 5.334x^2 - 3.334x + 3 Your program should work on any data (at most 50 node points) and not just the above sample data. If you are struggling to print the divided difference table in the above pyramid format, you can print it in the simpler triangular format instead. Also, you don't have to use fractions, you can convert them to decimal numbers and use those instead.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions