From: SourceForge.net <noreply@so...>  20030918 16:33:02

Bugs item #803247, was opened at 20030909 11:51 Message generated for change (Comment added) made by macrakis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=803247&group_id=4933 Category: Lisp Core Group: None Status: Open Resolution: None Priority: 5 Submitted By: Camm Maguire (yycamm) Assigned to: Nobody/Anonymous (nobody) >Summary: Infinite loop in Taylor(asin(sqrt(1x^2)/(1+eps))...)/workar Initial Comment: forwarded 198466 maxima@... tags 198466 +upstream tags 198466 +confirmed thanks A Debian user submitted this report, which I'm also registering at the website. Any ideas on a fix? Take care, ============================================================================= When trying to do some complicated Taylor series expansions, maxima hangs; I believe it is in an infinite loop, as xload shows the cpu saturated. An example is: f(x):= asin(sqrt(1x^2)/(1+eps)); taylor(f(x),x,0,2); which produces this condition. While trying to isolate the bug, I tried: g(x):=asin(sqrt(1x^2)); taylor(g(x),x,0,2); which produces the error message: "Taylor encountered an unfamiliar singularity in ABS(X)" I am unable to find any documentation on this "unfamiliar singularity" error message. However, from looking at the second derivative of G(x), I think I can see what's causing the problem: the sqrt() in the above expression is symmetrical about x=0, but has a cusp there. However, this ought to cause taylor() to produce an error message in the first example, instead of looping; this is not very userfriendly. What's the difference between a familiar singularity and an unfamiliar one, anyway? =============================================================================  Camm Maguire camm@... ========================================================================== "The earth is but one country, and mankind its citizens."  Baha'u'llah  >Comment By: Stavros Macrakis (macrakis) Date: 20030918 12:33 Message: Logged In: YES user_id=588346 In the first problem, the bug appears to be in the default gcd; you can get around this by changing gcd routine: gcd:'spmod$ The second case is a bug in Taylor. To get around it, first expand the inner expression, then plug it into asin: inner: taylor(sqrt(1x^2)+err*x^6,x,0,6); taylor(asin(inner),x,0,5); In general, you have to be careful about the orders of expansion  you may need more terms in the inner expression than the whole expression. That is the sort of thing Taylor is supposed to do for you, but obviously there is a problem in this case. That is why I have added an explicit error term  to be able to trace it through. The second derivative business is, I believe, a red herring  the absolute value has to do with returning the principal value of sqrt, but the Taylor expansion doesn't care about principal values, it cares about analytic continuation.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=803247&group_id=4933 
From: SourceForge.net <noreply@so...>  20060409 20:43:48

Bugs item #803247, was opened at 20030909 09:51 Message generated for change (Settings changed) made by robert_dodier You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=803247&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Lisp Core  Taylor Group: None Status: Open Resolution: None Priority: 5 Submitted By: Camm Maguire (yycamm) Assigned to: Nobody/Anonymous (nobody) Summary: Infinite loop in Taylor(asin(sqrt(1x^2)/(1+eps))...)/workar Initial Comment: forwarded 198466 maxima@... tags 198466 +upstream tags 198466 +confirmed thanks A Debian user submitted this report, which I'm also registering at the website. Any ideas on a fix? Take care, ============================================================================= When trying to do some complicated Taylor series expansions, maxima hangs; I believe it is in an infinite loop, as xload shows the cpu saturated. An example is: f(x):= asin(sqrt(1x^2)/(1+eps)); taylor(f(x),x,0,2); which produces this condition. While trying to isolate the bug, I tried: g(x):=asin(sqrt(1x^2)); taylor(g(x),x,0,2); which produces the error message: "Taylor encountered an unfamiliar singularity in ABS(X)" I am unable to find any documentation on this "unfamiliar singularity" error message. However, from looking at the second derivative of G(x), I think I can see what's causing the problem: the sqrt() in the above expression is symmetrical about x=0, but has a cusp there. However, this ought to cause taylor() to produce an error message in the first example, instead of looping; this is not very userfriendly. What's the difference between a familiar singularity and an unfamiliar one, anyway? =============================================================================  Camm Maguire camm@... ========================================================================== "The earth is but one country, and mankind its citizens."  Baha'u'llah  Comment By: Stavros Macrakis (macrakis) Date: 20030918 10:33 Message: Logged In: YES user_id=588346 In the first problem, the bug appears to be in the default gcd; you can get around this by changing gcd routine: gcd:'spmod$ The second case is a bug in Taylor. To get around it, first expand the inner expression, then plug it into asin: inner: taylor(sqrt(1x^2)+err*x^6,x,0,6); taylor(asin(inner),x,0,5); In general, you have to be careful about the orders of expansion  you may need more terms in the inner expression than the whole expression. That is the sort of thing Taylor is supposed to do for you, but obviously there is a problem in this case. That is why I have added an explicit error term  to be able to trace it through. The second derivative business is, I believe, a red herring  the absolute value has to do with returning the principal value of sqrt, but the Taylor expansion doesn't care about principal values, it cares about analytic continuation.  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=803247&group_id=4933 