Opened 8 years ago

Closed 5 years ago

# solve(A*x+C*y^B, y) returns maxima error without explanation

Reported by: Owned by: gutow burcin major sage-duplicate/invalid/wontfix symbolics solve, maxima, exponents kcrisman, benjaminfjones, burcin, eviatarbach Jeroen Demeyer N/A

### Description

Possibly related ticket #8659

Example of problem

```sage: var ('x y z A B C')
sage: f  = A*x + C*y^B
sage: solve(f==0, y)
```

returns

```Traceback (click to the left of this block for traceback)
...
TypeError: ECL says: Maxima asks: Is B an integer?
```

At the very least this should return a message more like those in sage/symbolic/integration/integration.py. Something along the lines of: "Solve failed because Maxima requested contraints; using the 'assume' command before 'solve' may help (e.g. 'assume( B, 'integer')'). See 'assume?' for more info." The Maxima error should also be passed on.

However, I would prefer to see the general symbolic solution unless numeric values are assigned to the variables in the expression. Note that 'assume(B, 'integer') gives what I consider the correct general symbolic expression:

```sage: var ('x y z A B C')
sage: f  = A*x + C*y^B
sage: assume(B, 'integer')
sage: solve(f==0, y)
[y == (-A*x/C)^(1/B)]
```

For a little discussion of this see sage-devel: https://groups.google.com/forum/#!topic/sage-devel/AQUV9hHUqXI

### comment:1 Changed 8 years ago by gutow

I'm hoping somebody with experience with the symbolics package can work on this. That said, I find this very annoying and may try to work on it later this summer. At which point I'm likely to do something that would break symbolics....;)

### comment:2 Changed 7 years ago by jdemeyer

• Milestone changed from sage-5.11 to sage-5.12

### comment:3 Changed 6 years ago by vbraun_spam

• Milestone changed from sage-6.1 to sage-6.2

### comment:5 Changed 6 years ago by eviatarbach

`desolve` also does this (gives unfriendly errors when requesting assumptions).

Last edited 6 years ago by eviatarbach (previous) (diff)

### comment:6 Changed 6 years ago by vbraun_spam

• Milestone changed from sage-6.2 to sage-6.3

### comment:7 Changed 6 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4

### comment:8 Changed 6 years ago by jdemeyer

• Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
• Reviewers set to Jeroen Demeyer
• Status changed from new to needs_review

The error message is now much better:

```TypeError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(B>0)', see `assume?` for more details)
Is B an integer?
```

So I guess this is fixed.

### comment:9 Changed 6 years ago by jdemeyer

• Status changed from needs_review to positive_review

### comment:10 Changed 5 years ago by vbraun

• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.