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?
ApplySidesstatements are determining the final form of the equations. Why not useApplySidesto get the equations the way you want? – Bill Watts Apr 19 '23 at 17:10-(x^2/3) + y^2 == 1or-(x^2/(Sqrt[3])^2) + y^2/(1)^2 == 1as the output? – xzczd Apr 20 '23 at 04:43x^2/5+y^2/25==1andy^2-x^2/3==1– csn899 Apr 20 '23 at 07:34sol = SolveAlways[First[eq5] == First[otherform], {x, y}] otherform /. First[sol]```– csn899 Apr 20 '23 at 15:00