# solve((2*x + 8)*exp(-6*x), x) can't find any solution #10391

Open
opened this Issue Jan 14, 2016 · 6 comments

Projects
None yet
4 participants
Contributor

### wxgeo commented Jan 14, 2016

 ``````>>> solve((2*x + 8)*exp(-6*x), x) [] `````` Obvious answer is -4. (Tested in sympy live : Python console for SymPy 0.7.6 (Python 2.7.5))
Member

### kshitij10496 commented Jan 14, 2016

 Use `solveset` instead of `solve` ``````In [ ]: x = symbols('x') In [ ]: solveset((2*x+8)*exp(-6*x), x) Out[ ]: {-4} ``````
Contributor

### wxgeo commented Jan 14, 2016

 Thanks ! Is solve() deprecated ?

### skirpichev added a commit to diofant/diofant that referenced this issue Jan 14, 2016

``` Add quick tests to checksol: is_zero/is_nonzero ```
`Fixes sympy/sympy#10391`
``` 6ad0907 ```
Member

### skirpichev added a commit to diofant/diofant that referenced this issue Jan 15, 2016

``` Correct checksol: add quick is_nonzero test ```
```Fixes sympy/sympy#10391

checksol: use is_nonzero```
``` 1d56ea8 ```

### skirpichev added a commit to diofant/diofant that referenced this issue Jan 15, 2016

``` Correct checksol: add is_nonzero test ```
`Fixes sympy/sympy#10391`
``` 9d08047 ```
Member

### smichr commented Jan 16, 2016

 If you set check=False when calling solve, the solution will be given. The reason it is not otherwise given is because the denominator is close to zero and gives a false positive for the denominator being zero test. `checksol` needs to be improved.

Contributor

### wxgeo commented Aug 26, 2018

 The patch given by Sergey Kirpichev above obviously solves the issue. Is it possible to merge it ?
Member

### smichr commented Aug 27, 2018

 checksol should not be using a hard-coded value to see if a number is close to zero or not. is_zero or is_nonzero can be used if the expr.is_number and I believe they each check numerical solutions and only return a non-None answer when the evaluated expression evaluates with significance. If those are both indeterminate, then I think it would be better to return the solution and let the user check it