Jump to content

Finding a polynomial


here

Recommended Posts

Firstly you link doesn't work properly in all browsers.

 

Secondly, it doesn't work as expected in Microsoft Edge in Windows10.

 

Your example contains 6 data points, enough to establish six unknown coefficients.

Yet your example insists that the data is from a third degree polynomial, whatever degree I ask for.

 

So is this a cubic spline approximation or what?

Edited by studiot
Link to comment
Share on other sites

It works fine in IE11,FF and chrome. I did not test it in edge. Can you please tell me what is the issue exactly.

 

 

Your example contains 6 data points, enough to establish six unknown coefficients.

 

Sorry but you are wrong. Any polynomial goes through infinite points. The points in my page are only passed by polynomial of degree 3 not else. I have just added more comment in the result.

Edited by here
Link to comment
Share on other sites

 

Sorry but you are wrong. Any polynomial goes through infinite points. The points in my page are only passed by polynomial of degree 3 not else. I have just added more comment in the result.

 

 

The general first order polynomial has two coefficients.

The general second order polynomial has three coefficients.

The general third order polynomial has four coefficients.

The general fourth order polynomial has five coefficients.

The general fifth order polynomial has six coefficients.

and so on

 

But straight substitution of the x, y values at the data points you can determine these by solving the set of linear simultaneous equations that produces.

 

I was not wrong.

 

If, as in the question I asked and you did not reply to, you wish to fit derivatives as well then you need more data points, which was why I asked you about cubic splines.

 

In reply to your question

 

My office pc has IE 8, on windows XP. and opened the page, but it was not interactive at all, nor did it offer a 'solution'.

 

The windows10 machine with edge opened the page and displayed the cubic solution, (I assume this was actually correct, I did not check) but retained it when I operated the drop down box and selected other values of polynomial degree to try.

Link to comment
Share on other sites

 

 

So is this a cubic spline approximation or what?

No.

 

 

 

But straight substitution of the x, y values at the data points you can determine these by solving the set of linear simultaneous equations that produces

This if you know the degree and in this case it is not easy especially for forth degree and above.

Moreover, if you have only set of points that a polynomial goes through but you don't know the degree, can you detect the degree and the formula?

Edited by here
Link to comment
Share on other sites

 

This if you know the degree and in this case it is not easy especially for forth degree and above.

Moreover, if you have only set of points that a polynomial goes through but you don't know the degree, can you detect the degree and the formula?

 

 

Since we are using computer the solution of 6 or 10 linear simultaneous equations presents no more difficulty than the solution of two.

There are even efficient schemes for partitioning the matrices when the system is too big to fit on the computer in one go.

This is often the case in engineering calculations where sets of thousands of such equations have to be solved.

 

However if you have too much data, as you do in your example, your system is overdetermined, so you cannot uniquely find a solution, unless there is linear dependency.

Edited by studiot
Link to comment
Share on other sites

Is there any software that can solve such this problem without determining the degree?

I mean, if I give you 10 points passed by cubic polynomial but you don't know it is cubic polynomial. can you solve it by any software?

Link to comment
Share on other sites

Of course, but it is now a statistical problem, of curve fitting eg by least squares.

 

 

Do you know the types of polynomial you can use to fit to a set of data, and do you understand what I meant about spline curves and derivatives?

 

eg

Collocating polynomial

Minimax polymial

Orthogonal polynomials eg

Tchebycheff

Link to comment
Share on other sites

My solution is accurate 100% and easy. You can do it easily in Excel. Are the methods you mentioned easy?

Can you give me an example how you can determine the degree?

Use the points:

x,y

2,0

5,24

6,60

8,210

9,336

Edited by here
Link to comment
Share on other sites

 

Can you give me an example how you can determine the degree?

 

 

Surely you understand that you can't?

 

Here are two examples

 

What polynomial(s) pass(es) through the points (0,0) and (4,4) ?

 

What polynomial(s) pass(es) through the points (0,0) and (2,8) ?

 

Now for the difficult one

 

What polynomial(s) pass(es) through the points (0,0) and (1,1) ?

Link to comment
Share on other sites

I really don't see what that is supposed to mean.

 

You can pass a polynomial of any degree you choose through the points (0,0) and (1,1).

 

This proves that you cannot determine the degree of the polynomial from the values at the points.

 

This is also true of other more general sets of points, but is less easy to see.

 

You have to choose beforehand the polynomial degree you want to fit to a set of data.

Edited by studiot
Link to comment
Share on other sites

Thanks.

If 5 points are passed by cubic polynomial, then there is no quartic polynomial goes through these points. Is it right?

Edited by here
Link to comment
Share on other sites

If by "quartic", you mean "strictly quartic" - that is, that the polynomial must have a nonzero coefficient for x^4 - then that is correct. The proof is that cubic polynomials are quartic polynomials - and that through any five points (with distinct x-values) there is a unique quartic (not necessarily strict quartic).

Link to comment
Share on other sites

The Lagrange interpolation formula for n points is a polynomial of degree n-1, so five points can be fit by a quartic.

But not all by a "strict" quartic - that is, by a quartic such that the coefficient of x^4 is nonzero.

 

However, any five points with distinct x-values can be fit by a not-necessarily-strict quartic.

Link to comment
Share on other sites

uncool,
f(x) = Ax^4 + Bx^3+Cx^2+Dx+E where A=0
Is it quartic or cubic?
If it could be quartic, can you please ignore this concept to avoid a confusion!
I understood what you said but I need more verification.

If 10 points passed by 2 x^3 + x^2 + 5, these points could not be passed by polynomial of degree 4,5,6,7,8 and 9 which coefficient of highest degree is nonzero. So, there is no polynomial based on the formula (Ax^4 + Bx^3+Cx^2+Dx+E where A<>0 ) goes through these points.

Correct?

Edited by here
Link to comment
Share on other sites

uncool,

f(x) = Ax^4 + Bx^3+Cx^2+Dx+E where A=0

Is it quartic or cubic?

It is both a cubic and a quartic. Polynomials are best understood as "nesting" - all constants are linear, all linear polynomials are quadratic, all quadratic polynomials are cubic, etc.

If it could be quartic, can you please ignore this concept to avoid a confusion!

I understood what you said but I need more verification.

 

If 10 points passed by 2 x^3 + x^2 + 5, these points could not be passed by polynomial of degree 4,5,6,7,8 and 9 which coefficient of highest degree is nonzero. So, there is no polynomial based on the formula (Ax^4 + Bx^3+Cx^2+Dx+E where A<>0 ) goes through these points.

 

Correct?

No polynomial with nonzero A, correct. Edited by uncool
Link to comment
Share on other sites

But not all by a "strict" quartic - that is, by a quartic such that the coefficient of x^4 is nonzero.

 

However, any five points with distinct x-values can be fit by a not-necessarily-strict quartic.

True - if the points all have the same y values it is a constant.

Link to comment
Share on other sites

Is there any proof?

Any proof of what? That there is no "strict" quartic passing through those points?

 

Assume both a cubic and a "strict" quartic pass through the set of 5 points with distinct x-values. Then their difference is a "strict" quartic which has 5 zeroes. Some elementary polynomial algebra demonstrates that this is impossible.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.