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
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
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