Opened 2 years ago

Closed 12 months ago

#27610 closed defect (duplicate)

symbolic expression factor - unexpected result

Reported by: gh-galashin Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords:
Cc: mjo Merged in:
Authors: Reviewers: Michael Orlitzky
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

the following code

var("q");
cosh=(exp(q)+exp(-q))/2;
print cosh,"equals",cosh.factor()

outputs

1/2*e^(-q) + 1/2*e^q equals e^q

(I'm using Cocalc.)

Change History (4)

comment:1 Changed 2 years ago by slelievre

  • Component changed from PLEASE CHANGE to symbolics
  • Milestone changed from sage-8.8 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

Duplicate of #27304.

comment:2 Changed 2 years ago by slelievre

Give positive review if you agree.

comment:3 Changed 12 months ago by mjo

  • Cc mjo added
  • Reviewers set to Michael Orlitzky
  • Status changed from needs_review to positive_review

Agreed, the workaround in #27304 prevents the wrong answer. I now get:

1/2*e^(-q) + 1/2*e^q equals 1/2*(e^(2*q) + 1)*e^(-q)

comment:4 Changed 12 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from positive_review to closed

ok, thanks

Note: See TracTickets for help on using tickets.