0
|
3486 Views
|
7 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Intersection of two Conics

Posted 8 years ago
 I am attempting to find the solutions for a Hyperbola-Hyperbola intersection. However when eliminating using the quadratic equations, it returns 'True' in the Wolfram engine. Eliminate[{A1*x*x + B1*x*y + C1*y*y + D1*x + S1*y + F1 = 0, A2*x*x + B2*x*y + C2*y*y + D2*x + S2*y + F2 = 0}, x] Eliminate[A1*x*x + B1*x*y + C1*y*y + D1*x + S1*y + F1 = A2*x*x + B2*x*y + C2*y*y + D2*x + S2*y + F2, x]  Is it because the equations are too complex and that I should "stack" the offset ('h','k') and rotation ('?') of one quadratic equation into the other so to simplify the whole? Or am I completely off track.
7 Replies
Sort By:
Posted 8 years ago
 Another approach to the problem is described here, here and here (and the MATLAB source code). An efficient method of locating these solutions exploits the homogeneous matrix representation of conic sections, i.e. a 3x3 symmetric matrix which depends on six parameters.
Posted 8 years ago
 Mathematica can do this Solve[{A1*x^2 + B1*x*y + C1*y^2 + D1*x + S1*y + F1 == 0, A2*x^2 + B2*x*y + C2*y^2 + D2*x + S2*y + F2 == 0}, {x, y}] but the result has 4960729 variables and operators in it and takes a very long time to format and put on the screen.Simplify might be able to make that somewhat smaller, but would probably take vast amounts of time.I do not know a way to get WolframAlpha to be able to do this. I tried things like you tried and got the same sqrt x^ 2 response.
Posted 8 years ago
 Here is the simplified version. Are the results in Mathematica any better? Solve[{A x^2 + B x y + C y^2 + D x + E y + F == 0, y^2 / G^2 - x^2 / H^2 = 1}, {x, y}] 
Posted 8 years ago
 You only have one equation. Eliminating one variable from one equation leaves nothing (a vacuous system, hence satisfied for all values). Instead do the elimination on those two quadrics, each set to zero. Eliminate[{A1*x*x + B1*x*y + C1*y*y + D1*x + S1*y + F1 == 0, A2*x*x + B2*x*y + C2*y*y + D2*x + S2*y + F2 == 0}, x] (* Out= A2^2 F1^2 + F1 (-A2 D1 D2 + A1 D2^2 - 2 A1 A2 F2 - A2 B2 D1 y - A2 B1 D2 y + 2 A1 B2 D2 y + 2 A2^2 S1 y - 2 A1 A2 S2 y - A2 B1 B2 y^2 + A1 B2^2 y^2 + 2 A2^2 C1 y^2 - 2 A1 A2 C2 y^2) == -A2 D1^2 F2 + A1 D1 D2 F2 - A1^2 F2^2 - 2 A2 B1 D1 F2 y + A1 B2 D1 F2 y + A1 B1 D2 F2 y + A2 D1 D2 S1 y - A1 D2^2 S1 y + 2 A1 A2 F2 S1 y - A2 D1^2 S2 y + A1 D1 D2 S2 y - 2 A1^2 F2 S2 y - A2 C2 D1^2 y^2 + A2 C1 D1 D2 y^2 + A1 C2 D1 D2 y^2 - A1 C1 D2^2 y^2 - A2 B1^2 F2 y^2 + A1 B1 B2 F2 y^2 + 2 A1 A2 C1 F2 y^2 - 2 A1^2 C2 F2 y^2 + A2 B2 D1 S1 y^2 + A2 B1 D2 S1 y^2 - 2 A1 B2 D2 S1 y^2 - A2^2 S1^2 y^2 - 2 A2 B1 D1 S2 y^2 + A1 B2 D1 S2 y^2 + A1 B1 D2 S2 y^2 + 2 A1 A2 S1 S2 y^2 - A1^2 S2^2 y^2 + A2 B2 C1 D1 y^3 - 2 A2 B1 C2 D1 y^3 + A1 B2 C2 D1 y^3 + A2 B1 C1 D2 y^3 - 2 A1 B2 C1 D2 y^3 + A1 B1 C2 D2 y^3 + A2 B1 B2 S1 y^3 - A1 B2^2 S1 y^3 - 2 A2^2 C1 S1 y^3 + 2 A1 A2 C2 S1 y^3 - A2 B1^2 S2 y^3 + A1 B1 B2 S2 y^3 + 2 A1 A2 C1 S2 y^3 - 2 A1^2 C2 S2 y^3 + A2 B1 B2 C1 y^4 - A1 B2^2 C1 y^4 - A2^2 C1^2 y^4 - A2 B1^2 C2 y^4 + A1 B1 B2 C2 y^4 + 2 A1 A2 C1 C2 y^4 - A1^2 C2^2 y^4 *) 
Posted 8 years ago
 Thank you for solving. That is one big formula.
Posted 8 years ago

Using == instead of = does not appear to make a difference in this case.

Here is another approach yet without success:

# 1 Isolate the 'y' coordinate from the quadratic Hyperbola equation in Wolfram:

Solve[{A1 x^2 + B1 x y + C1 y^2 + D1 x + S1 y + F1 == 0}, {y}]


# 2 Result from above:

y = (-sqrt((B1 x+S1)^2-4 C1 (A1 x^2+D1 x+F1))-B1 x-S1)/(2 C1) and C1!=0


# 3 I do the same for the other Hyperbola

y = (-sqrt((B2 x+S2)^2-4 C2 (A2 x^2+D2 x+F2))-B2 x-S2)/(2 C2) and C2!=0


# 4 I put the two together:

(-sqrt((B1 x+S1)^2-4 C1 (A1 x^2+D1 x+F1))-B1 x-S1)/(2 C1) == (-sqrt((B2 x+S2)^2-4 C2 (A2 x^2+D2 x+F2))-B2 x-S2)/(2 C2)


# 5 I solve for x in Wolfram:

Solve [{(-sqrt((B1 x+S1)^2-4 C1 (A1 x^2+D1 x+F1))-B1 x-S1)/(2 C1) == (-sqrt((B2 x+S2)^2-4 C2 (A2 x^2+D2 x+F2))-B2 x-S2)/(2 C2)}, {x}]


# 6 Result from above:

Wolfram|Alpha doesn't understand your query. Showing instead result for query: Solve sqrt x^2

Posted 8 years ago
 You use = in three places where you should use == and those mean completely different things to Mathematica. Those might just be typos or they might be a deeper misunderstanding. If those were not just typos then look up = and == in the help pages and study those until you are certain what each means and how they are different.A completely different issue is, although the documentation for Eliminate doesn't say this, if you are eliminating n variables then it seems that you almost always need at least n+1 equations to get useful and interesting results. Trying to eliminate one variable given only one equation doesn't seem to usually work well. It is perhaps unfortunate that there isn't a warning of some kind to let a user know this.