TransWikia.com

Removal of radicals to form algebraic expression

Mathematica Asked on August 1, 2021

FullSimplify[( Sqrt[(x + h)^2 + y^2] - a) - e (Sqrt[(x - h)^2 + y^2] - b) == 0]

How to remove the radicals to obtain an algebraic expression of fourth order using Simplify, without squaring by hand, transposing etc. ? Variables are $(x,y)$ and constants $(a,b,h,e)$.

And how for the simpler case of the ellipse of second degree? ( when $c$ is constant):

Sqrt[(x-c)^2+y^2]+ Sqrt[(x+c)^2+y^2]== 2 a 

I have plotted special cases for verification, but need an algebraic curve formula.

Thanks for assistance.

2 Answers

Use Eliminate

eq = 0 == (Sqrt[(x + h)^2 + y^2] - a) - 
 e (Sqrt[(x - h)^2 + y^2] - b) /. (-h + x)^2 + y^2 -> 
aa /. (h + x)^2 + y^2 -> bb

(*   0 == -a + Sqrt[bb] - (Sqrt[aa] - b) e   *)

eli1 = Eliminate[{eq, (-h + x)^2 + y^2 == aa, (h + x)^2 + y^2 == 
          bb}, {aa, bb}]

(*   a^4 - 4 a^3 b e + 
a^2 (6 b^2 e^2 - 2 h^2 - 2 e^2 h^2 - 4 h x + 4 e^2 h x - 2 x^2 - 
 2 e^2 x^2 - 2 y^2 - 2 e^2 y^2) + 
a b e (-4 b^2 e^2 + 4 h^2 + 4 e^2 h^2 + 8 h x - 8 e^2 h x + 4 x^2 + 
 4 e^2 x^2 + 4 y^2 + 4 e^2 y^2) == -b^4 e^4 + 2 b^2 e^2 h^2 + 
2 b^2 e^4 h^2 - h^4 + 2 e^2 h^4 - e^4 h^4 + 4 b^2 e^2 h x - 
4 b^2 e^4 h x - 4 h^3 x + 4 e^4 h^3 x + 2 b^2 e^2 x^2 + 
2 b^2 e^4 x^2 - 6 h^2 x^2 - 4 e^2 h^2 x^2 - 6 e^4 h^2 x^2 - 
4 h x^3 + 4 e^4 h x^3 - x^4 + 2 e^2 x^4 - e^4 x^4 + 2 b^2 e^2 y^2 + 
2 b^2 e^4 y^2 - 2 h^2 y^2 + 4 e^2 h^2 y^2 - 2 e^4 h^2 y^2 - 
4 h x y^2 + 4 e^4 h x y^2 - 2 x^2 y^2 + 4 e^2 x^2 y^2 - 
2 e^4 x^2 y^2 - y^4 + 2 e^2 y^4 - e^4 y^4   *)

Correct answer by Akku14 on August 1, 2021

I don't think there is an easy way using Simplify.

I have hacked together a solution that works at least for your examples.

sqrtEqExpand[eqExpr_] := Module[{eq = eqExpr, expr, sqrts, rest},
  While[Not@FreeQ[eq, Power[_, 1/2]],
   expr = Collect[#, Power[_, 1/2]] &@(ExpandAll@Subtract @@ eq);
   sqrts = Cases[expr, ___ Power[_, 1/2] | Power[_, 1/2]];
   rest = Complement[List @@ expr, sqrts];
   eq = ExpandAll[
     First[sqrts]^2 == (-Plus @@ Rest[sqrts] - Plus @@ rest)^2];];
  eq]

Examples are

eq1 = (Sqrt[(x + h)^2 + y^2] - a) - e (Sqrt[(x - h)^2 + y^2] - b) == 0;
sqrtEqExpand[eq1]
(* 4 a^2 h^2 - 8 a b e h^2 + 4 b^2 e^2 h^2 + 8 a^2 h x - 16 a b e h x + 
  8 b^2 e^2 h x + 4 a^2 x^2 - 8 a b e x^2 + 4 b^2 e^2 x^2 + 
  4 a^2 y^2 - 8 a b e y^2 + 4 b^2 e^2 y^2 == 
 a^4 - 4 a^3 b e + 6 a^2 b^2 e^2 - 4 a b^3 e^3 + b^4 e^4 + 
  2 a^2 h^2 - 4 a b e h^2 - 2 a^2 e^2 h^2 + 2 b^2 e^2 h^2 + 
  4 a b e^3 h^2 - 2 b^2 e^4 h^2 + h^4 - 2 e^2 h^4 + e^4 h^4 + 
  4 a^2 h x - 8 a b e h x + 4 a^2 e^2 h x + 4 b^2 e^2 h x - 
  8 a b e^3 h x + 4 b^2 e^4 h x + 4 h^3 x - 4 e^4 h^3 x + 2 a^2 x^2 - 
  4 a b e x^2 - 2 a^2 e^2 x^2 + 2 b^2 e^2 x^2 + 4 a b e^3 x^2 - 
  2 b^2 e^4 x^2 + 6 h^2 x^2 + 4 e^2 h^2 x^2 + 6 e^4 h^2 x^2 + 
  4 h x^3 - 4 e^4 h x^3 + x^4 - 2 e^2 x^4 + e^4 x^4 + 2 a^2 y^2 - 
  4 a b e y^2 - 2 a^2 e^2 y^2 + 2 b^2 e^2 y^2 + 4 a b e^3 y^2 - 
  2 b^2 e^4 y^2 + 2 h^2 y^2 - 4 e^2 h^2 y^2 + 2 e^4 h^2 y^2 + 
  4 h x y^2 - 4 e^4 h x y^2 + 2 x^2 y^2 - 4 e^2 x^2 y^2 + 
  2 e^4 x^2 y^2 + y^4 - 2 e^2 y^4 + e^4 y^4 *)

eq2 = Sqrt[(c - x)^2 + y^2] - Sqrt[(c + x)^2 + y^2] == 2 a;
sqrtEqExpand[eq2]
(* 16 a^2 c^2 + 32 a^2 c x + 16 a^2 x^2 + 16 a^2 y^2 == 
 16 a^4 + 32 a^2 c x + 16 c^2 x^2 *)

Answered by Natas on August 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP