Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.6K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Error solving simple equation?

Posted 3 years ago

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]
POSTED BY: Jean Flosi
4 Replies

Try this instead:

In[6]:= p1 = (a*b);

$Assumptions = Element[p1, Reals];

Solve[a - 1 == 0, a, Reals]

Out[8]= {{a -> 1}}
POSTED BY: Jack Heimrath

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}}
POSTED BY: Gianluca Gorni

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, - Nicolò

POSTED BY: Nicolò Monti

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]}}
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard