# How to eliminate $x,y$ from that system?

The system is as follows

sys={a*Tan[x] == b*Tan[y], a*Sin[x]^2 + b*Cos[x]^2 == m, b*Sin[y]^2 + a*Cos[y]^2 == n}


My approachs are

Eliminate[{a*Tan[x] == b*Tan[y], a*Sin[x]^2 + b*Cos[x]^2 == m, b*Sin[y]^2 + a*Cos[y]^2 == n}, {x, y}]


Eliminate::ifun: Inverse functions are being used by Eliminate, so some solutions may not be found; use Reduce for complete solution information.
m (-a b + a n + b n) == a b n

and (The conditions a != b, a != m, b != n are added to exclude degenerate cases.)

Reduce[{a^2*Tan[x]^2 == b^2*Tan[y]^2, a*Sin[x]^2 + b*Cos[x]^2 == m,
b*Sin[y]^2 + a*Cos[y]^2 == n, a != b, a != m, b != n}, {x, y}, Reals] // FullSimplify


A huge expression

and

Solve[{a*Tan[x] == b*Tan[y], a*Sin[x]^2 + b*Cos[x]^2 == m,
b*Sin[y]^2 + a*Cos[y]^2 == n, a != b, a != m, b != n}, {x, y}]


{}

The answer by hand under the conditions a != b, a != m, b != n is $$a^2(m-b)(b-n)=b^2(n-a)(a-m).$$

• Could you please describe the underlying geometric problem? Oct 2, 2020 at 12:35
• @UlrichNeumann: Kvant, p.16 says nothing about such a problem Oct 2, 2020 at 13:26
• Just to compare. Maple produces $$b\sqrt {{\frac {a-n}{a-b}}}a\sqrt {-{\frac {-a+m}{a-b}}}-{b}^{2}\sqrt {{\frac {a-n}{a-b}}}\sqrt {-{\frac {-a+m}{a-b}}}+a\sqrt {-{\frac {b-m }{a-b}}}\sqrt {-ab+an+{b}^{2}-bn}=0$$ and three similar expressions. Oct 2, 2020 at 15:03
• BTW, the result of Eliminate[sys,{x,y}] is identical in 7.0 and 12.1.1.0. Oct 2, 2020 at 16:21
• Sorry my knowledge in russian (?) language is zero, that's why I ask for the basic problem Oct 2, 2020 at 16:30

Weierstrass substitution makes Eliminate working: Solutions of sys are 2Pi-periodic

sys={a*Tan[x] == b*Tan[y], a*Sin[x]^2 + b*Cos[x]^2 == m, b*Sin[y]^2 +a*Cos[y]^2 == n}


Weierstrass-substitution constraints the solution {x,y} to -Pi<x,y<Pi

sysu = TrigExpand[sys /. {x -> 2 ArcTan[ux], y -> 2 ArcTan[uy]}] // Simplify

cond=Eliminate[sysu, {ux, uy}] // FullSimplify
(*a b (m + n) == (a + b) m n*)


The magic answer by hand $$a^2 (m - b) (b - n) -b^2 (n - a) (a - m)$$ can easily be simplified to

0==Factor[a^2 (m \[Minus] b) (b \[Minus] n) -b^2 (n \[Minus] a) (a \[Minus] m)] // FullSimplify
(*(a - b) (-a m n - b m n + a b (m + n))==0*)


The second part is equivalent to the condition found by Weierstrass-substitution!

• Thank you. Is sysu equivalent to sys? There are -1 + ux^2 and similar expressions in the denominators of sysu. I have strong doubts about it. Oct 2, 2020 at 9:27
• @user64494 Solutions of sys are periodic in 2Pi, sysu gives solutions -Pi<x,y<Pi Oct 2, 2020 at 9:33
• Ulrich Neumann: Are you serious? I think you produced a part of the complete answer. +1 for your work. Oct 2, 2020 at 9:42
• I'm quite sure that my approach gives the complete solution ! Try m /. Solve[sysu, {ux, uy, m}] // Simplify // Union Oct 2, 2020 at 9:46
• Your "answer by hand" isn't well founded! I'm out of this useless discussion Oct 2, 2020 at 10:15

Only provide another way similar to Eliminate. Not so beautiful.

a ∈ Reals, b ∈ Reals, x ∈ Reals, y ∈ Reals, m ∈ Reals, n ∈ Reals, a != b, a != m, b != n, m != b, n != a

Clear["*"];
sys = {a*Tan[x] == b*Tan[y], a*Sin[x]^2 + b*Cos[x]^2 == m,
b*Sin[y]^2 + a*Cos[y]^2 == n, a ∈ Reals,
b ∈ Reals, x ∈ Reals, y ∈ Reals,
m ∈ Reals, n ∈ Reals, a != b, a != m, b != n,
m != b, n != a};
reg = ImplicitRegion[sys , {a, b, x, y, m, n}];
Resolve[Exists[{x, y}, Element[{a, b, x, y, m, n}, reg]],
Reals] // Simplify
`
• Your answer is very close to the Ulrich Neumann's one and also does not cover the answer by hand. However,+1. Oct 2, 2020 at 10:10
• @user64494 Thanks! Oct 2, 2020 at 10:11