Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function

 [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function From: SourceForge.net - 2012-10-19 06:19:06 ```Bugs item #3577666, was opened at 2012-10-16 08:03 Message generated for change (Comment added) made by lvch You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&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 - Simplification Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jean-Yves (jyoberle) Assigned to: Nobody/Anonymous (nobody) Summary: radcan seems to give non-equvalent function Initial Comment: Hi, When doing radcan(-(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2))), the result is -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)). But these two expressions are not equivalent. For x = -0.4, -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) gives 20.01585798944382 wheras -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)) gives -20.01585798944383. -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) is the result of diff(acos(asin(x^2-1)),x) if this can help. Build info is build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8"). Best regards, Jean-Yves ---------------------------------------------------------------------- Comment By: Valery Lovchikov (lvch) Date: 2012-10-18 23:19 Message: use function factor %i1 factor(sqrt(x^2-u*x^4)); %o1 sqrt(1-u*x^2)*abs(x) but %i1 radcan(sqrt(x^2-u*x^4)); %o1 x*sqrt(1-u*x^2) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&group_id=4933 ```

 [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function From: SourceForge.net - 2012-10-16 15:03:54 ```Bugs item #3577666, was opened at 2012-10-16 08:03 Message generated for change (Tracker Item Submitted) made by jyoberle You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&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 - Simplification Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jean-Yves (jyoberle) Assigned to: Nobody/Anonymous (nobody) Summary: radcan seems to give non-equvalent function Initial Comment: Hi, When doing radcan(-(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2))), the result is -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)). But these two expressions are not equivalent. For x = -0.4, -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) gives 20.01585798944382 wheras -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)) gives -20.01585798944383. -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) is the result of diff(acos(asin(x^2-1)),x) if this can help. Build info is build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8"). Best regards, Jean-Yves ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function From: SourceForge.net - 2012-10-19 06:19:06 ```Bugs item #3577666, was opened at 2012-10-16 08:03 Message generated for change (Comment added) made by lvch You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&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 - Simplification Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jean-Yves (jyoberle) Assigned to: Nobody/Anonymous (nobody) Summary: radcan seems to give non-equvalent function Initial Comment: Hi, When doing radcan(-(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2))), the result is -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)). But these two expressions are not equivalent. For x = -0.4, -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) gives 20.01585798944382 wheras -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)) gives -20.01585798944383. -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) is the result of diff(acos(asin(x^2-1)),x) if this can help. Build info is build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8"). Best regards, Jean-Yves ---------------------------------------------------------------------- Comment By: Valery Lovchikov (lvch) Date: 2012-10-18 23:19 Message: use function factor %i1 factor(sqrt(x^2-u*x^4)); %o1 sqrt(1-u*x^2)*abs(x) but %i1 radcan(sqrt(x^2-u*x^4)); %o1 x*sqrt(1-u*x^2) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function From: SourceForge.net - 2012-10-31 01:21:23 ```Bugs item #3577666, was opened at 2012-10-16 08:03 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&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 - Simplification Group: None >Status: Pending >Resolution: Invalid Priority: 5 Private: No Submitted By: Jean-Yves (jyoberle) Assigned to: Nobody/Anonymous (nobody) Summary: radcan seems to give non-equvalent function Initial Comment: Hi, When doing radcan(-(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2))), the result is -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)). But these two expressions are not equivalent. For x = -0.4, -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) gives 20.01585798944382 wheras -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)) gives -20.01585798944383. -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) is the result of diff(acos(asin(x^2-1)),x) if this can help. Build info is build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8"). Best regards, Jean-Yves ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2012-10-30 18:21 Message: Although the documentation of radcan isn't very clear on this, radcan is expected to produce results like this. I think the idea is if x is very large, then both expressions are equivalent. I think that's true for your expressions. If this is not what you want, use ratsimp or some other combination of expand and factor. Marking as pending/invalid. ---------------------------------------------------------------------- Comment By: Valery Lovchikov (lvch) Date: 2012-10-18 23:19 Message: use function factor %i1 factor(sqrt(x^2-u*x^4)); %o1 sqrt(1-u*x^2)*abs(x) but %i1 radcan(sqrt(x^2-u*x^4)); %o1 x*sqrt(1-u*x^2) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function From: SourceForge.net - 2012-11-08 15:55:59 ```Bugs item #3577666, was opened at 2012-10-16 08:03 Message generated for change (Comment added) made by tomasriker You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&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 - Simplification Group: None Status: Pending Resolution: Invalid Priority: 5 Private: No Submitted By: Jean-Yves (jyoberle) Assigned to: Nobody/Anonymous (nobody) Summary: radcan seems to give non-equvalent function Initial Comment: Hi, When doing radcan(-(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2))), the result is -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)). But these two expressions are not equivalent. For x = -0.4, -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) gives 20.01585798944382 wheras -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)) gives -20.01585798944383. -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) is the result of diff(acos(asin(x^2-1)),x) if this can help. Build info is build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8"). Best regards, Jean-Yves ---------------------------------------------------------------------- Comment By: David Scherfgen (tomasriker) Date: 2012-11-08 07:55 Message: @rtoy: You missed the minus sign! The one result is negative, the other is positive. So this is definitely a bug! ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-10-30 18:21 Message: Although the documentation of radcan isn't very clear on this, radcan is expected to produce results like this. I think the idea is if x is very large, then both expressions are equivalent. I think that's true for your expressions. If this is not what you want, use ratsimp or some other combination of expand and factor. Marking as pending/invalid. ---------------------------------------------------------------------- Comment By: Valery Lovchikov (lvch) Date: 2012-10-18 23:19 Message: use function factor %i1 factor(sqrt(x^2-u*x^4)); %o1 sqrt(1-u*x^2)*abs(x) but %i1 radcan(sqrt(x^2-u*x^4)); %o1 x*sqrt(1-u*x^2) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function From: SourceForge.net - 2012-11-08 16:38:11 ```Bugs item #3577666, was opened at 2012-10-16 08:03 Message generated for change (Comment added) made by jyoberle You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&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 - Simplification Group: None >Status: Open Resolution: Invalid Priority: 5 Private: No Submitted By: Jean-Yves (jyoberle) Assigned to: Nobody/Anonymous (nobody) Summary: radcan seems to give non-equvalent function Initial Comment: Hi, When doing radcan(-(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2))), the result is -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)). But these two expressions are not equivalent. For x = -0.4, -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) gives 20.01585798944382 wheras -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)) gives -20.01585798944383. -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) is the result of diff(acos(asin(x^2-1)),x) if this can help. Build info is build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8"). Best regards, Jean-Yves ---------------------------------------------------------------------- >Comment By: Jean-Yves (jyoberle) Date: 2012-11-08 08:38 Message: @rtoy: I'm answering late but I tend to agree with tomasriker. When you look at the limit for x=-sqrt(sin(1)+1) which is the largest negative possible value you get: limit(f(x),x,-sqrt(1+sin(1)),plus) is inf limit(radcan(f(x)),x,-sqrt(1+sin(1)),plus) is minf f(x) being diff(acos(asin(x^2-1)),x) However, I followed Ivch advice and replaced radcan by factor in my code (with a small trick for integers). ---------------------------------------------------------------------- Comment By: David Scherfgen (tomasriker) Date: 2012-11-08 07:55 Message: @rtoy: You missed the minus sign! The one result is negative, the other is positive. So this is definitely a bug! ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-10-30 18:21 Message: Although the documentation of radcan isn't very clear on this, radcan is expected to produce results like this. I think the idea is if x is very large, then both expressions are equivalent. I think that's true for your expressions. If this is not what you want, use ratsimp or some other combination of expand and factor. Marking as pending/invalid. ---------------------------------------------------------------------- Comment By: Valery Lovchikov (lvch) Date: 2012-10-18 23:19 Message: use function factor %i1 factor(sqrt(x^2-u*x^4)); %o1 sqrt(1-u*x^2)*abs(x) but %i1 radcan(sqrt(x^2-u*x^4)); %o1 x*sqrt(1-u*x^2) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&group_id=4933 ```
 [Maxima-bugs] [ maxima-Bugs-3577666 ] radcan seems to give non-equvalent function From: SourceForge.net - 2012-11-08 17:52:25 ```Bugs item #3577666, was opened at 2012-10-16 08:03 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&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 - Simplification Group: None Status: Open Resolution: Invalid Priority: 5 Private: No Submitted By: Jean-Yves (jyoberle) Assigned to: Nobody/Anonymous (nobody) Summary: radcan seems to give non-equvalent function Initial Comment: Hi, When doing radcan(-(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2))), the result is -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)). But these two expressions are not equivalent. For x = -0.4, -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) gives 20.01585798944382 wheras -2/(sqrt(2-x^2)*sqrt(1-asin(x^2-1))*sqrt(asin(x^2-1)+1)) gives -20.01585798944383. -(2*x)/(sqrt(1-(x^2-1)^2)*sqrt(1-asin(x^2-1)^2)) is the result of diff(acos(asin(x^2-1)),x) if this can help. Build info is build_info("5.28.0-2","2012-08-27 23:16:48","i686-pc-mingw32","GNU Common Lisp (GCL)","GCL 2.6.8"). Best regards, Jean-Yves ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2012-11-08 09:52 Message: First, let's make the expression simpler, removing the part with asin: e: -2*x/sqrt(1-(x^2-1)^2) ratsimp(e) -> -2*x/sqrt(x^2-x^4) No problem with that. radcan(e) -> -2/sqrt(2-x^2) This is very different. From the ratsimp result, we can change the expression (manually) to -2*x/abs(x)/sqrt(2-x^2). This is basically the same as what radcan has produced, but radcan has "assumed" that x is very large and positive, which makes abs(x) = x. This is what I meant by saying that radcan can do "unexpected" changes. If this is not clear, you should bring this up on the mailing list where Richard Fateman (author of radcan) can explain what's going on. This really needs to be documented better. ---------------------------------------------------------------------- Comment By: Jean-Yves (jyoberle) Date: 2012-11-08 08:38 Message: @rtoy: I'm answering late but I tend to agree with tomasriker. When you look at the limit for x=-sqrt(sin(1)+1) which is the largest negative possible value you get: limit(f(x),x,-sqrt(1+sin(1)),plus) is inf limit(radcan(f(x)),x,-sqrt(1+sin(1)),plus) is minf f(x) being diff(acos(asin(x^2-1)),x) However, I followed Ivch advice and replaced radcan by factor in my code (with a small trick for integers). ---------------------------------------------------------------------- Comment By: David Scherfgen (tomasriker) Date: 2012-11-08 07:55 Message: @rtoy: You missed the minus sign! The one result is negative, the other is positive. So this is definitely a bug! ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2012-10-30 18:21 Message: Although the documentation of radcan isn't very clear on this, radcan is expected to produce results like this. I think the idea is if x is very large, then both expressions are equivalent. I think that's true for your expressions. If this is not what you want, use ratsimp or some other combination of expand and factor. Marking as pending/invalid. ---------------------------------------------------------------------- Comment By: Valery Lovchikov (lvch) Date: 2012-10-18 23:19 Message: use function factor %i1 factor(sqrt(x^2-u*x^4)); %o1 sqrt(1-u*x^2)*abs(x) but %i1 radcan(sqrt(x^2-u*x^4)); %o1 x*sqrt(1-u*x^2) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=3577666&group_id=4933 ```