Polynomial Interpolation example

I'm having trouble understanding this result (actually, this whole chapter of the Linear Algebra course really):

(a) Where did these fractions come from? The previous sections do not indicate how we got a rational function.

(b) Is the answer given, x2+2xx^2 + 2x correct? When I multiplied these rational functions by the constants in question I got:

P(x)=x2+2x74P(x) = x^2 + 2x - \frac{7}{4}

EDIT: For part (b) I figured out where I went wrong, just an algebraic error. x2+2x^2 + 2 is correctly given, I just misread the answer.

I feel like I have no idea what is going on here even though I just finished a class in linear algebra.

Note by Jeff Folster
2 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Sort by:

Top Newest

@Mahdi Raza

Yajat Shamji - 2 months ago

Log in to reply

I believed you're referring to this problem.

The previous problem demonstrates how you can get the coefficients 3,11,273,11,27.

If you substitute the three polynomials Q1(x),Q2(x),Q3(x)Q_1(x), Q_2 (x) , Q_3 (x) as stated into P(x)P(x), you get the desired x2+2x^2 +2.

Pi Han Goh - 2 months ago

Log in to reply

I know where the coefficients come from, but why are we dividing the polynomials by (13)(15) (1 - 3)(1 - 5) , etc.? This process isn't explained at all.

I figured out where my math went wrong, I did get x2+2x^2 + 2 after all.

Jeff Folster - 2 months ago

Log in to reply

Let's say we want to interpolate a set of data points (a1,b1),(a2,b2),,(an,bn) (a_{1},b_{1}) , (a_{2}, b_{2}) , \dots , (a_{n},b_{n}) with a polynomial. There are a few real-world applications where this is desirable, so this isn't just an academic exercise. But let's not get into all that now.

If we express the interpolating polynomial p(x) p(x) as p0+p1x+p2x2++pn1xn1, p_{0} + p_{1} x + p_{2} x^2 + \dots+ p_{n-1} x^{n-1}, then we'd have to solve the system of nn equations p(ai)=bi p(a_{i}) = b_{i} for the coefficients of p(x), p(x), which is messy and unpleasant.

A better way is to express p(x) p(x) as a linear combination of polynomials Qj(x) Q_{j}(x) that are carefully constructed so as to make the interpolation process as smooth as possible.

Imagine it were possible to define a polynomial Qj(x) Q_{j}(x) that satisfies Qj(ai)=0 Q_{j}(a_{i}) = 0 if ij i \neq j but Qj(aj)=1. Q_{j}(a_j) = 1. In other words, Qj Q_{j} vanishes at all of the aa's except for aj a_{j} where it's 1.

Assuming for the moment that it's possible to do this, then consider the polynomial p(x)=b1Q1(x)+b2Q2(x)++bnQn(x). p(x) = b_{1} Q_{1}(x) + b_{2} Q_{2}(x) + \dots + b_{n}Q_{n}(x). If we plug in aj, a_{j}, then we get p(aj)=b1Q1(aj)+b2Q2(aj)++bnQn(aj)=b1×0++bj×1++bn×0=bj. p(a_{j}) = b_{1} Q_{1}(a_{j}) + b_{2} Q_{2}(a_{j}) + \dots + b_{n}Q_{n}(a_{j}) = b_{1} \times 0 + \dots + b_{j} \times 1 + \dots + b_{n} \times 0 = b_{j}. So the linear combination of these hypothetical Q Q's with weights given by the bj b_{j}'s, the yy-coordinates of the data points, is precisely the interpolating polynomial we're after.

We just have to show that the Q Q's exist. We can do this by constructing them. The polynomial (xa1)(xa2)(xaj1)(xaj+1)(xan) (x-a_{1}) (x-a_{2}) \dots (x-a_{j-1})(x-a_{j+1}) \dots (x-a_{n}) is designed to be 0 at every a a except for aj. a_{j}. This is almost what we need, but the polynomial isn't 1 at aj. a_{j}.

The simple fix is to take the polynomial above and then divide by (aja1)(aja2)(ajaj1)(ajaj+1)(ajan).(a_{j}-a_{1}) (a_{j} -a_{2}) \dots (a_{j}-a_{j-1})(a_{j}-a_{j+1}) \dots (a_{j}-a_{n}). This gives us a formula for Qj(x) Q_{j}(x):

Qj(x)=(xa1)(xa2)(xaj1)(xaj+1)(xan)(aja1)(aja2)(ajaj1)(ajaj+1)(ajan). Q_{j}(x) = \frac{(x-a_{1}) (x-a_{2}) \dots (x-a_{j-1})(x-a_{j+1}) \dots (x-a_{n})}{(a_{j}-a_{1}) (a_{j} -a_{2}) \dots (a_{j}-a_{j-1})(a_{j}-a_{j+1}) \dots (a_{j}-a_{n})}.

Hopefully, that explains why we divide by (13)(15) (1- 3)(1-5) in the problem you reference above.

In the future, if you have concerns about a problem's wording/clarity/etc., you can report the problem. See how here.

Patrick Zulkowski Staff - 2 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...