Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.2K Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

Clearing fractions in an expression where an equality is asserted

Posted 11 years ago
POSTED BY: wojtek potocki
4 Replies

My approach is usually this:

Numerator @ Together[equation /. Equal -> Subtract] == 0
POSTED BY: Michael Rogers

You could define your rules this way:

In[226]:= Clear["Global`*"]

In[227]:= expr = m/n == p/q

Out[227]= m/n == p/q

In[228]:= % /. (x_/y_ == w_/z_) -> y z (x/y == w/z)

Out[228]= n q (m/n == p/q)

In[229]:= % /. (x_ (z_ == w_)) -> x z == x w

Out[229]= m q == n p

In[230]:= % /. x_ == y_ -> x - y == 0

Out[230]= -n p + m q == 0
POSTED BY: Kay Herbert
Posted 11 years ago

Yes quite clever! It took me some time to understand that Together transfers the initial denominators to the new numerator.

POSTED BY: wojtek potocki
Posted 11 years ago

Thanks Kay

This is OK for the case stritcly limited to m/n == p/q but m,n,p,q may represent much longer expressions. So unless I create four new variables, your solution does not work as in the example below :

expr = (Cos[Pi/4] Power[3 x , (4)^-1])/x^3  == Log[var]/( x y z )

One of the problem is that MMA will evaluate an expression unless held from it and a solution based on pattern matching to change any expression seems to me difficult to generalize.

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