I have the values
x = 0 => y = 0
x = 1 => y = 1
x = 3 => y = 27
x = 4 => y = 64
I want to create a polynomial function using JAVA to create the function x^3. The program should create the function and display it, and if i give any values it should calculate the interpolated values. I have created a function which just produced the values using Aitken but it doesnt produce the function and it is really hard to understand how to do the function. Because i dont know how to put the X value as X in the java program.
I have the same problem with you, and finally got the solution. Just look at Apache commons math API. You can use both Lagrange's or Newton's method to compute the coefficient of each polynomial degree.
You can download the .jar file of the API here, and the documentations here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With