Question: fsolve when no solution


I am trying to assign a value to a variable depending on whether fsolve does or does not give a solution.

However, I cannot do it when there is no solution - fsolve returns unevaluated, and I cannot do almost anything with the unevaluated expression.

The only way I can do it is the following:

if (a='fsolve(x+ln(x) = 0,x,1 .. 2)') then solution:='no' else solution:='yes' end if;

this equation does not have solutions, and returns the string to which I compare a.

But for various reasons I would like to have a different (better) way.

Can anybody help?


Please Wait...