Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

# maxima looses minus signs in symbolic expression

Reported by: Owned by: jkantor William Stein major sage-duplicate/invalid/wontfix calculus N/A

### 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.

### comment:1 Changed 15 years ago by William Stein

Resolution: → invalid new → closed

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.1 → sage-duplicate/invalid
Note: See TracTickets for help on using tickets.