bugGNU Octave - Bugs: bug #60705, [octave forge] (symbolic) int (x *...

 
 

bug #60705: [octave forge] (symbolic) int (x * sqrt (abs (x)) on [-1, 1] gives wrong result

Submitted by:  None
Submitted on:  Sun 30 May 2021 05:16:21 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Mihai Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  dev
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 30 May 2021 08:46:05 PM UTC, comment #1: 

Confirmed on Debian. This is actually a bug in upstream SymPy, so it needs to be fixed there for this to be fixed in Octave symbolic.

Here is the equivalent Python that produces the same wrong result:

from sympy import integrate, sqrt
from sympy.abc import x
f = x * sqrt(abs(x))
y = integrate(f, (x, -1, 1))

I believe this case is covered by this upstream bug report: https://github.com/sympy/sympy/issues/20982

The workaround suggested there works in this case as well (but of course this workaround is not exposed using the symbolic package):

y = integrate(f, (x, -1, 1), manual=True)

Mike Miller <mtmiller>
Project Administrator
Sun 30 May 2021 05:16:21 PM UTC, original submission:  

int(x*sqrt(abs(x)),x,-1,1), where x is symbolic, returns  the wrong value 4/5. The correct value is 0 (the function is odd on [-1,1]). Similarly, for any positive integer power of x integrated with the weight function sqrt(abs(x)) on [-1,1].

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-30 mtmiller CategoryOctave Function => Octave Forge Package
        StatusNone => Confirmed
        Release6.2.0 => dev
        Operating SystemMicrosoft Windows => Any
        Summarysym int x*sqrt(abs(x)) on [-1,1] gives 4/5, instead of 0. => [octave forge] (symbolic) int (x * sqrt (abs (x)) on [-1, 1] gives wrong result

    Back to the top


    Powered by Savane 3.6