Opened 12 years ago

Closed 12 years ago

# maxima looses minus signs in symbolic expression

Reported by: Owned by: jkantor was major sage-duplicate/invalid/wontfix calculus

### 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 12 years ago by was

• Resolution set to invalid
• Status changed from new to 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 12 years ago by was

• Milestone set to sage-2.10.1

### comment:3 Changed 12 years ago by mabshoff

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