octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58534] Expand on Trigonometric Expression doe


From: anonymous
Subject: [Octave-bug-tracker] [bug #58534] Expand on Trigonometric Expression doesn't change it
Date: Tue, 9 Jun 2020 13:46:05 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

URL:
  <https://savannah.gnu.org/bugs/?58534>

                 Summary: Expand on Trigonometric Expression doesn't change it
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 09 Jun 2020 05:46:04 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: mmir@seznam.cz
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58534>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]