Polynomial interpolation using linear systems?? Suppose we wish to find a quadratic polynomial of the form y=a_2(x^2) + a_1(x) + a_0, where a_2 a_1 and a_0 are scalars that passes through the points (-1,1),(2,4) and (p,1). Here p is a constant. Write the augmented matrix?
Oay I don't get how you can find a_0
thinking. joe?
ok not thinking. looking it up
why yes! when i see "polynomial interpolation" i think this: \[f(-1)\frac{(x-2)(x-p)}{-1-2)(-1-p)}+f(2)\frac{(x+1)(x-p)}{2+1)(2-p)}+f(p)\frac{(x+1)(x-2)}{(p+1)(p-2)}\]
oops forgot a left parenthesis there twice >.>
find the least squares line (quadratic)
looks like you set up a matrix equation right? vandermonde?
set up the standard matrix and use the normal equation \[(A^TA)^{-1}A^Tb\]
in my book it says [1 x_1 x_1^2.... x_1^(n-1);1 x_2 x_2^2.... x_2^(n-1)] etc. and they used it for cubic polynomial
can I use the same matrix? but the augmented matrix doesn't have the first column being fully 1's
correct...that is the standard matrix that is needed
no but the answer for this question doesn't have a column of 1's
ok help me understand. because what i read had a column of 1's
\[A=\left[\begin{matrix}1 & -1 & 1 \\ 1 & 2 & 4\\ 1 & p & p^2\end{matrix}\right]\]
the answer is [1 -1 1 1; 4 2 1 4; p^2 p 1 1 ]?
same thing ...I am finding \[a_0+a_1x+a_2x^2\] your matrix finds \[a_2x^2+a_1x+a_0\]
hmm...looks like you have some extra stuff there
an extra 1,4 and 1 which you don't need to find a quadratic polynomial
that just comes from the: f(-1) = 1 f(2) = 4 f(p) = 1 right?
Oh would that come from the y
ohhhhhhhhh that make sense
I get it now thanks for your help! but one question does it really not matter where the columns are placed
like how the 1 column was the first and in this question it placed it in the third column
multiply \[\left[\begin{matrix}1 & -1 & 1 \\ 1 & 2 & 4\\ 1 & p & p^2\end{matrix}\right]\left[\begin{matrix}a_0 \\a_1\\ a_2 \end{matrix}\right]\] that gives the form \[a_0+a_1x+a_2x^2\]
now compute ... \[(A^TA)^{-1}A^Tb\] b being the vector consisting of the y-values
Okay my only question was why my answer key put it in a_2x^2 + a_1x + a_0
@joe yes...but his matrix had it in twice which is not correct.
that way is fine..it is really the same form
No I understand what joe is saying, it make sense, okay thanks for your help everyone
I get \[\left(\frac{2}{p-2}+2\right)x^2+\frac{p-1}{p-2}x-\frac{1}{p-2}\]
my other question is why is it infinitely solutions when p=-1
the matrix when reduced is [1 0 0 -1/(p-2); 0 1 0 (p-1)/(p-2); 0 0 1 2(p-1)/(p-2)]
if be was -1, then the first and third row of the matrix would be the same, and it would be singular.
same problem with 2
ohh I that what it means by infinitely many I thought it was when 1 =1 or something
so if two rows are the same then the solutions are infinite
then the matrix will not have full rank and therefore \[A^TA\] will not be invertable
okay make sense, thanks again! I'm actually liking this stuff b/c it make sense now haha
cool
btw, that formula i put at the top also gives that solution you got by calculating: \[(A^TA)^{-1}A^Tb\] just thought i would point that out lol
after you simplify it and whatnot.
is that the Lagrange polynomial
i think it is..i caught a random glimpse of it in a book once. Let me see if i can find it....
I'm pretty sure it is...I'd be a little surprised if it always gave the least squares solution
yeah, its called Lagrange Interpolation in this book.
if we had more than 3 points then it would be different
i remember reading this section and not understanding a lot of it >.< it just came to mind because of the word "interpolation" lol >.<
Join our real-time social learning platform and learn together with your friends!