Skip to content

incorrect integration #4185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rtoy opened this issue Jul 10, 2024 · 1 comment
Open

incorrect integration #4185

rtoy opened this issue Jul 10, 2024 · 1 comment

Comments

@rtoy
Copy link
Owner

rtoy commented Jul 10, 2024

Imported from SourceForge on 2024-07-09 19:34:28
Created by kcrisman on 2021-06-07 14:24:45
Original: https://sourceforge.net/p/maxima/bugs/3795


The following integration does not seem to be correct. Plotting the last entry a-h should give the zero function, but instead is something wavy.

Maxima 5.42.2 http://maxima.sourceforge.net
using Lisp ECL 16.1.2
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) display2d: false;

(%o1) false
(%i2) a: sin((x-y)/sqrt(2))*(x-y);     

(%o2) sin((x-y)/sqrt(2))*(x-y)
(%i3)  g: integrate(a,y);  

(%o3) ((2^(3/2)+2)*sin(y/sqrt(2)-x/sqrt(2))
 +(((-2^(3/2))-2)*(y/sqrt(2)-x/sqrt(2))+((-sqrt(2))-2)*x)
  *cos(y/sqrt(2)-x/sqrt(2)))
 /2
 +sqrt(2)*x*cos(y/sqrt(2)-x/sqrt(2))
(%i4) h: diff(g,y);                             

(%o4) ((-((((-2^(3/2))-2)*(y/sqrt(2)-x/sqrt(2))+((-sqrt(2))-2)*x)
 *sin(y/sqrt(2)-x/sqrt(2)))
 /sqrt(2))
 +((2^(3/2)+2)*cos(y/sqrt(2)-x/sqrt(2)))/sqrt(2)
 +(((-2^(3/2))-2)*cos(y/sqrt(2)-x/sqrt(2)))/sqrt(2))
 /2
 -x*sin(y/sqrt(2)-x/sqrt(2))
(%i5) a-h;

(%o5) (-((-((((-2^(3/2))-2)*(y/sqrt(2)-x/sqrt(2))+((-sqrt(2))-2)*x)
 *sin(y/sqrt(2)-x/sqrt(2)))
 /sqrt(2))
 +((2^(3/2)+2)*cos(y/sqrt(2)-x/sqrt(2)))/sqrt(2)
 +(((-2^(3/2))-2)*cos(y/sqrt(2)-x/sqrt(2)))/sqrt(2))
 /2)
 +x*sin(y/sqrt(2)-x/sqrt(2))+sin((x-y)/sqrt(2))*(x-y)

See https://trac.sagemath.org/ticket/28750 for downstream. Here is a correct solution, confirmed by the zero.

(%i6) b: sqrt(2)*(x - y)*cos(-1/2*sqrt(2)*(x - y)) + 2*sin(-1/2*sqrt(2)*(x - y));

(%o6) sqrt(2)*cos((x-y)/sqrt(2))*(x-y)-2*sin((x-y)/sqrt(2))
(%i8) diff(b,y)-a;

(%o8) 0
@rtoy
Copy link
Owner Author

rtoy commented Jul 10, 2024

Imported from SourceForge on 2024-07-09 19:34:29
Created by robert_dodier on 2021-06-17 06:26:51
Original: https://sourceforge.net/p/maxima/bugs/3795/#7cc9


  • labels: --> integrate

@rtoy rtoy added this to the None milestone Jul 10, 2024
rtoy pushed a commit that referenced this issue Feb 8, 2025
-limit.lisp (function limit2) Insert a clause that catches ind/ind. When the denominator
    is nonzero, return ind; otherwise, return und

-rtest_limit_extra.mac Add tests from bug report

Tested with SBCL 2.2.0 & Clozure CL 1.12.2. No unexpected errors with either the
testsuite or the share testsuite.
rtoy pushed a commit that referenced this issue Apr 5, 2025
-limit.lisp (function limit2) Insert a clause that catches ind/ind. When the denominator
    is nonzero, return ind; otherwise, return und

-rtest_limit_extra.mac Add tests from bug report

Tested with SBCL 2.2.0 & Clozure CL 1.12.2. No unexpected errors with either the
testsuite or the share testsuite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant