Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline frapuano  
#1 Posted : 21 November 2010 14:08:36(UTC)
frapuano


Rank: Advanced Member

Groups: Registered
Joined: 01/08/2010(UTC)
Posts: 115
Man
Italy
Location: Rome

Was thanked: 13 time(s) in 13 post(s)
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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 21 November 2010 16:51:51(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
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
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline frapuano  
#3 Posted : 21 November 2010 18:01:19(UTC)
frapuano


Rank: Advanced Member

Groups: Registered
Joined: 01/08/2010(UTC)
Posts: 115
Man
Italy
Location: Rome

Was thanked: 13 time(s) in 13 post(s)
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
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.