Group Abstract Group Abstract

Message Boards Message Boards

How to remove the "if" part following the calculation result obtained from Solve?

Posted 1 day ago

Solve[ForAll[{x, y}, Equivalent[ m (x/a) + n (y/b) == 1, ((t1 - t2) (b (-1 + t1 t2) x + a (b + b t1 t2 - (t1 + t2) y)))/((1 + t1^2) (1 + t2^2)) == 0]], {m, n}, Reals] // Simplify

enter image description here

The code generates an answer containing "if". How can I remove the "if" part to obtain the result shown in the bottom image?

enter image description here

POSTED BY: Wen Dao
2 Replies

You can remove the conditions by extracting the first element of the ConditionalExpression:

Solve[ForAll[{x, y}, 
    Equivalent[
     m (x/a) + n (y/b) == 
      1, ((t1 - t2) (b (-1 + t1 t2) x + 
           a (b + b t1 t2 - (t1 + t2) y)))/((1 + t1^2) (1 + t2^2)) == 
      0]], {m, n}, Reals] /. 
  ConditionalExpression -> (#1 &) // Simplify
POSTED BY: Gianluca Gorni
Posted 18 hours ago

Thanks for your help!

POSTED BY: Wen Dao
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard