Approximating function by trigonometric polynomial

In summary, the conversation discusses approximating a function on a smaller interval using a trigonometric polynomial and the best approximation theorem in function spaces. The question is raised about the best approximation in this case, and it is suggested to minimize the expression (f-g, f-g) to find the optimal solution.
  • #1
ekkilop
29
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
  • #2
$$\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.
 
  • #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?
 
  • #4
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.
 
  • #5


I would first commend you for exploring different methods for approximating a function. This shows that you are thinking critically and trying to find the most accurate representation of your data. In this case, it seems like you are considering a smaller interval and a different inner product, which can definitely affect the resulting approximation.

To answer your question, the best approximation in this case would depend on the specific function f(x) that you are trying to approximate. It may not necessarily be a trigonometric polynomial, as that is just one type of approximation method. Other methods such as spline interpolation or polynomial interpolation may provide a better fit for your function on the given interval.

However, if you are set on using a trigonometric polynomial approximation and the given inner product, then the best approach would be to minimize the mean squared error between your function and the approximation. This means finding the coefficients a_n that minimize the integral of the squared difference between f(x) and the trigonometric polynomial in the given interval. This can be done using techniques such as least squares regression or optimization methods.

In summary, the best approximation for your function will depend on the specific function and the specific interval and inner product you are using. Consider exploring different methods and techniques to find the most accurate representation for your data.
 

Related to Approximating function by trigonometric polynomial

1. What is a trigonometric polynomial?

A trigonometric polynomial is a mathematical function that is composed of a finite sum of trigonometric functions, such as sine and cosine. It can be written in the form of a0 + a1*cos(x) + b1*sin(x) + a2*cos(2x) + b2*sin(2x) + ... + an*cos(nx) + bn*sin(nx), where a and b are coefficients and n is the degree of the polynomial.

2. How is a trigonometric polynomial used to approximate a function?

A trigonometric polynomial can be used to approximate a function by finding the coefficients that will minimize the difference between the polynomial and the function over a certain interval. This is done using techniques such as least squares approximation or Fourier series.

3. What is the advantage of using a trigonometric polynomial to approximate a function?

One advantage of using a trigonometric polynomial is that it can approximate a wide range of functions, including non-periodic functions. This makes it a versatile tool for approximating various types of data and functions in real-world applications.

4. Is a trigonometric polynomial always an accurate approximation of a function?

No, a trigonometric polynomial is not always an accurate approximation of a function. The accuracy of the approximation depends on the degree of the polynomial and the smoothness of the function being approximated. Higher degree polynomials and smoother functions will generally result in a more accurate approximation.

5. Are there any limitations to using a trigonometric polynomial to approximate a function?

Yes, there are some limitations to using a trigonometric polynomial to approximate a function. One limitation is that it may not be able to accurately approximate functions with sharp corners or discontinuities. It also requires a significant amount of computation, so it may not be feasible for large datasets or real-time applications.

Similar threads

  • Topology and Analysis
Replies
1
Views
498
  • Topology and Analysis
Replies
4
Views
400
  • Topology and Analysis
Replies
9
Views
2K
  • Topology and Analysis
Replies
9
Views
2K
Replies
14
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
397
  • Advanced Physics Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
320
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
14
Views
884
Back
Top