[ 
https://issues.apache.org/jira/browse/MATH-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831637#action_12831637
 ] 

Luc Maisonobe commented on MATH-341:
------------------------------------

I will fix the documentation.

The coefficients are valid when the number of points is reduced (for example 
consider only the 8 or 10 last points, it should work). Also note that 
polynomials in lagrangian form should really stay in this form and should not 
be converted to the canonical sum of monomials. It IS ill-conditioned so 
attempting this for high degree is not advised.

The oscillations you see are not an implementation problem, the mathematical 
solution is really like this. This is a theoretical problem known as Runge's 
phenomenon. See for example 
[http://demonstrations.wolfram.com/RungesPhenomenon/] and especially the high 
degree versions at the bottom of the page. You will see huge interpolation 
error at the end of the interval. When using polynomial interpolation, 
increasing the degree and the number of points but keeping them equidistant 
does NOT reduce maximal error (in fact for some functions error will tend 
towards infinity). The expression perfectly fits the sample points you provide 
but it has no information of what to do between them.

Polynomial interpolation should really be used with care. If you want smoother 
behavior, you should use several lower degrees polynomials each covering a 
subrange of your data.


> Test for firsst Derivative in PolynomialFunction ERROR
> ------------------------------------------------------
>
>                 Key: MATH-341
>                 URL: https://issues.apache.org/jira/browse/MATH-341
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Roger BAll
>         Attachments: FirstDerivativePolyNomTest.java
>
>
> I have written the attached test using our data for generating a curve 
> function
> However the first derivative test fails see: 
> testfirstDerivativeComparisonFullPower
> Either my test is in error or there is a bug in PolynomialFunction class.
> Roger Ball
> Creoss Business Solutions 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to