Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Approximating function by trigonometric polynomial

  1. Feb 4, 2014 #1

    Say that we wish to approximate a function [itex] f(x), \, x\in [0, 2\pi] [/itex] by a trigonometric polynomial such that

    [itex] f(x) \approx \sum_{|n|\leq N} a_n e^{inx} \qquad (1) [/itex]

    The best approximation theorem says that in a function space equipped with the inner product

    [itex] (f,g) = \frac{1}{2 \pi} \int_0^{2\pi} f \bar{g} dx [/itex]

    the best possible approximation is the truncated Fourier series of the function, which follows from the orthonormality of the basis functions [itex] \{ e^{inx} \} [/itex]. But what happens if we wish to consider a smaller interval, say [itex] x \in [0, \pi/2] [/itex], and a corresponding inner product

    [itex] (f,g) = \frac{2}{\pi} \int_0^{\pi/2} f \bar{g} dx [/itex]

    but still use the functions [itex] \{ e^{inx} \} [/itex] (no longer orthonormal) in our approximation [itex] (1) [/itex]? We could of course use the Fourier coefficients for all [itex] n [/itex] that are multiples of 4 and set the rest to zero to get the corresponding Fourier series, but this is no longer the best possible approximation. So my question is basically, what would the best approximation be in this case?

    Thank you!
  2. jcsd
  3. Feb 4, 2014 #2


    User Avatar
    2017 Award

    Staff: Mentor

    $$\frac{\partial (f,g)}{\partial a_n} = 0$$ for all ##a_n## is a natural result of an optimal solution. Analyzing this equation could give some interesting results.
  4. Feb 5, 2014 #3
    Thank you mfb for your reply!

    Yes, that was my original idea as well. If [itex] g [/itex] is the approximation in the RHS of [itex] (1) [/itex], then I reasoned that the optimal result should be when [itex] (f-g) \perp f [/itex]. However, [itex] (f-g, f) [/itex] is a linear function in the coefficients [itex] a_n [/itex] so there are no extrema (I am assuming the coefficients are independent of x). Or perhaps I misunderstood something?
  5. Feb 5, 2014 #4


    User Avatar
    2017 Award

    Staff: Mentor

    Ah, small fix:
    I would expect that you want to minimize (f-g,f-g). As the inner product is linear in its arguments, (f-g,f-g) = (f,f) + (g,g) - (f,g) - (g,f) = (f,f) + (g,g) - 2 Re (f,g)
    (f,f) is fixed, the other two parts depend on an and the expression should be minimal with respect to all an. The (g,g) part gives a nonlinearity with a proper minimum.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook