Question: Write a Java program that creates a divided difference table from the given data in a text file and uses that to create the interpolating
Write a Java program that creates a divided difference table from the given data in a text file and uses that to create the interpolating polynomial. Print the polynomial in both the Newton's form and Lagrange's form.
The sample output of your program for this input file (download the txt file here) should print out the divided difference table and the interpolating polynomial as shown below:
Interpolating polynomial is: 3 + 1/2(x-1) +1/3(x-1)(x-3/2) - 2(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.
Text file content is as below
1 1.5 0 2
3 3.25 3 1.67
Chrome File Edit View History Bookmarks People Window Help A 100% E U.S Wed 1:07 a E B Assignments CS 301.0 (w x (G newton's divided differen ia x C Write A Program That creates x O NEWTON'S DIVIDED DIFFER x G read text file into array java x Hung c Secure https://blackboard.cpp.edi id 138839-1&content, ida 3333557-1&mod... Ar du E w. u/webapps/blackboard/content/listContent.jsp?course Apps school T Popcorn Time online warez-BB iMojado e The PirateBay ModMyl aFacebook YouTube a Amazon craigslist eBay Other Bookmarks f[] 1/2 3/2 13/4 1/3 1/6 5/3 2/3 5/3 Show Al X input.txt roj3.zip
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
