1
$\begingroup$

So, I need to find the second-degree polynomial that is the best approximation for $f(x) = cos(x)$ in $L^2_w[a, b]$, where $w(x) = e^{-x}$, $a=0$, $b=\infty$.

"Best approximation" for f is a function $\hat{\varphi} \in \Phi$ such that:

$||f - \hat{\varphi}|| \le ||f - \varphi||,\; \forall \varphi \in \Phi$

I have several methods available:

  • Lagrange interpolation
  • Hermite interpolation

Which would be the most appropriate?

  • 1
    You might ask yourself what is the natural metric for functions in the context of this question, and minimise distance between functions in that metric.2012-05-24
  • 0
    Each will give you the "best" result in a certain sense of the word "best". Are you trying to minimize the $L^2$ norm between $\cos$ and its approximation over $[a,b]$?2012-05-24
  • 0
    @AlexBecker I updated the answer with a definition for what is meant by "best approximation".2012-05-24

2 Answers 2

3

In your $L^2$ space the Laguerre polynomials form an orthonormal family, so if you use the polynomial $$ P(x)=\sum_{i=0}^n a_i L_i(x), $$ you will get the approximation error $$ ||P(x)-\cos x||^2=\sum_{i=0}^n(a_i-b_i)^2+\sum_{i>n}b_i^2, $$ (Possibly you need to add a constant to account for the squared norm of the component of cosine, if any, that is orthogonal to all the polynomials. If the Laguerre polynomials form a complete orthonormal family, then this extra term is not needed. Anyway, having that extra term will not affect the solution of this problem.) where $$ b_k=\langle L_k(x)|\cos x\rangle=\int_0^{\infty}L_k(x)\cos x e^{-x}\,dx. $$ I recommend that you calculate $b_0$, $b_1$ and $b_2$, and then try and figure out how you should select the numbers $a_i$ to minimize the error and meet your degree constraint.

  • 0
    My course says that the generalized Laguerre polynomials, having $w(x) = x^\alpha e^{-x}, \alpha > 1$, are orthogonal over $[0, \infty)$. It says nothing about normal Laguerre polynomials.2012-05-25
  • 0
    @scribu: Well, they are orthogonal w.r.t $w(x)=e^{-x}$. That's what the wikipedia page is saying. You can find that bit also from e.g. Schaum's outline series *Mathematical Handbook*. Most likely also in most books dealing with orthogonal polynomials, e.g. Szegö. If you are in doubt, you can just orthogonalize the basis $\{1,x,x^2\}$ of the space of polynomials of degree $\le2$ using the Gram-Schmidt orthogonalization algorithm! That is one way of constructing the orthogonal families of polynomials.2012-05-25
  • 0
    You're right. There was a typo in my course. Laguerre polynomials are orthogonal for all $\alpha > -1$, not +1. Thanks.2012-05-25
4

You can directly compute $\| f - g\|^2 = \int_0^\infty (\cos(x) - (a + b x + c x^2))^2 e^{-x}\ dx$, giving you a quadratic function of $a$, $b$, $c$, and then minimize that.

  • 0
    That seems to make sense, except I don't understand how I could "directly compute" that, given that I don't know a, b and c yet. (Obviously, more study is needed.)2012-05-24
  • 0
    I mean, compute it as a function of $a$, $b$ and $c$. Expand out the square and do each of the integrals. They're not that hard.2012-05-25
  • 0
    Oh, I see. Well, supposing I calculate it, I'm pretty sure minimizing multivariate polynomials is not how I'm supposed to solve this. :) Thanks anyway.2012-05-25
  • 0
    Yeah, I found out that minimizing the integral result is just a matter of demanding that d/da ... = 0, d/db ... = 0, d/dc ... = 0, so to find a, b, c I just have to solve a 3x3 first-degree system. Thanks!2012-05-25
  • 0
    And by d/da I mean $\frac{\partial}{\partial a}$ etc.2012-05-25
  • 0
    I did get the correct results, but it turns out that I was supposed to make use of the orthogonality of the Laguerre polynomials.2012-05-26