Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1846 closed defect (invalid)

maxima looses minus signs in symbolic expression

Reported by: jkantor Owned by: William Stein
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: calculus Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Consider

log(a*e^(-a*x-b)).simplify_exp()

This gets expanded correctly, however

log(a*e^(-a*x-b)/(1+exp(-a*x-b))^2 ).simplify_exp()

appears to lose the minus signs on ax and b.

Change History (3)

comment:1 Changed 15 years ago by William Stein

Resolution: invalid
Status: newclosed

Actually Sage is right and you are wrong, because of the identity log(e^(-a*x - b) + 1) == log(e^(a*x + b) + 1) - a*x - b which one can derive from Taylor expansions of log(x+1) and log(x^(-1) + 1). See below.

h = log(exp(-a*x-b) + 1)
h == h.simplify_exp()
///
log(e^(-a*x - b) + 1) == log(e^(a*x + b) + 1) - a*x - b
log(x+1).taylor(x,0,5)
///
x - x^2/2 + x^3/3 - x^4/4 + x^5/5
log(x^(-1)+1).taylor(x,0,5)
///
-log(x) + x - x^2/2 + x^3/3 - x^4/4 + x^5/5

comment:2 Changed 15 years ago by William Stein

Milestone: sage-2.10.1

comment:3 Changed 15 years ago by Michael Abshoff

Milestone: sage-2.10.1sage-duplicate/invalid
Note: See TracTickets for help on using tickets.