Approximating function by trigonometric polynomial

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
ekkilop
Messages
29
Reaction score
0
Hi!

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!
 
Physics news on Phys.org
$$\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.
 
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?
 
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.