bugGNU Octave - Bugs: bug #58534, [octave forge] (symbolic) Expand...

 
 

bug #58534: [octave forge] (symbolic) Expand on Trigonometric Expression doesn't change it

Submitter:  None
Submitted:  Tue 09 Jun 2020 05:46:04 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 10 Jun 2020 12:05:15 AM UTC, comment #1: 

Confirmed, adding this feature should probably be made dependent on adding support for the 'ArithmeticOnly' option in the 'expand' function.

Mike Miller <mtmiller>
Group Member
Tue 09 Jun 2020 05:46:04 PM UTC, original submission:  

in Python:
`

>>> import sympy as sym
>>> x,y=sym.symbols("x y")
>>> sym.expand(sym.cos(x + y), trig=True)

-sin(x)*sin(y) + cos(x)*cos(y)
`

in Matlab:
`

>>> syms t
>>> expand([sin(2*t), cos(2*t)])

ans = [ 2*cos(t)*sin(t), 2*cos(t)^2 - 1]
`

in Octave:
`

>>> syms t
>>> expand([sin(2*t), cos(2*t)])

ans = (sym) [sin(2⋅t)  cos(2⋅t)]  (1×2 matrix)
`

It seems Octave is not passing `trig=True` in expand function in Python. The correction of this issue should be simple then.

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 siko1056 (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-10 mtmiller Item GroupIncorrect Result Matlab Compatibility
        StatusNone Confirmed
        Release5.2.0 dev
    2020-06-09 siko1056 SummaryExpand on Trigonometric Expression doesn't change it [octave forge] (symbolic) Expand on Trigonometric Expression doesn't change it

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code