Polynomial approximation: Chebyshev and Legendre

In summary: But if you know the function exactly, why bother approximating it?In summary, Chebyshev polynomials and Legendre polynomials are both orthogonal polynomials used for determining the least square approximation of a function. However, they use different weight functions which result in different norms to measure the fit. While Chebyshev polynomials provide an exact fit for a "nice" function expressed as an infinite series, the question of approximating the function as a finite series may arise. The Mathematica code provided in the conversation appears to be computing a ratio between the function and the approximating function, which may not be necessary if the function can be expressed exactly.
  • #1
ch3cooh
4
0
Chebyshev polynomials and Legendre polynomials are both orthogonal polynomials for determining the least square approximation of a function. Aren't they supposed to give the same result for a given function?
I tried mathematica but the I didn't get the same answer :( Is this precision problem or something else?
Code:
In[79]:= Collect[
  Sum[Integrate[LegendreP[i, x]*Sin[2 x], {x, -1, 1}]/
    Integrate[LegendreP[i, x]^2, {x, -1, 1}]*LegendreP[i, x], {i, 0,
    3}], x] // N

Out[79]= 1.94378 x - 1.06264 x^3

In[80]:= Collect[
  Sum[Integrate[
     1/Sqrt[1 - x^2] ChebyshevT[i, x]*Sin[2 x], {x, -1, 1}]/
    Integrate[1/Sqrt[1 - x^2] ChebyshevT[i, x]^2, {x, -1, 1}]*
    ChebyshevT[i, x], {i, 0, 3}], x] // N

Out[80]= 1.92711 x - 1.03155 x^3
 
Mathematics news on Phys.org
  • #2
ch3cooh said:
Aren't they supposed to give the same result for a given function?

You'll probably get more help if you explain what result you are talking about in standard mathematical notation.
 
  • #3
ch3cooh said:
Chebyshev polynomials and Legendre polynomials are both orthogonal polynomials for determining the least square approximation of a function. Aren't they supposed to give the same result for a given function?


I haven't looked at that stuff in years, but I think the answer is "no". They have different weight functions which give different inner products and consequently different norms in which to measure the least squares fit.
 
  • #4
I think "least squares fit" makes it clear what norm is used to measure the fit. For a "nice" function (one that can be expressed as an infinite power series) , if you express it as an infinite series of Chebyshev polynomials you get an exact fit. You also get an exact fit if you express it as an infinite series of some other family of othrogonal polynomials. So perhaps the question has to do with approximating the function as a finite series.

I find the Mathematica code in the original post puzzling. It looks like its computing a ratio between a function and the approximating function.
 
  • #5


I would first like to clarify that while Chebyshev and Legendre polynomials are both useful for polynomial approximation, they are not necessarily expected to give the same result for a given function. This is because they have different properties and are optimized for different types of functions.

Chebyshev polynomials are typically used for approximating functions over a specific interval, such as the interval [-1, 1]. They have the property of minimizing the maximum error over this interval, making them useful for applications such as numerical integration and solving differential equations.

On the other hand, Legendre polynomials are more commonly used for approximating smooth functions over a wider interval, such as [-∞, ∞]. They have the property of minimizing the mean squared error over the entire interval, making them useful for applications such as signal processing and data fitting.

In regards to the Mathematica results, it is possible that there could be a precision issue or some other technical issue causing the discrepancy. However, it is also important to note that the two methods are not equivalent and may give slightly different results. It would be helpful to further investigate and compare the properties and limitations of both methods to determine the best approach for a specific function.
 

What is polynomial approximation?

Polynomial approximation is a mathematical technique used to approximate a complex function with a simpler polynomial function. This is commonly used in engineering, physics, and other scientific fields to simplify calculations and modeling.

What is the difference between Chebyshev and Legendre polynomial approximation?

Chebyshev and Legendre are two different types of orthogonal polynomials commonly used in polynomial approximation. Chebyshev polynomials are best suited for approximating functions with large oscillations, while Legendre polynomials are better for approximating smooth functions.

How accurate is polynomial approximation using Chebyshev and Legendre polynomials?

The accuracy of polynomial approximation using Chebyshev and Legendre polynomials depends on the degree of the polynomials used. Generally, the higher the degree of the polynomials, the more accurate the approximation will be.

What are the advantages of using Chebyshev and Legendre polynomials for polynomial approximation?

Chebyshev and Legendre polynomials have several advantages over other types of polynomials for approximation. They are orthogonal, which means they are independent of each other and do not interfere with the accuracy of the approximation. They also have well-behaved properties, making them easier to work with in calculations.

What are some practical applications of polynomial approximation using Chebyshev and Legendre polynomials?

Polynomial approximation using Chebyshev and Legendre polynomials is commonly used in fields such as signal processing, numerical analysis, and computer graphics. It can be applied to various problems, such as curve fitting, interpolation, and optimization, to simplify complex mathematical expressions and improve the efficiency of calculations.

Similar threads

Replies
6
Views
919
  • General Math
Replies
4
Views
1K
  • General Math
Replies
2
Views
1K
Replies
3
Views
187
Replies
1
Views
863
Replies
2
Views
2K
Replies
12
Views
928
  • Classical Physics
Replies
1
Views
85
  • General Math
Replies
1
Views
1K
Replies
3
Views
700
Back
Top