Finding an interpolating polynomial based upon four points












0












$begingroup$


Below is a problem I made up and my incorrect solution to it. I am hoping that somebody here can tell me where I went wrong.

Thanks,

Bob



Problem:

Given the points $(0,0), (1,3), (2,5) (4,4)$ find a second order
interpolating polynomial, of the form $f(x) = Ax^2 + Bx + C$, such that the point $(4,4)$ is on the curve and the following is minimized:
$$ (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2 $$



Answer:



In my answer, I write $D_A$ for the partial derivative of $D$ with $A$. $D_B$ has a similar meaning.
begin{align*}
f(4) &= A(4^2) + B(4) + C = 4 \
16A + 4B + C &= 4 \
C &= 4 - 16A - 4B \
end{align*}

Now let $D = (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2$.
begin{align*}
(f(0)- 0)^2 &= C^2 = (4 - 16A - 4B )^2 \
(f(1) -3)^2 &= (A + B + C - 3)^2 = (A + B + 4 - 16A - 4B - 3)^2 \
(f(1) -3)^2 &= (-15A -3B + 1)^2 \
(f(2) - 5)^2 &= (4A + 2B + C - 5)^2 = (4A + 2B + 4 - 16A - 4B - 5)^2 \
(f(2) - 5)^2 &= (-12A -2B - 1)^2 \
D &= (4 - 16A - 4B )^2 + (-15A -3B + 1)^2 + (-12A -2B - 1)^2 \
D_A &= -32( 4 - 16A - 4B) - 30( -15A - 3B + 1 ) - 24(-12A - 2B - 1) \
D_A &= -128 + 16(32)A + 128B + 30(15)A + 90B - 30 + 24(12)A + 48B + 24 \
D_A &= 512A + 128B + 450A + 90B + 288A + 48B - 134 \
D_A &= 1250A + 266B - 134 \
end{align*}

begin{align*}
D_B &= -8( 4 - 16A - 4B ) - 6( -15A - 3B + 1 ) - 4( -12A - 2B - 1 ) \
D_B &= -32 +8(16)A + 32B + 90A + 18B - 6 + 48A + 8B + 4 \
D_B &= 128A + 32B + 90A + 18B + 48A + 8B - 34 \
D_B &= 266A + 98B - 34 \
end{align*}

begin{align*}
1250A + 266B - 134 &= 0 \
266A + 98B - 34 &= 0 \
133A + 49B - 17 &= 0 \
A &= frac{17-49B}{133} \
625A + 133B - 67 &= 0 \
frac{625(17-49B)}{133} + 133B &= 67 \
frac{10625 - 30625B}{133} + 133B &= 67 \
10625 - 30625B + 17689B &= 8911 \
10625 - 12936B &= 8911 \
B &= -frac{1714}{12936} \
end{align*}

begin{align*}
A &= frac{17 - frac{-49(1714)}{12936} } {133} = frac{17 + frac{83986}{12936} }{133} \
A &= frac{17 + frac{41993}{6468} }{133} \
A &= frac{ 17(12936) + 83986 } { 12936(133)} = frac{303898} {1720488} \
A &= frac{ 6202}{ 35112 } = frac{ 3101 }{17556} \
A &= frac{ 443}{2508} \
C &= 4 - 16left( frac{ 443}{2508} right) - 4 left( -frac{1714}{12936} right) \
C &= 4 - 16left( frac{ 443}{2508} right) + 4 left( frac{1714}{12936} right) \
C &= 4 - frac{4(443)}{627} + frac{1714}{3234} \
C &= 4 - frac{1772}{627} + frac{1714}{3234} \
C &= frac{4(627)(3234) - 1772(3234) + 1714(627)} {627(3234)} \
C &= frac{ 3454902} {2027718 } = frac{191939} {112651} \
C &= frac{ 17449 }{ 10241 } \
end{align*}

Using the program R, I find that:
$$ f(x) = -0.72936 x^2 + 3.93119 x - 0.05505 $$
Hence, I conclude my answer must be wrong.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Error: sign of B is wrong, should be +.
    $endgroup$
    – herb steinberg
    Jan 6 at 22:54










  • $begingroup$
    @herbsteinberg I agree that I have a sign error for $B$. However, I still get a wrong value for $B$.
    $endgroup$
    – Bob
    Jan 6 at 23:14










  • $begingroup$
    Did you recalculate A and C, both of which use the value of B? B$=+frac{1714}{12936}$.
    $endgroup$
    – herb steinberg
    Jan 7 at 2:48
















0












$begingroup$


Below is a problem I made up and my incorrect solution to it. I am hoping that somebody here can tell me where I went wrong.

Thanks,

Bob



Problem:

Given the points $(0,0), (1,3), (2,5) (4,4)$ find a second order
interpolating polynomial, of the form $f(x) = Ax^2 + Bx + C$, such that the point $(4,4)$ is on the curve and the following is minimized:
$$ (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2 $$



Answer:



In my answer, I write $D_A$ for the partial derivative of $D$ with $A$. $D_B$ has a similar meaning.
begin{align*}
f(4) &= A(4^2) + B(4) + C = 4 \
16A + 4B + C &= 4 \
C &= 4 - 16A - 4B \
end{align*}

Now let $D = (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2$.
begin{align*}
(f(0)- 0)^2 &= C^2 = (4 - 16A - 4B )^2 \
(f(1) -3)^2 &= (A + B + C - 3)^2 = (A + B + 4 - 16A - 4B - 3)^2 \
(f(1) -3)^2 &= (-15A -3B + 1)^2 \
(f(2) - 5)^2 &= (4A + 2B + C - 5)^2 = (4A + 2B + 4 - 16A - 4B - 5)^2 \
(f(2) - 5)^2 &= (-12A -2B - 1)^2 \
D &= (4 - 16A - 4B )^2 + (-15A -3B + 1)^2 + (-12A -2B - 1)^2 \
D_A &= -32( 4 - 16A - 4B) - 30( -15A - 3B + 1 ) - 24(-12A - 2B - 1) \
D_A &= -128 + 16(32)A + 128B + 30(15)A + 90B - 30 + 24(12)A + 48B + 24 \
D_A &= 512A + 128B + 450A + 90B + 288A + 48B - 134 \
D_A &= 1250A + 266B - 134 \
end{align*}

begin{align*}
D_B &= -8( 4 - 16A - 4B ) - 6( -15A - 3B + 1 ) - 4( -12A - 2B - 1 ) \
D_B &= -32 +8(16)A + 32B + 90A + 18B - 6 + 48A + 8B + 4 \
D_B &= 128A + 32B + 90A + 18B + 48A + 8B - 34 \
D_B &= 266A + 98B - 34 \
end{align*}

begin{align*}
1250A + 266B - 134 &= 0 \
266A + 98B - 34 &= 0 \
133A + 49B - 17 &= 0 \
A &= frac{17-49B}{133} \
625A + 133B - 67 &= 0 \
frac{625(17-49B)}{133} + 133B &= 67 \
frac{10625 - 30625B}{133} + 133B &= 67 \
10625 - 30625B + 17689B &= 8911 \
10625 - 12936B &= 8911 \
B &= -frac{1714}{12936} \
end{align*}

begin{align*}
A &= frac{17 - frac{-49(1714)}{12936} } {133} = frac{17 + frac{83986}{12936} }{133} \
A &= frac{17 + frac{41993}{6468} }{133} \
A &= frac{ 17(12936) + 83986 } { 12936(133)} = frac{303898} {1720488} \
A &= frac{ 6202}{ 35112 } = frac{ 3101 }{17556} \
A &= frac{ 443}{2508} \
C &= 4 - 16left( frac{ 443}{2508} right) - 4 left( -frac{1714}{12936} right) \
C &= 4 - 16left( frac{ 443}{2508} right) + 4 left( frac{1714}{12936} right) \
C &= 4 - frac{4(443)}{627} + frac{1714}{3234} \
C &= 4 - frac{1772}{627} + frac{1714}{3234} \
C &= frac{4(627)(3234) - 1772(3234) + 1714(627)} {627(3234)} \
C &= frac{ 3454902} {2027718 } = frac{191939} {112651} \
C &= frac{ 17449 }{ 10241 } \
end{align*}

Using the program R, I find that:
$$ f(x) = -0.72936 x^2 + 3.93119 x - 0.05505 $$
Hence, I conclude my answer must be wrong.










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Error: sign of B is wrong, should be +.
    $endgroup$
    – herb steinberg
    Jan 6 at 22:54










  • $begingroup$
    @herbsteinberg I agree that I have a sign error for $B$. However, I still get a wrong value for $B$.
    $endgroup$
    – Bob
    Jan 6 at 23:14










  • $begingroup$
    Did you recalculate A and C, both of which use the value of B? B$=+frac{1714}{12936}$.
    $endgroup$
    – herb steinberg
    Jan 7 at 2:48














0












0








0





$begingroup$


Below is a problem I made up and my incorrect solution to it. I am hoping that somebody here can tell me where I went wrong.

Thanks,

Bob



Problem:

Given the points $(0,0), (1,3), (2,5) (4,4)$ find a second order
interpolating polynomial, of the form $f(x) = Ax^2 + Bx + C$, such that the point $(4,4)$ is on the curve and the following is minimized:
$$ (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2 $$



Answer:



In my answer, I write $D_A$ for the partial derivative of $D$ with $A$. $D_B$ has a similar meaning.
begin{align*}
f(4) &= A(4^2) + B(4) + C = 4 \
16A + 4B + C &= 4 \
C &= 4 - 16A - 4B \
end{align*}

Now let $D = (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2$.
begin{align*}
(f(0)- 0)^2 &= C^2 = (4 - 16A - 4B )^2 \
(f(1) -3)^2 &= (A + B + C - 3)^2 = (A + B + 4 - 16A - 4B - 3)^2 \
(f(1) -3)^2 &= (-15A -3B + 1)^2 \
(f(2) - 5)^2 &= (4A + 2B + C - 5)^2 = (4A + 2B + 4 - 16A - 4B - 5)^2 \
(f(2) - 5)^2 &= (-12A -2B - 1)^2 \
D &= (4 - 16A - 4B )^2 + (-15A -3B + 1)^2 + (-12A -2B - 1)^2 \
D_A &= -32( 4 - 16A - 4B) - 30( -15A - 3B + 1 ) - 24(-12A - 2B - 1) \
D_A &= -128 + 16(32)A + 128B + 30(15)A + 90B - 30 + 24(12)A + 48B + 24 \
D_A &= 512A + 128B + 450A + 90B + 288A + 48B - 134 \
D_A &= 1250A + 266B - 134 \
end{align*}

begin{align*}
D_B &= -8( 4 - 16A - 4B ) - 6( -15A - 3B + 1 ) - 4( -12A - 2B - 1 ) \
D_B &= -32 +8(16)A + 32B + 90A + 18B - 6 + 48A + 8B + 4 \
D_B &= 128A + 32B + 90A + 18B + 48A + 8B - 34 \
D_B &= 266A + 98B - 34 \
end{align*}

begin{align*}
1250A + 266B - 134 &= 0 \
266A + 98B - 34 &= 0 \
133A + 49B - 17 &= 0 \
A &= frac{17-49B}{133} \
625A + 133B - 67 &= 0 \
frac{625(17-49B)}{133} + 133B &= 67 \
frac{10625 - 30625B}{133} + 133B &= 67 \
10625 - 30625B + 17689B &= 8911 \
10625 - 12936B &= 8911 \
B &= -frac{1714}{12936} \
end{align*}

begin{align*}
A &= frac{17 - frac{-49(1714)}{12936} } {133} = frac{17 + frac{83986}{12936} }{133} \
A &= frac{17 + frac{41993}{6468} }{133} \
A &= frac{ 17(12936) + 83986 } { 12936(133)} = frac{303898} {1720488} \
A &= frac{ 6202}{ 35112 } = frac{ 3101 }{17556} \
A &= frac{ 443}{2508} \
C &= 4 - 16left( frac{ 443}{2508} right) - 4 left( -frac{1714}{12936} right) \
C &= 4 - 16left( frac{ 443}{2508} right) + 4 left( frac{1714}{12936} right) \
C &= 4 - frac{4(443)}{627} + frac{1714}{3234} \
C &= 4 - frac{1772}{627} + frac{1714}{3234} \
C &= frac{4(627)(3234) - 1772(3234) + 1714(627)} {627(3234)} \
C &= frac{ 3454902} {2027718 } = frac{191939} {112651} \
C &= frac{ 17449 }{ 10241 } \
end{align*}

Using the program R, I find that:
$$ f(x) = -0.72936 x^2 + 3.93119 x - 0.05505 $$
Hence, I conclude my answer must be wrong.










share|cite|improve this question









$endgroup$




Below is a problem I made up and my incorrect solution to it. I am hoping that somebody here can tell me where I went wrong.

Thanks,

Bob



Problem:

Given the points $(0,0), (1,3), (2,5) (4,4)$ find a second order
interpolating polynomial, of the form $f(x) = Ax^2 + Bx + C$, such that the point $(4,4)$ is on the curve and the following is minimized:
$$ (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2 $$



Answer:



In my answer, I write $D_A$ for the partial derivative of $D$ with $A$. $D_B$ has a similar meaning.
begin{align*}
f(4) &= A(4^2) + B(4) + C = 4 \
16A + 4B + C &= 4 \
C &= 4 - 16A - 4B \
end{align*}

Now let $D = (f(0)- 0)^2 + (f(1) -3)^2 + (f(2) - 5)^2$.
begin{align*}
(f(0)- 0)^2 &= C^2 = (4 - 16A - 4B )^2 \
(f(1) -3)^2 &= (A + B + C - 3)^2 = (A + B + 4 - 16A - 4B - 3)^2 \
(f(1) -3)^2 &= (-15A -3B + 1)^2 \
(f(2) - 5)^2 &= (4A + 2B + C - 5)^2 = (4A + 2B + 4 - 16A - 4B - 5)^2 \
(f(2) - 5)^2 &= (-12A -2B - 1)^2 \
D &= (4 - 16A - 4B )^2 + (-15A -3B + 1)^2 + (-12A -2B - 1)^2 \
D_A &= -32( 4 - 16A - 4B) - 30( -15A - 3B + 1 ) - 24(-12A - 2B - 1) \
D_A &= -128 + 16(32)A + 128B + 30(15)A + 90B - 30 + 24(12)A + 48B + 24 \
D_A &= 512A + 128B + 450A + 90B + 288A + 48B - 134 \
D_A &= 1250A + 266B - 134 \
end{align*}

begin{align*}
D_B &= -8( 4 - 16A - 4B ) - 6( -15A - 3B + 1 ) - 4( -12A - 2B - 1 ) \
D_B &= -32 +8(16)A + 32B + 90A + 18B - 6 + 48A + 8B + 4 \
D_B &= 128A + 32B + 90A + 18B + 48A + 8B - 34 \
D_B &= 266A + 98B - 34 \
end{align*}

begin{align*}
1250A + 266B - 134 &= 0 \
266A + 98B - 34 &= 0 \
133A + 49B - 17 &= 0 \
A &= frac{17-49B}{133} \
625A + 133B - 67 &= 0 \
frac{625(17-49B)}{133} + 133B &= 67 \
frac{10625 - 30625B}{133} + 133B &= 67 \
10625 - 30625B + 17689B &= 8911 \
10625 - 12936B &= 8911 \
B &= -frac{1714}{12936} \
end{align*}

begin{align*}
A &= frac{17 - frac{-49(1714)}{12936} } {133} = frac{17 + frac{83986}{12936} }{133} \
A &= frac{17 + frac{41993}{6468} }{133} \
A &= frac{ 17(12936) + 83986 } { 12936(133)} = frac{303898} {1720488} \
A &= frac{ 6202}{ 35112 } = frac{ 3101 }{17556} \
A &= frac{ 443}{2508} \
C &= 4 - 16left( frac{ 443}{2508} right) - 4 left( -frac{1714}{12936} right) \
C &= 4 - 16left( frac{ 443}{2508} right) + 4 left( frac{1714}{12936} right) \
C &= 4 - frac{4(443)}{627} + frac{1714}{3234} \
C &= 4 - frac{1772}{627} + frac{1714}{3234} \
C &= frac{4(627)(3234) - 1772(3234) + 1714(627)} {627(3234)} \
C &= frac{ 3454902} {2027718 } = frac{191939} {112651} \
C &= frac{ 17449 }{ 10241 } \
end{align*}

Using the program R, I find that:
$$ f(x) = -0.72936 x^2 + 3.93119 x - 0.05505 $$
Hence, I conclude my answer must be wrong.







statistics multivariable-calculus






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 6 at 22:12









BobBob

914514




914514








  • 1




    $begingroup$
    Error: sign of B is wrong, should be +.
    $endgroup$
    – herb steinberg
    Jan 6 at 22:54










  • $begingroup$
    @herbsteinberg I agree that I have a sign error for $B$. However, I still get a wrong value for $B$.
    $endgroup$
    – Bob
    Jan 6 at 23:14










  • $begingroup$
    Did you recalculate A and C, both of which use the value of B? B$=+frac{1714}{12936}$.
    $endgroup$
    – herb steinberg
    Jan 7 at 2:48














  • 1




    $begingroup$
    Error: sign of B is wrong, should be +.
    $endgroup$
    – herb steinberg
    Jan 6 at 22:54










  • $begingroup$
    @herbsteinberg I agree that I have a sign error for $B$. However, I still get a wrong value for $B$.
    $endgroup$
    – Bob
    Jan 6 at 23:14










  • $begingroup$
    Did you recalculate A and C, both of which use the value of B? B$=+frac{1714}{12936}$.
    $endgroup$
    – herb steinberg
    Jan 7 at 2:48








1




1




$begingroup$
Error: sign of B is wrong, should be +.
$endgroup$
– herb steinberg
Jan 6 at 22:54




$begingroup$
Error: sign of B is wrong, should be +.
$endgroup$
– herb steinberg
Jan 6 at 22:54












$begingroup$
@herbsteinberg I agree that I have a sign error for $B$. However, I still get a wrong value for $B$.
$endgroup$
– Bob
Jan 6 at 23:14




$begingroup$
@herbsteinberg I agree that I have a sign error for $B$. However, I still get a wrong value for $B$.
$endgroup$
– Bob
Jan 6 at 23:14












$begingroup$
Did you recalculate A and C, both of which use the value of B? B$=+frac{1714}{12936}$.
$endgroup$
– herb steinberg
Jan 7 at 2:48




$begingroup$
Did you recalculate A and C, both of which use the value of B? B$=+frac{1714}{12936}$.
$endgroup$
– herb steinberg
Jan 7 at 2:48










1 Answer
1






active

oldest

votes


















0












$begingroup$

I would do this differently, given you have a point on the curve.



First set $f(x)=A(x-4)(x-E)+4$ to give the point on the curve and to reduce the number of variables. We will put $AE=F$, since $E$ only appears as a product with $A$



Then



$f(0)=4F+4$,



$f(1)-3=-3A(1-E)+4-3=3F+1-3A$



$f(2)-5=-2A(2-E)+4-5=2F+4-4A$



Now I notice that I can simplify further if I set $G=F-A$ so that I can write the expression I want to minimise as $$16(F+1)^2+(3G+1)^2+4(2G-F+2)^2$$



If I fix $F$ and minimise with respect to $G$ I find I need $$6(3G+1)+8(2G-F+2)=0=34G-16F+22$$ so that $$G=frac {8F-11}{17}$$



and I continue by substituting back for $G$, and then work back from $G$ and $F$ to $A$ and $E$, having simplified the computation somewhat.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    You wrote: "If I fix F and minimise with respect to G I find I need" I do not understand why that is a valid thing to do. Are you taking a partial derivative?
    $endgroup$
    – Bob
    Jan 6 at 23:36












  • $begingroup$
    I am thinking that you have only one equation and you need a second one. That is, you have two unknowns.
    $endgroup$
    – Bob
    Jan 6 at 23:41






  • 1




    $begingroup$
    @Bob The transformations I am making are reversible, so that a minimum value in respect of one set of parameters is also a minimum in respect of another. This is easy here because I am minimising a positive definite quadratic form. In terms of the equations, the point given on the curve gives one relation between the coefficients and reduces the number of necessary parameters to two. I have chosen to reduce and simplify before doing any other calculations. Your method keeps $A, B, C$
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:01






  • 1




    $begingroup$
    @Bob Yes, I am taking partial derivative with respect to $G$. Since the form here is positive definite, it is easy to see that any local extremum is a minimum. Since it is linearly parametrised by two parameters ($A, F$ or $F, G$) it turns out that there is a single local minimum which is a global minimum. I also need to take the partial derivative with respect to $F$ to finish (or I can complete the square, which comes to the same thing). Since there is a single local minimum we can (with just a little care) locate it using the variables we choose rather than those we started with.
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:06











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3064435%2ffinding-an-interpolating-polynomial-based-upon-four-points%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0












$begingroup$

I would do this differently, given you have a point on the curve.



First set $f(x)=A(x-4)(x-E)+4$ to give the point on the curve and to reduce the number of variables. We will put $AE=F$, since $E$ only appears as a product with $A$



Then



$f(0)=4F+4$,



$f(1)-3=-3A(1-E)+4-3=3F+1-3A$



$f(2)-5=-2A(2-E)+4-5=2F+4-4A$



Now I notice that I can simplify further if I set $G=F-A$ so that I can write the expression I want to minimise as $$16(F+1)^2+(3G+1)^2+4(2G-F+2)^2$$



If I fix $F$ and minimise with respect to $G$ I find I need $$6(3G+1)+8(2G-F+2)=0=34G-16F+22$$ so that $$G=frac {8F-11}{17}$$



and I continue by substituting back for $G$, and then work back from $G$ and $F$ to $A$ and $E$, having simplified the computation somewhat.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    You wrote: "If I fix F and minimise with respect to G I find I need" I do not understand why that is a valid thing to do. Are you taking a partial derivative?
    $endgroup$
    – Bob
    Jan 6 at 23:36












  • $begingroup$
    I am thinking that you have only one equation and you need a second one. That is, you have two unknowns.
    $endgroup$
    – Bob
    Jan 6 at 23:41






  • 1




    $begingroup$
    @Bob The transformations I am making are reversible, so that a minimum value in respect of one set of parameters is also a minimum in respect of another. This is easy here because I am minimising a positive definite quadratic form. In terms of the equations, the point given on the curve gives one relation between the coefficients and reduces the number of necessary parameters to two. I have chosen to reduce and simplify before doing any other calculations. Your method keeps $A, B, C$
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:01






  • 1




    $begingroup$
    @Bob Yes, I am taking partial derivative with respect to $G$. Since the form here is positive definite, it is easy to see that any local extremum is a minimum. Since it is linearly parametrised by two parameters ($A, F$ or $F, G$) it turns out that there is a single local minimum which is a global minimum. I also need to take the partial derivative with respect to $F$ to finish (or I can complete the square, which comes to the same thing). Since there is a single local minimum we can (with just a little care) locate it using the variables we choose rather than those we started with.
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:06
















0












$begingroup$

I would do this differently, given you have a point on the curve.



First set $f(x)=A(x-4)(x-E)+4$ to give the point on the curve and to reduce the number of variables. We will put $AE=F$, since $E$ only appears as a product with $A$



Then



$f(0)=4F+4$,



$f(1)-3=-3A(1-E)+4-3=3F+1-3A$



$f(2)-5=-2A(2-E)+4-5=2F+4-4A$



Now I notice that I can simplify further if I set $G=F-A$ so that I can write the expression I want to minimise as $$16(F+1)^2+(3G+1)^2+4(2G-F+2)^2$$



If I fix $F$ and minimise with respect to $G$ I find I need $$6(3G+1)+8(2G-F+2)=0=34G-16F+22$$ so that $$G=frac {8F-11}{17}$$



and I continue by substituting back for $G$, and then work back from $G$ and $F$ to $A$ and $E$, having simplified the computation somewhat.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    You wrote: "If I fix F and minimise with respect to G I find I need" I do not understand why that is a valid thing to do. Are you taking a partial derivative?
    $endgroup$
    – Bob
    Jan 6 at 23:36












  • $begingroup$
    I am thinking that you have only one equation and you need a second one. That is, you have two unknowns.
    $endgroup$
    – Bob
    Jan 6 at 23:41






  • 1




    $begingroup$
    @Bob The transformations I am making are reversible, so that a minimum value in respect of one set of parameters is also a minimum in respect of another. This is easy here because I am minimising a positive definite quadratic form. In terms of the equations, the point given on the curve gives one relation between the coefficients and reduces the number of necessary parameters to two. I have chosen to reduce and simplify before doing any other calculations. Your method keeps $A, B, C$
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:01






  • 1




    $begingroup$
    @Bob Yes, I am taking partial derivative with respect to $G$. Since the form here is positive definite, it is easy to see that any local extremum is a minimum. Since it is linearly parametrised by two parameters ($A, F$ or $F, G$) it turns out that there is a single local minimum which is a global minimum. I also need to take the partial derivative with respect to $F$ to finish (or I can complete the square, which comes to the same thing). Since there is a single local minimum we can (with just a little care) locate it using the variables we choose rather than those we started with.
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:06














0












0








0





$begingroup$

I would do this differently, given you have a point on the curve.



First set $f(x)=A(x-4)(x-E)+4$ to give the point on the curve and to reduce the number of variables. We will put $AE=F$, since $E$ only appears as a product with $A$



Then



$f(0)=4F+4$,



$f(1)-3=-3A(1-E)+4-3=3F+1-3A$



$f(2)-5=-2A(2-E)+4-5=2F+4-4A$



Now I notice that I can simplify further if I set $G=F-A$ so that I can write the expression I want to minimise as $$16(F+1)^2+(3G+1)^2+4(2G-F+2)^2$$



If I fix $F$ and minimise with respect to $G$ I find I need $$6(3G+1)+8(2G-F+2)=0=34G-16F+22$$ so that $$G=frac {8F-11}{17}$$



and I continue by substituting back for $G$, and then work back from $G$ and $F$ to $A$ and $E$, having simplified the computation somewhat.






share|cite|improve this answer









$endgroup$



I would do this differently, given you have a point on the curve.



First set $f(x)=A(x-4)(x-E)+4$ to give the point on the curve and to reduce the number of variables. We will put $AE=F$, since $E$ only appears as a product with $A$



Then



$f(0)=4F+4$,



$f(1)-3=-3A(1-E)+4-3=3F+1-3A$



$f(2)-5=-2A(2-E)+4-5=2F+4-4A$



Now I notice that I can simplify further if I set $G=F-A$ so that I can write the expression I want to minimise as $$16(F+1)^2+(3G+1)^2+4(2G-F+2)^2$$



If I fix $F$ and minimise with respect to $G$ I find I need $$6(3G+1)+8(2G-F+2)=0=34G-16F+22$$ so that $$G=frac {8F-11}{17}$$



and I continue by substituting back for $G$, and then work back from $G$ and $F$ to $A$ and $E$, having simplified the computation somewhat.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 6 at 22:44









Mark BennetMark Bennet

80.8k981179




80.8k981179












  • $begingroup$
    You wrote: "If I fix F and minimise with respect to G I find I need" I do not understand why that is a valid thing to do. Are you taking a partial derivative?
    $endgroup$
    – Bob
    Jan 6 at 23:36












  • $begingroup$
    I am thinking that you have only one equation and you need a second one. That is, you have two unknowns.
    $endgroup$
    – Bob
    Jan 6 at 23:41






  • 1




    $begingroup$
    @Bob The transformations I am making are reversible, so that a minimum value in respect of one set of parameters is also a minimum in respect of another. This is easy here because I am minimising a positive definite quadratic form. In terms of the equations, the point given on the curve gives one relation between the coefficients and reduces the number of necessary parameters to two. I have chosen to reduce and simplify before doing any other calculations. Your method keeps $A, B, C$
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:01






  • 1




    $begingroup$
    @Bob Yes, I am taking partial derivative with respect to $G$. Since the form here is positive definite, it is easy to see that any local extremum is a minimum. Since it is linearly parametrised by two parameters ($A, F$ or $F, G$) it turns out that there is a single local minimum which is a global minimum. I also need to take the partial derivative with respect to $F$ to finish (or I can complete the square, which comes to the same thing). Since there is a single local minimum we can (with just a little care) locate it using the variables we choose rather than those we started with.
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:06


















  • $begingroup$
    You wrote: "If I fix F and minimise with respect to G I find I need" I do not understand why that is a valid thing to do. Are you taking a partial derivative?
    $endgroup$
    – Bob
    Jan 6 at 23:36












  • $begingroup$
    I am thinking that you have only one equation and you need a second one. That is, you have two unknowns.
    $endgroup$
    – Bob
    Jan 6 at 23:41






  • 1




    $begingroup$
    @Bob The transformations I am making are reversible, so that a minimum value in respect of one set of parameters is also a minimum in respect of another. This is easy here because I am minimising a positive definite quadratic form. In terms of the equations, the point given on the curve gives one relation between the coefficients and reduces the number of necessary parameters to two. I have chosen to reduce and simplify before doing any other calculations. Your method keeps $A, B, C$
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:01






  • 1




    $begingroup$
    @Bob Yes, I am taking partial derivative with respect to $G$. Since the form here is positive definite, it is easy to see that any local extremum is a minimum. Since it is linearly parametrised by two parameters ($A, F$ or $F, G$) it turns out that there is a single local minimum which is a global minimum. I also need to take the partial derivative with respect to $F$ to finish (or I can complete the square, which comes to the same thing). Since there is a single local minimum we can (with just a little care) locate it using the variables we choose rather than those we started with.
    $endgroup$
    – Mark Bennet
    Jan 7 at 7:06
















$begingroup$
You wrote: "If I fix F and minimise with respect to G I find I need" I do not understand why that is a valid thing to do. Are you taking a partial derivative?
$endgroup$
– Bob
Jan 6 at 23:36






$begingroup$
You wrote: "If I fix F and minimise with respect to G I find I need" I do not understand why that is a valid thing to do. Are you taking a partial derivative?
$endgroup$
– Bob
Jan 6 at 23:36














$begingroup$
I am thinking that you have only one equation and you need a second one. That is, you have two unknowns.
$endgroup$
– Bob
Jan 6 at 23:41




$begingroup$
I am thinking that you have only one equation and you need a second one. That is, you have two unknowns.
$endgroup$
– Bob
Jan 6 at 23:41




1




1




$begingroup$
@Bob The transformations I am making are reversible, so that a minimum value in respect of one set of parameters is also a minimum in respect of another. This is easy here because I am minimising a positive definite quadratic form. In terms of the equations, the point given on the curve gives one relation between the coefficients and reduces the number of necessary parameters to two. I have chosen to reduce and simplify before doing any other calculations. Your method keeps $A, B, C$
$endgroup$
– Mark Bennet
Jan 7 at 7:01




$begingroup$
@Bob The transformations I am making are reversible, so that a minimum value in respect of one set of parameters is also a minimum in respect of another. This is easy here because I am minimising a positive definite quadratic form. In terms of the equations, the point given on the curve gives one relation between the coefficients and reduces the number of necessary parameters to two. I have chosen to reduce and simplify before doing any other calculations. Your method keeps $A, B, C$
$endgroup$
– Mark Bennet
Jan 7 at 7:01




1




1




$begingroup$
@Bob Yes, I am taking partial derivative with respect to $G$. Since the form here is positive definite, it is easy to see that any local extremum is a minimum. Since it is linearly parametrised by two parameters ($A, F$ or $F, G$) it turns out that there is a single local minimum which is a global minimum. I also need to take the partial derivative with respect to $F$ to finish (or I can complete the square, which comes to the same thing). Since there is a single local minimum we can (with just a little care) locate it using the variables we choose rather than those we started with.
$endgroup$
– Mark Bennet
Jan 7 at 7:06




$begingroup$
@Bob Yes, I am taking partial derivative with respect to $G$. Since the form here is positive definite, it is easy to see that any local extremum is a minimum. Since it is linearly parametrised by two parameters ($A, F$ or $F, G$) it turns out that there is a single local minimum which is a global minimum. I also need to take the partial derivative with respect to $F$ to finish (or I can complete the square, which comes to the same thing). Since there is a single local minimum we can (with just a little care) locate it using the variables we choose rather than those we started with.
$endgroup$
– Mark Bennet
Jan 7 at 7:06


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3064435%2ffinding-an-interpolating-polynomial-based-upon-four-points%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1300-talet

1300-talet

Display a custom attribute below product name in the front-end Magento 1.9.3.8