The solution of this simple eqation is a=1 of course. However, it can’t solve it. Thank you for your help.
p1 = (a*b);
$Assumptions = Element[p1, Reals];
Solve[a - 1 == 0, a]
The solution of this simple eqation is a=1 of course. However, it can’t solve it. Thank you for your help.
p1 = (a*b);
$Assumptions = Element[p1, Reals];
Solve[a - 1 == 0, a]
Hello Jean,
I think that the problem here is that b is not defined, so 1 * b won’t evaluate to true and the assumption is not going to be satisfied. Removing the assumption or assigning a real number to b makes the equation solve correctly.
Let me know if it works,
It is somewhat puzzling:
In[66]:= Assuming[Or[a b >= 0, a b < 0], Solve[a - 1 == 0, a]]
Out[66]= {{a -> 1}}
In[67]:= Assuming[Element[a b, Reals], Solve[a - 1 == 0, a]]
Out[67]= {}
In[68]:= Assuming[Element[a b, Complexes], Solve[a - 1 == 0, a]]
Out[68]= {{a -> 1}}
Try this instead:
In[6]:= p1 = (a*b);
$Assumptions = Element[p1, Reals];
Solve[a - 1 == 0, a, Reals]
Out[8]= {{a -> 1}}
More puzzles:
In[175]:= Assuming[b == a, Solve[a == 1, a]]
Out[175]= {}
In[176]:= Assuming[b == a && Element[b, Reals], Solve[a == 1, a]]
Out[176]= {}
In[177]:= Assuming[b == a && Element[b, Reals],
Solve[a == 1, a, Reals]]
Out[177]= {}
In[178]:= Assuming[b == a, Solve[a == 1, a, Reals]]
Out[178]= {}
In[179]:= Assuming[b == a, Solve[a == 1, a, Integers]]
Out[179]= {{a -> ConditionalExpression[1, b == 1]}}