Group Abstract Group Abstract

Message Boards Message Boards

0
|
47 Views
|
3 Replies
|
7 Total Likes
View groups...
Share
Share this post:

How to divide both sides of the equation by the leftmost constant coefficient?

Posted 1 day ago
64/81 (x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 1

How to convert the above expression into the form of the expression below?

(x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 81/64

Here is my own approach:

64/81 (x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 1
MultiplySides[%, 81/64]

This approach has obvious shortcomings, as it requires manually identifying the constant coefficient. My idea is how to automatically identify the leftmost constant coefficient and divide both sides of the equation by it simultaneously.

POSTED BY: Bill Blair
3 Replies

You can use FactorTermsList:

64/81 (x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 1;
DivideSides[%, First@FactorTermsList[%[[1]]]]
POSTED BY: Gianluca Gorni
eq = 64/81 (x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 1;
With[{facGps = GroupBy[FactorList[First@eq], VectorQ[#, NumericQ] &],
  list2factor = Times @@ Power @@@ # &},
 list2factor@Lookup[facGps, False, {}] == 
  Last[eq]/list2factor@Lookup[facGps, True, {}]
 ]
(*  (x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 81/64  *)

You can use FreeQ[#, x1 | x2 | y1 | y2] & instead of VectorQ[#, NumericQ] & if there are literal (nonnumeric) constants as in another one of your questions.

POSTED BY: Michael Rogers

Try:

 test[eq_] := Simplify[DivideSides[eq, First@Cases[eq, _Rational, \[Infinity]]]];
 test[(64/81) (x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 1]

 (*(x1^2 + 9 y1^2) (x2^2 + 9 y2^2) == 81/64*)

Regards

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