1
$\begingroup$

Use orthogonality to write the polynomials $1,x,x^2$ as linear combinations of the orthogonal basis of $p_1(x) =1, p_2(x) = x - \frac{1}{2}, p_3(x) = x^2 - x + \frac{1}{6}$ .

They answer is:

$x = \frac{1}{2}p_1(x) + p_2(x).$

But how did they get that? I know how to do these types of problems in $\mathbb{R^n}$ space but not in function space?

  • 0
    What's the inner product you are given?2012-10-21
  • 0
    it says ..2012-10-21

4 Answers 4

0

If the inner product is $\langle f,g \rangle=\int_0^1f(x)g(x)dx$ then eveyrthing follows from what Gerry mentioned.

  • 0
    Thank you, everyone gave me the same answer pretty much and I got that $c_1$ = $\frac{1}{2}$ , $c_2$ = 1, but $c_3$ = 19 which is wrong because it should equal 0? Can you elaborate a bit more?2012-10-21
  • 0
    Boba, no matter what the inner product is, everything follows from what I wrote.2012-10-21
  • 0
    I agree, but without a specific inner product in mind you won't get a numerical value for these coefficients. In fact, different inner products would even produce different values for these coefficients.2012-10-21
3

Let $v_1,\dots,v_n$ be an orthogonal basis for a vector space $V$, and let $v$ be in $V$, so $$v=c_1v_1+\cdots+c_nv_n\tag1$$ for some scalars $c_1,\dots,c_n$. You want to know how to find the $c_i$. Take the inner product of (1) with $v_i$; use properties of the inner product, and orthognality of the basis, and $c_i$ should pop out at you.

  • 0
    Thank you, I did what you said and I got that $c_1$ = $\frac{1}{2}$ , $c_2$ = 1, but $c_3$ = 19 which is wrong because it should equal 0? Can you elaborate a bit more?2012-10-21
  • 0
    No, but you can show us what you did, and we'll find the mistake, if there is one. You haven't even said what the inner product is, and without that information there is no way any of us can complete the problem.2012-10-21
  • 0
    For the last one this is what I did. $\langle x^2, x^2-x+\frac{1}{6}\rangle=\int_0^1 (x^4-x^3+\frac{x^2}{6})\,dx$ which gave me the answer of 19. And the inner product is in $L^2$2012-10-21
  • 0
    Any ideas what I did wrong there?2012-10-21
  • 0
    I take it you are trying to find $c_1,c_2,c_3$ such that $x^2=c_1p_1+c_2p_2+c_3p_3$. I'll assume you've already checked that $p_1,p_2,p_3$ are orthogonal. Then $x^2*p_3=c_3p_3*p_3$ (where I'm writing $*$ for the inner product), from which you can get $c_3$. I got $x^2*p_3=37/180$. What did you get? What did you get for $p_3*p_3$?2012-10-21
  • 0
    I see my mistake now. I didn't see that this was a solution for only x. I get how to do it now. Thanks a lot !2012-10-23
2

The polynomial $1$ is obviously just $p_1$.

The polynomial $x$ is almost $p_2$, except $p_2$ has that constant $-\frac{1}{2}$. We want to get rid of that constant. Well, $p_1$ is also constant, so we can use that: scale $p_1$ so that it exactly matches the constant term we're trying to get rid of (but opposite sign), then add it. This gives $x=\frac{1}{2}p_1+p_2$.

But now what about $x^2$? Well, $x^2$ is almost $p_3+p_2$, except again, the constant term isn't quite right. So... using the above as an example, how do we correct the constant term to get $x^2$ in terms of this basis?

EDIT: I overlooked the bit about using orthogonality. Apologies. Here's a solution using orthogonality that's much more general than this specific circumstance:

There is a nice result (that you presumably have seen if this problem has been assigned) that says given an orthogonal basis $\{v_1,\ldots,v_n\}$ for a vector space with inner product $\langle\cdot, \cdot\rangle$, any vector $u$ in the space can be writen $$u=\frac{\langle u, v_1\rangle}{|v_1|^2}\,v_1+\cdots+\frac{\langle u, v_n\rangle}{|v_n|^2}\,v_n\,.$$ So for this problem, the $p_i$'s are the $v_i$'s, and the polynomials $1$, $x$, and $x^2$ each play the role of $u$.

  • 0
    I think you aren't using orthogonality.2012-10-21
  • 0
    @GerryMyerson: Whoops! Quite right. Editing in process.2012-10-21
  • 0
    Hm, I am a bit confused? Aren't I suppose to be integrating ?2012-10-21
  • 0
    @Q.matin:That's what I already asked you!2012-10-21
  • 0
    @MhenniBenghorbal lol I am not sure what you asked me?2012-10-21
  • 0
    @Q.matin: I have edited my solution.2012-10-21
  • 0
    Thank you, everyone provided the same answer and I did what you guys said and I got that $c_1$ = $\frac{1}{2}$ , $c_2$ = 1, but $c_3$ = 19 which is wrong because it should equal 0? Can you elaborate a bit more?2012-10-21
  • 0
    I'm assuming that the inner product $\langle f(x),g(x)\rangle$ is $\int_0^1f(x)g(x)\,dx$. If so, then when you try to write out the polynomial $x$ in the given basis, the scalar $c_3$ is just $\langle x, p_3(x)\rangle/|p_3(x)|^2$, as described above. Let's start by just calculating $\langle x, x^2-x+\frac{1}{6}\rangle=\int_0^1 (x^3-x^2+\frac{1}{6}x)\,dx$. What do you get for this integral?2012-10-21
  • 0
    I got zero for that one. But what I did was instead of puting x i put in $x^2$ how come you instead put in x? The formula you gave didnt elaborate on that or am I wrong?2012-10-21
  • 0
    The problem asks you to write $1$ in this basis. The problem also asks you to write $x$ in this basis. Lastly, the problem asks you to write $x^2$ in this basis. You will get different solutions for each of these. The integration I did above gives you the $p_3$ coefficient for the polynomial $x$ in the given basis. (You had already calculated the $p_1$ and $p_2$ coefficients as $\frac{1}{2}$ and $1$, respectively.)2012-10-21
  • 0
    Oh, wow, I feel dumb. I see my mistake now. Thanks a lot !2012-10-23
1

Here are nice notes. Write $x$ as

$$ x=ap_1+bp_2+cp_3 \,,$$

and use the orthogonality condition $=0$ to find the constants.

  • 0
    Thank you, everyone gave me the same answer so I did what you guys said and I got that $c_1$ = $\frac{1}{2}$ , $c_2$ = 1, but $c_3$ = 19 which is wrong because it should equal 0? Can you elaborate a bit more?2012-10-21