1 страниц (3 вхождений)
Legendre Polynomials - Сообщения
#1 Опубликовано: 21.11.2010 08:08:36
Hi,
I am trying to write a general purposes quadrature snap-in and I am starting to study Legendre polynomials .
As shown below I have defined such polynomial but I see that as soon as n is greater than 22 the systems starts to loop and have nothing drawned on the 2D graph window.

Any clue of why this happen ...drive me crazy that my first attempt is failed so miserably.
Thanks in advance for your help and best regards
Francesco
I am trying to write a general purposes quadrature snap-in and I am starting to study Legendre polynomials .
As shown below I have defined such polynomial but I see that as soon as n is greater than 22 the systems starts to loop and have nothing drawned on the 2D graph window.

Any clue of why this happen ...drive me crazy that my first attempt is failed so miserably.
Thanks in advance for your help and best regards
Francesco
#2 Опубликовано: 21.11.2010 10:51:51
Hello Francesco,
This is a problem for the symbolic processor or a numerical problem you are getting into by increasing the polynomial order (very big or very small numbers). The only thing you can do in SMath is to use optimization or to exclude it, or to use "eval" function. For instance, if you define C(k,n) by using "eval" or use "eval" into the definition of P(x,n) you can calculate the polynomials up to the 50-the degree. But, again, the SMath has to strugle with numerical problems.
Regards,
Radovan
This is a problem for the symbolic processor or a numerical problem you are getting into by increasing the polynomial order (very big or very small numbers). The only thing you can do in SMath is to use optimization or to exclude it, or to use "eval" function. For instance, if you define C(k,n) by using "eval" or use "eval" into the definition of P(x,n) you can calculate the polynomials up to the 50-the degree. But, again, the SMath has to strugle with numerical problems.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 21.11.2010 12:01:19
Hi Radovan
thanks a lot for your feedback. I have used eval with C(k,n) and this improved a little bit the situation , I was able to reach n=60 but after this treshold the system loops infinitely to do a drawing ( even if for n=60 and a little bit before the drawing is already wrong).
I have tried to toggle on/off sysmbolic evaluation but still with no results. I have not actually the capability/knowledge to build a legendre polynomial evaluator using the plug in approach ..so need to give up .
I hope that in the future will be able to do this or will be improved the numerical/symbolic engine behind Smath otherwise it will be impossible to build something in the quadrature area with more elaborate algorithm.
Best regards
Francesco
thanks a lot for your feedback. I have used eval with C(k,n) and this improved a little bit the situation , I was able to reach n=60 but after this treshold the system loops infinitely to do a drawing ( even if for n=60 and a little bit before the drawing is already wrong).
I have tried to toggle on/off sysmbolic evaluation but still with no results. I have not actually the capability/knowledge to build a legendre polynomial evaluator using the plug in approach ..so need to give up .
I hope that in the future will be able to do this or will be improved the numerical/symbolic engine behind Smath otherwise it will be impossible to build something in the quadrature area with more elaborate algorithm.
Best regards
Francesco
1 страниц (3 вхождений)
-
Новые сообщения
-
Нет новых сообщений