-2
$\begingroup$

The elliptic trajectory equation and hyperbola trajectory equation are generated according to the code, but the final form is not the standard form. How to generate the standard equation form?

The standard forms of elliptic equation and hyperbola equation are:

x^2/a^2 + y^2/b^2 == 1

x^2/a^2 - y^2/b^2 == 1

the first one Elliptical trajectory equation:

Clear["Global`*"]
expr = EuclideanDistance[{0, 4}, {x, y}] + 
   EuclideanDistance[{0, -4}, {x, y}] == 10
eq1 = Refine[Simplify[expr], 
   Assumptions -> {x \[Element] Reals, y \[Element] Reals}] // 
  FullSimplify
eq2 = SubtractSides[eq1, FirstCase[List @@ First@eq1, Sqrt[__]]]
eq3 = ApplySides[#^2 &, eq2] // Expand
eq4 = Apply[Subtract, eq3] == 0
eq5 = SubtractSides[eq4, FirstCase[List @@ First@eq4, k_*Sqrt[__]]]
eq6 = ApplySides[#^2 &, eq5] // Simplify

the result is:

25 x^2 + 9 y^2 == 225

The standard equation form is:

x^2/5+y^2/25==1

the second Hyperbola trajectory equation:

Clear["Global`*"]
expr = EuclideanDistance[{0, 2}, {3, 2}] - 
   EuclideanDistance[{0, -2}, {3, 2}] == 
  EuclideanDistance[{0, -2}, {x, y}] - 
   EuclideanDistance[{0, 2}, {x, y}] 
eq1 = Refine[Simplify[expr], 
  Assumptions -> {x \[Element] Reals, y \[Element] Reals}]
eq2 = ApplySides[#^2 &, eq1] // Simplify
eq3 = Fold[SubtractSides, eq2, Cases[List @@ First@eq2, Sqrt[__]]]
eq4 = ApplySides[#^2 &, eq3] // Simplify

the result is :

3 + x^2 == 3 y^2

The standard equation form is:

y^2-x^2/3==1

The results obtained are not in the form of standard equations. How can we obtain the standard equation?

$\endgroup$
13
  • 3
    $\begingroup$ Define "standard equation." $\endgroup$ Apr 19, 2023 at 15:31
  • 2
    $\begingroup$ @DavidG.Stork The standard "standard equation" in US math ed has the form of a sum/difference of squares equals the number one. I don't know how standard that terminology is outside the US. Since this is an international site, perhaps, @ csn889, you could edit the question to make it clear. $\endgroup$
    – Michael E2
    Apr 19, 2023 at 17:02
  • 1
    $\begingroup$ Your ApplySides statements are determining the final form of the equations. Why not use ApplySides to get the equations the way you want? $\endgroup$
    – Bill Watts
    Apr 19, 2023 at 17:10
  • 1
    $\begingroup$ @csn889, you have now posted around 10 different partial questions on the manipulation of ellipse equation, and the last few of them are just concatenating the code from previous answers. Can you please clearly state what is you overall final goal with these conic sections? Are you doing this for educational purposes, and want to show the derivation of the standard form? Do you just want the parameters of the standard form? Note that there are also several questions already about quadratic forms: $\endgroup$
    – Domen
    Apr 19, 2023 at 19:14
  • 1

2 Answers 2

1
$\begingroup$
expr1 = EuclideanDistance[{0, 4}, {x, y}] + EuclideanDistance[{0, -4}, {x, y}] == 10;
expr2 = EuclideanDistance[{0, 2}, {3, 2}] - EuclideanDistance[{0, -2}, {3, 2}] == 
   EuclideanDistance[{0, -2}, {x, y}] - EuclideanDistance[{0, 2}, {x, y}];
expr1

Refine[%, Assumptions -> {x, y} ∈ Reals]

% /. s1_Sqrt[__] + s2_Sqrt[__] == a_ :> s1 == a - s2

ApplySides[#^2 &, %] // Expand

SubtractSides[%]

% /. a_ + (s : _.*Sqrt[__]) == 0 :> a == -s

ApplySides[#^2 &, %] // Simplify

SubtractSides[%]

% /. (a_?NumberQ + b_ == 0) :> b == -a

DivideSides[%] // Expand

$$\frac{x^2}{9}+\frac{y^2}{25}=1$$

expr2

(* ... same code as above ... *)

$$-\frac{x^2}{3}+y^2=1$$

$\endgroup$
0
$\begingroup$

How to optimize the code for deriving the standard equation of the Apollonian circle?

Based on xzczd's solution therein:

ClearAll["`*"]
eq = 25 x^2 - 9 y^2 == 225
Apply[Subtract]@eq
rule = Solve[
   ForAll[{x, y}, 
    Apply[Subtract]@eq == 
     dd ((x - aa)^2/ff + (y - bb)^2/gg - 1)], {aa, bb, cc, dd, ee, ff,
     gg}][[1]]
(x - aa)^2/ff + (y - bb)^2/gg == 1 /. rule
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.