> On 9 Jul, 04:34, Jerry Avins <j...@ieee.org> wrote:
>> HyeeWang wrote:
>>> On Jul 8, 5:33 pm, Rune Allnor <all...@tele.ntnu.no> wrote:
>
>>>> Given points (x1,y1), (x2,y2), (x3,y3) and the equation
>>>> a x^2 + b x + c = y
>>>> you have three equations in three unknowns. It's a technical
>>>> matter to find a, b and c in terms of (x_i,y_i) from the
>>>> available info.
> ...
>> If the extremum is needed, interpolation is not.
>
> In this particular application one wants one praticular
> point that can be deduced by further reasoning, so one
> don't need to compute that many other points on the parabola,
> as one would in 'proper' interpolation.
>
> So it's a matter of semantics: what is necessary and what
> is sufficient for something to be a 'proper' interpolation?
>
> My view is that finding the parameters of the model is
> sufficient. It seems you think something more is necessary.
Not necessary, but recognizing that the point you want to extrapolate to
is actually a point you're extrapolating from can be useful.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by Clay●July 9, 20092009-07-09
On Jul 8, 10:28=A0pm, HyeeWang <hyeew...@gmail.com> wrote:
> On Jul 9, 12:04=A0am, Clay <c...@claysturner.com> wrote:
>
>
>
>
>
> > On Jul 8, 4:56=A0am, HyeeWang <hyeew...@gmail.com> wrote:
>
> > > I learned a parabola interpolation equation from some articles, but I
> > > am puzzled with the rationality. It is as follws.
>
> > > E =3D I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]
>
> > > where, 3 given =A0points is R(I-1),R(I) and R(I+1),which form a
> > > parabola. R is the resultant function. How can get the extreme =A0poi=
nt
> > > E of parabola by that equation?
>
> > > cheers
> > > HyeeWang
>
> > Hello HyeeWang,
>
> > First you fit a parabola through your three data points. You can use
> > the Lagrange interpolation formula for this. But to make the algebra
> > easy to deal with pick your coordinate so your 3 abscissal (x axis)
> > values are
>
> > -h, 0, h =A0where h is the intersample spacing (assuming uniform sample
> > rate).
>
> > Now your Lagrange formula is a little simpler to work with - it gives
>
> > y(x) =3D (1/2h^2)*( y0x(x-h)-2y1(x^2-h^2)+y2x(x+h))
>
> > where y0,y1, and y2 are your ordinate (y axis) values.
>
> > Take the derivative (with respect to x) and set it equal to zero
>
> > Thus the x value of the extremum is
>
> > x=3D h*(y0-y2) / (y0- 2*y1+y2)
>
> > Remember your zero reference is at the central sample.
>
> > I hope this helps.
>
> > Clay
>
> Thank you. Clay.
>
> =A0I base your idea and use a more general procedure and get the desired
> formula.
>
> =A0Applying the Lagrange formula ,we get
>
> =A0y(x) =3D y0*[(x-x1)*(x-x2)]/[(x0-x1)*(x0-x2)] + y1*[(x-x0)*(x-x2)]/[(x=
1-
> x0)*(x1-x2)]
>
> =A0 + y2*[(x-x0)*(x-x1)]/[(x2-x0)*(x2-x1)] =A0 (1)
>
> =A0The given 3 points are (x0,y0),(x1,y1) and (x2,y2), and
>
> =A0we use the general case ,make x0 x1 x2 to be I-1,I and I.
>
> =A0 Substitue x into the denominator of (1) and make it simpler as
> indicated below.
>
> =A0 y(x) =3D 1/2*yo*[(x-x1)*(x-x2)] - y1*[(x-x0)*(x-x2)] + 1/2*y2*[(x-x0)=
*
> (x-x1)] =A0 (2)
>
> =A0 Take =A0the derivative (with respect to x) for (2) set it equal to
> zero ,
>
> =A0 we can get the desired extremum location =A0exactly.
>
> =A0 Due to my poor mathematic knowledge, I wonder whether Lagrange
> formula make same sense as
>
> =A0 parabola interpolation does,although it acquired a graceful result.- =
Hide quoted text -
>
> - Show quoted text -
The formula I gave is exact, I just used a reference of zero at the
central point. In the original formula you gave, it is at 'I'.
Take my formula and divide it by 'h', so the extremum's position is
now in units of the sample period and then subtract from I. That's how
to get the original formula.
Whether you start with Newton's formula, Lagrange's formula, or even a
barycentric Lagrange formula, you will end up at the same result. This
is because
given N+1 distinct (along x axis) points, there is only one polynomial
that interpolates those points. So using the Lagrange formula is a way
to find the quadratic (2nd order polynomial) that exactly goes through
the three points.
There are other ways to get this as well, but for this example, this
is basically the simplest. Yes you may even set up a Vandermonde
matrix and solve it to find the interpolating polynomial.
If you look carefully at the Lagrange formula it is a sum of weighted
Nth order polynomials (using N+1 points). And of course a sum of Nth
order polynomials has an order of most N - some terms may cancel out.
For example interpolate a constant function.
Each of the polys in the Lagrange formula being summed together acts
like a Kronecker delta function (on the finite set of discrete values
being interpolated over) that has a value of 1 when x=3D=3D the reference
point for the particular poly and a value of zero when evaluated at
any of the other points. And these are weighted by the corresponding
ordinal values.
I hope you understand where all of this comes from now. And also how
to apply shortcuts to make the derivation easier. That's why I didn't
give you the complete quadratic interpolation formula for arbitrary
abcissas. But it is good you went ahead and worked it out.
Clay
Reply by dbd●July 9, 20092009-07-09
On Jul 8, 7:34 pm, Jerry Avins <j...@ieee.org> wrote:
> ...
> If the extremum is needed, interpolation is not.
>
> Jerry
> --
> Engineering is the art of making what you want from things you can get.
> =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF
More accurately: "If only the location of the extremum is desired, no
interpolation has been performed."
Should any inquiring mind desire to know the value of the extremum,
through the use of it's location, then the equations discussed have
been, as stated, "parabolic interpolation equations". And doesn't
HyeeWang have an inquiring mind?
Dale B. Dalrymple
Reply by Rune Allnor●July 9, 20092009-07-09
On 9 Jul, 04:34, Jerry Avins <j...@ieee.org> wrote:
> >> Given points (x1,y1), (x2,y2), (x3,y3) and the equation
>
> >> =A0 =A0 =A0a x^2 + b x + c =3D y
>
> >> you have three equations in three unknowns. It's a technical
> >> matter to find a, b and c in terms of (x_i,y_i) from the
> >> available info.
...
> If the extremum is needed, interpolation is not.
In this particular application one wants one praticular
point that can be deduced by further reasoning, so one
don't need to compute that many other points on the parabola,
as one would in 'proper' interpolation.
So it's a matter of semantics: what is necessary and what
is sufficient for something to be a 'proper' interpolation?
My view is that finding the parameters of the model is
sufficient. It seems you think something more is necessary.
Rune
Reply by Dirk Bell●July 9, 20092009-07-09
On Jul 8, 10:28=A0pm, HyeeWang <hyeew...@gmail.com> wrote:
> On Jul 9, 12:04=A0am, Clay <c...@claysturner.com> wrote:
>
>
>
>
>
> > On Jul 8, 4:56=A0am, HyeeWang <hyeew...@gmail.com> wrote:
>
> > > I learned a parabola interpolation equation from some articles, but I
> > > am puzzled with the rationality. It is as follws.
>
> > > E =3D I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]
>
> > > where, 3 given =A0points is R(I-1),R(I) and R(I+1),which form a
> > > parabola. R is the resultant function. How can get the extreme =A0poi=
nt
> > > E of parabola by that equation?
>
> > > cheers
> > > HyeeWang
>
> > Hello HyeeWang,
>
> > First you fit a parabola through your three data points. You can use
> > the Lagrange interpolation formula for this. But to make the algebra
> > easy to deal with pick your coordinate so your 3 abscissal (x axis)
> > values are
>
> > -h, 0, h =A0where h is the intersample spacing (assuming uniform sample
> > rate).
>
> > Now your Lagrange formula is a little simpler to work with - it gives
>
> > y(x) =3D (1/2h^2)*( y0x(x-h)-2y1(x^2-h^2)+y2x(x+h))
>
> > where y0,y1, and y2 are your ordinate (y axis) values.
>
> > Take the derivative (with respect to x) and set it equal to zero
>
> > Thus the x value of the extremum is
>
> > x=3D h*(y0-y2) / (y0- 2*y1+y2)
>
> > Remember your zero reference is at the central sample.
>
> > I hope this helps.
>
> > Clay
>
> Thank you. Clay.
>
> =A0I base your idea and use a more general procedure and get the desired
> formula.
>
> =A0Applying the Lagrange formula ,we get
>
> =A0y(x) =3D y0*[(x-x1)*(x-x2)]/[(x0-x1)*(x0-x2)] + y1*[(x-x0)*(x-x2)]/[(x=
1-
> x0)*(x1-x2)]
>
> =A0 + y2*[(x-x0)*(x-x1)]/[(x2-x0)*(x2-x1)] =A0 (1)
>
> =A0The given 3 points are (x0,y0),(x1,y1) and (x2,y2), and
>
> =A0we use the general case ,make x0 x1 x2 to be I-1,I and I.
we use the general case ,make x0 x1 x2 to be I-1,I and I+1.
>
> =A0 Substitue x into the denominator of (1) and make it simpler as
> indicated below.
>
> =A0 y(x) =3D 1/2*yo*[(x-x1)*(x-x2)] - y1*[(x-x0)*(x-x2)] + 1/2*y2*[(x-x0)=
*
> (x-x1)] =A0 (2)
>
> =A0 Take =A0the derivative (with respect to x) for (2) set it equal to
> zero ,
>
> =A0 we can get the desired extremum location =A0exactly.
>
> =A0 Due to my poor mathematic knowledge, I wonder whether Lagrange
> formula make same sense as
>
> =A0 parabola interpolation does,although it acquired a graceful result.- =
Hide quoted text -
>
> - Show quoted text -
Shouldn't you get the same result either way? (Probably the reason for
Vlad's response.)
Dirk Bell
Reply by Vladimir Vassilevsky●July 9, 20092009-07-09
HyeeWang wrote:
> I learned a parabola interpolation equation from some articles, but I
> am puzzled with the rationality. It is as follws.
>
> E = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]
>
> where, 3 given points is R(I-1),R(I) and R(I+1),which form a
> parabola. R is the resultant function. How can get the extreme point
> E of parabola by that equation?
>
>
> cheers
> HyeeWang
Reply by Jerry Avins●July 8, 20092009-07-08
HyeeWang wrote:
> On Jul 8, 5:33 pm, Rune Allnor <all...@tele.ntnu.no> wrote:
>> On 8 Jul, 10:56, HyeeWang <hyeew...@gmail.com> wrote:
>>
>>> I learned a parabola interpolation equation from some articles, but I
>>> am puzzled with the rationality. It is as follws.
>>> E = I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]
>>> where, 3 given points is R(I-1),R(I) and R(I+1),which form a
>>> parabola. R is the resultant function. How can get the extreme point
>>> E of parabola by that equation?
>> The general procedure:
>>
>> Given points (x1,y1), (x2,y2), (x3,y3) and the equation
>>
>> a x^2 + b x + c = y
>>
>> you have three equations in three unknowns. It's a technical
>> matter to find a, b and c in terms of (x_i,y_i) from the
>> available info.
>>
>> Once you have a, b and c, you also have the expression
>> for the derivative of the parabola:
>>
>> y' = 2a x + b
>>
>> At the extremum, y' = 0 which is easily solved for x.
>>
>> Express the solution in the original data by substituting
>> whatever formulas express a and b in terms of (x_i,y_i).
>>
>> Rune
>
> Thank you. Rune. You conducted me to the right direction.
>
> According to the given points and equation x^2 + b x + c = y, we
> produce
>
> 3 combined equations as indicated below.
>
> R(I-1) = a*(I-1)^2+b*(I-1)+c (1)
> R(I) = a*I^2 + b*I +c (2)
> R(I+1) = a*(I+1)^2+b*(I+1)+c (3)
>
> subtracting (1) from (3) and (2) respectively,get
>
> R(I+1) -R(I-1) = 4aI+2b (4)
>
> R(I-1) -R(I) = a(1-2I)-b (5)
>
> combining (4) and (5), we get
>
> a = 1/2*[R(I+1)+R(I-1)-2R(I)] (6)
>
> (4) divided by a, we get
>
> [R(I+1) - R(I-1)]/a = 4I + 2b/a (7)
>
> it follows
>
> -b/(2a) = I - [R(I+1) - R(I-1)]/(4a) (8)
>
> substituting a into the right part of (8),we get
>
> -b/(2a) = I - 1/2*[R(I+1) - R(I-1)]/ [R(I+1)+R(I-1)-2R(I)] (9)
>
> Then, the resultant (9) is the extremum location as wanted.
If the extremum is needed, interpolation is not.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by HyeeWang●July 8, 20092009-07-08
On Jul 9, 12:04=A0am, Clay <c...@claysturner.com> wrote:
> On Jul 8, 4:56=A0am, HyeeWang <hyeew...@gmail.com> wrote:
>
> > I learned a parabola interpolation equation from some articles, but I
> > am puzzled with the rationality. It is as follws.
>
> > E =3D I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]
>
> > where, 3 given =A0points is R(I-1),R(I) and R(I+1),which form a
> > parabola. R is the resultant function. How can get the extreme =A0point
> > E of parabola by that equation?
>
> > cheers
> > HyeeWang
>
> Hello HyeeWang,
>
> First you fit a parabola through your three data points. You can use
> the Lagrange interpolation formula for this. But to make the algebra
> easy to deal with pick your coordinate so your 3 abscissal (x axis)
> values are
>
> -h, 0, h =A0where h is the intersample spacing (assuming uniform sample
> rate).
>
> Now your Lagrange formula is a little simpler to work with - it gives
>
> y(x) =3D (1/2h^2)*( y0x(x-h)-2y1(x^2-h^2)+y2x(x+h))
>
> where y0,y1, and y2 are your ordinate (y axis) values.
>
> Take the derivative (with respect to x) and set it equal to zero
>
> Thus the x value of the extremum is
>
> x=3D h*(y0-y2) / (y0- 2*y1+y2)
>
> Remember your zero reference is at the central sample.
>
> I hope this helps.
>
> Clay
Thank you. Clay.
I base your idea and use a more general procedure and get the desired
formula.
Applying the Lagrange formula ,we get
y(x) =3D y0*[(x-x1)*(x-x2)]/[(x0-x1)*(x0-x2)] + y1*[(x-x0)*(x-x2)]/[(x1-
x0)*(x1-x2)]
+ y2*[(x-x0)*(x-x1)]/[(x2-x0)*(x2-x1)] (1)
The given 3 points are (x0,y0),(x1,y1) and (x2,y2), and
we use the general case ,make x0 x1 x2 to be I-1,I and I.
Substitue x into the denominator of (1) and make it simpler as
indicated below.
y(x) =3D 1/2*yo*[(x-x1)*(x-x2)] - y1*[(x-x0)*(x-x2)] + 1/2*y2*[(x-x0)*
(x-x1)] (2)
Take the derivative (with respect to x) for (2) set it equal to
zero ,
we can get the desired extremum location exactly.
Due to my poor mathematic knowledge, I wonder whether Lagrange
formula make same sense as
parabola interpolation does,although it acquired a graceful result.
Reply by HyeeWang●July 8, 20092009-07-08
On Jul 8, 5:33=A0pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 8 Jul, 10:56, HyeeWang <hyeew...@gmail.com> wrote:
>
> > I learned a parabola interpolation equation from some articles, but I
> > am puzzled with the rationality. It is as follws.
>
> > E =3D I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]
>
> > where, 3 given =A0points is R(I-1),R(I) and R(I+1),which form a
> > parabola. R is the resultant function. How can get the extreme =A0point
> > E of parabola by that equation?
>
> The general procedure:
>
> Given points (x1,y1), (x2,y2), (x3,y3) and the equation
>
> =A0 =A0 =A0a x^2 + b x + c =3D y
>
> you have three equations in three unknowns. It's a technical
> matter to find a, b and c in terms of (x_i,y_i) from the
> available info.
>
> Once you have a, b and c, you also have the expression
> for the derivative of the parabola:
>
> =A0 y' =3D 2a x + b
>
> At the extremum, y' =3D 0 which is easily =A0solved for x.
>
> Express the solution in the original data by substituting
> whatever formulas express a and b in terms of (x_i,y_i).
>
> Rune
Thank you. Rune. You conducted me to the right direction.
According to the given points and equation x^2 + b x + c =3D y, we
produce
3 combined equations as indicated below.
R(I-1) =3D a*(I-1)^2+b*(I-1)+c (1)
R(I) =3D a*I^2 + b*I +c (2)
R(I+1) =3D a*(I+1)^2+b*(I+1)+c (3)
subtracting (1) from (3) and (2) respectively,get
R(I+1) -R(I-1) =3D 4aI+2b (4)
R(I-1) -R(I) =3D a(1-2I)-b (5)
combining (4) and (5), we get
a =3D 1/2*[R(I+1)+R(I-1)-2R(I)] (6)
(4) divided by a, we get
[R(I+1) - R(I-1)]/a =3D 4I + 2b/a (7)
it follows
-b/(2a) =3D I - [R(I+1) - R(I-1)]/(4a) (8)
substituting a into the right part of (8),we get
-b/(2a) =3D I - 1/2*[R(I+1) - R(I-1)]/ [R(I+1)+R(I-1)-2R(I)] (9)
Then, the resultant (9) is the extremum location as wanted.
Reply by Clay●July 8, 20092009-07-08
On Jul 8, 4:56=A0am, HyeeWang <hyeew...@gmail.com> wrote:
> I learned a parabola interpolation equation from some articles, but I
> am puzzled with the rationality. It is as follws.
>
> E =3D I - 1/2*[ R(I+1) - R(I-1)] / [R(I+1) + R(I+1) - 2*R(I)]
>
> where, 3 given =A0points is R(I-1),R(I) and R(I+1),which form a
> parabola. R is the resultant function. How can get the extreme =A0point
> E of parabola by that equation?
>
> cheers
> HyeeWang
Hello HyeeWang,
First you fit a parabola through your three data points. You can use
the Lagrange interpolation formula for this. But to make the algebra
easy to deal with pick your coordinate so your 3 abscissal (x axis)
values are
-h, 0, h where h is the intersample spacing (assuming uniform sample
rate).
Now your Lagrange formula is a little simpler to work with - it gives
y(x) =3D (1/2h^2)*( y0x(x-h)-2y1(x^2-h^2)+y2x(x+h))
where y0,y1, and y2 are your ordinate (y axis) values.
Take the derivative (with respect to x) and set it equal to zero
Thus the x value of the extremum is
x=3D h*(y0-y2) / (y0- 2*y1+y2)
Remember your zero reference is at the central sample.
I hope this helps.
Clay