Why are some coefficients negative when expanding a function in Legendre?

  • Context: Graduate 
  • Thread starter Thread starter chenaiyy
  • Start date Start date
  • Tags Tags
    Function Legendre
Click For Summary
SUMMARY

The discussion centers on the phenomenon of obtaining negative coefficients in Legendre expansion when using Fortran code for function expansion. The user initially computes Legendre expansion coefficients and subsequently re-expands the function, resulting in discrepancies where some coefficients appear negative. This indicates potential issues in the numerical stability or implementation of the Legendre expansion algorithm in the Fortran code used.

PREREQUISITES
  • Understanding of Legendre polynomials and their properties
  • Familiarity with numerical methods for function expansion
  • Proficiency in Fortran programming language
  • Knowledge of numerical stability and error analysis in computations
NEXT STEPS
  • Investigate the implementation of Legendre expansion in Fortran
  • Learn about numerical stability in polynomial expansions
  • Explore techniques for validating coefficients in function expansions
  • Review error analysis methods specific to Legendre series
USEFUL FOR

Mathematicians, physicists, and software developers working with numerical methods, particularly those involved in function approximation and expansion using Legendre polynomials.

chenaiyy
Messages
1
Reaction score
0
I get a series of Legendre expansion coefficients for a function. Then I compute the value of the function via expansion coefficients. As I want to whether the code is right or not, finally I expand the function in Legendre again. the result is almost same as before, but some coefficients is negative which are not exist before. I want to know why ?
The code are all fortran.
Thanks a lot!
 
Mathematics news on Phys.org
You'll have to show the code!
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
12K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K