Is it possible to interpolate between two polynomials?

  • Context: Undergrad 
  • Thread starter Thread starter GB_Joe
  • Start date Start date
  • Tags Tags
    Polynomials
Click For Summary

Discussion Overview

The discussion revolves around the problem of interpolating between two polynomials, specifically focusing on how to create an equation that accurately represents the values between these polynomials. Participants explore different methods of interpolation, including coefficient-based approaches and value-based approaches, while addressing the challenges and limitations of each method.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Joe expresses a desire to interpolate between two related polynomials that run parallel, aiming to divide the gap into five equal parts, but finds that coefficient-based interpolation does not yield satisfactory results.
  • Some participants suggest that different methods of interpolation exist, such as using a "homotopy" function, which connects two functions continuously.
  • One participant points out that Joe's manual interpolation along the x-axis is preferable to the coefficient-based method along the y-axis, prompting Joe to reflect on the physical meaning behind the interpolation.
  • Joe describes his specific application involving performance curves for variable-pitch fans, indicating that he needs a method to manipulate equations rather than relying solely on data values.
  • Joe proposes a method for interpolation based on specific values, but another participant warns that this may lead back to the original coefficient-based curve, suggesting that inverting equations may be necessary for accurate results.
  • Joe acknowledges confusion in his calculations but indicates that he has found a method that seems to work for his application, despite initial doubts about his mathematical skills.

Areas of Agreement / Disagreement

The discussion contains multiple competing views on the best method for interpolation, with no consensus reached. Participants express differing opinions on the effectiveness of various approaches and the implications of their results.

Contextual Notes

Joe's understanding of the mathematical concepts appears to be limited, which may affect the clarity of his contributions. The discussion also highlights the challenges of applying theoretical methods to practical scenarios, particularly in the context of physical applications.

Who May Find This Useful

Readers interested in polynomial interpolation, mathematical modeling, and applications in engineering or physics may find this discussion relevant.

GB_Joe
Messages
5
Reaction score
0
Hi everyone! Having spent many fruitless hours Googling this I stumbled upon this forum, and am hoping you may be able to help...

I'm looking for a way to interpolate between two polynomials. These two lines are related and run along in a near-parallel fashion, and I want to divide the gap between them into 5 equal parts. I can do it by creating a table of values, but really I want to be able to create an equation directly. Simply dividing up the difference between the coefficients produces something which looks close to what I want (it's a similar shape and lies between the original two lines), but is clearly wrong.

Am I making sense?!? Does anyone have any ideas, or do I need to provide more detail? Am I even in the right forum?

Cheers,
Joe.
 
Mathematics news on Phys.org
GB_Joe said:
Hi everyone! Having spent many fruitless hours Googling this I stumbled upon this forum, and am hoping you may be able to help...

I'm looking for a way to interpolate between two polynomials. These two lines are related and run along in a near-parallel fashion, and I want to divide the gap between them into 5 equal parts. I can do it by creating a table of values, but really I want to be able to create an equation directly. Simply dividing up the difference between the coefficients produces something which looks close to what I want (it's a similar shape and lies between the original two lines), but is clearly wrong.

Am I making sense?!? Does anyone have any ideas, or do I need to provide more detail? Am I even in the right forum?

Cheers,
Joe.
Using the divided difference produced a polynomial similar to what you want, but you say it is clearly wrong. You need to elaborate, i.e. why is it wrong?
 
Okay!

My two starting polynomials both go to f(x) = 0 at the maximum limit of x. My attempts at interpolation all go down well below 0.

I've attached a couple of pics to make it easier to understand. The first shows simple interpolation of values, all nice and neat, just what you'd expect. The second is done by interpolating the coefficients. This shows it pretty clearly - they're not a million miles away, but they're obviously not right.

Incidentally, there's no convergence between the two methods at the top end, although it's not so obvious from the pics. You can see it if you flick between them.

I guess I'm surprised that the error is greatest at f(x)=0... but I'm coming at this from a very non-scientific angle, and I clearly don't know what I'm doing!

Cheers, and thanks for replying,
Joe.
 

Attachments

  • interpolate1.png
    interpolate1.png
    7.2 KB · Views: 820
  • interpolate2.png
    interpolate2.png
    8 KB · Views: 795
I couldn't access your attachments.
 
Just as there are many different ways to interpolate between two numbers, there are many different ways to interpolate functions.

Typically, what we do is talk about a "homotopy" which is a function, [itex]\phi(x, t)[/itex], with t between and 1, continuous in both variables, such that [itex]\phi(x,0)= f_0(x)[/itex] and [itex]\phi(x, 1)= f_1(x)[/itex].
 
Last edited by a moderator:
I don't know if you're still here Joe, but now that those attachments are visible it is clear that the one you're doing manually (blue) is dividing the intervals along the "x" axis while the one you're doing via the coefficients (red) is (as expected) dividing the intervals along the "y" axis.

Can you explain why one (equal divisions along x axis) is preferable to the other (equal divisions along y axis)?
 
@ uart:

I am still here! Sorry, I'm a part-timer, looking after the kids Weds. and Thurs. so try to avoid thinking about work then!

Now that you've said it, it's obvious... thank you! The reason that one is right is that division across the x-axis is what you get by experiment. These are performance curves for variable-pitch fans, Volume Flow along the x-axis and Static Pressure along y. We have pretty much infinite combinations we can set them to, so we can't test everything, and I need a way to manipulate the equations rather than data values.

Is it even possible to interpolate along x in this way?

@ HallsofIvy:

:rolleyes:
That, my friend, is going to need a whole lot of unpacking... it's been a looooong time since I did any real maths, and I was rubbish even then...! Please don't be concerned about patronising me, start off by assuming I'm an idiot, I won't take offence!

Thanks to all for your help so far!
Joe.
 
Last edited:
Okay then...

I think I may have figured this out, but it's pretty long-winded. Do you think there's a simpler way to do this?

If we say the lower curve is "15" and the upper is "20", the interpolated ones are 16...19.

So, [itex]x_{16} = (4x_{15}+x_{20})/5[/itex]

and [itex]f(x_{16})=(4f(x_{15})+f(x_{20}))/5[/itex]

and so on.

Well, it doesn't look so bad when you write it out like that... and computers are good at this calculation stuff, aren't they?!?

Joe.
 
GB_Joe said:
Okay then...

I think I may have figured this out, but it's pretty long-winded. Do you think there's a simpler way to do this?

If we say the lower curve is "15" and the upper is "20", the interpolated ones are 16...19.

So, [itex]x_{16} = (4x_{15}+x_{20})/5[/itex]

and [itex]f(x_{16})=(4f(x_{15})+f(x_{20}))/5[/itex]

and so on.

Well, it doesn't look so bad when you write it out like that... and computers are good at this calculation stuff, aren't they?!?

Joe.

No that will ultimately just get you the red curve again.

If you're sure that the blue curve is the one that has the correct physical meaning for your application then there's really no other way than inverting your equations (either algebraically or numerically), so that you can calculate Flow for a given Pressure rather than the other way around.

Like this for example.

- For a given Pressure find Flow_15 and Flow_20.

- Now form Flow_16 = 0.8 Flow_15 + 0.2 Flow20 and so on.

These are your new x values all corresponding to the same value of y (as in "for a given pressure" in the first step). You have to repeat this for each different pressure level that you wish to plot.
 
  • #10
No that will ultimately just get you the red curve again.

Well... it didn't!:confused:

I've ended up with identical data values to when I produced the blue curves.

Initially I did get the same as the red curves, but I was using values of [itex]x_{16}[/itex] in the second equation instead of [itex]x_{15}[/itex] and [itex]x_{20}[/itex].

I don't trust my maths enough to do this kind of thing theoretically, which is why I always end up producing curves and stuff, but it seems to have done the trick!
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
7K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K