I am trying to solve an equation with Maxima so that I only get real solutions if they exist; if there are no real solutions, or if there are not even complex solutions, I would like Maxima to return an empty list.
For example, I would like that when solving x^2+100-x=0
using solve(x^2+100-x,x)
, which has only complex solutions, Maxima would return an empty list. Or that when solving log(x)-x=0
using solve(log(x)-x,x)
, which also has no real solutions, Maxima would return an empty list. In this second example, what I get instead is [x=log(x)]
.
How could this be achieved with Maxima?