# Can Mathematica solve A Sin[t]^2 + B Cos[t]^2==1 for {A,B}?

Can Mathematica solve A Sin[t]^2 + B Cos[t]^2==1 for {A,B}?

The solution to the statement

ForAll[t,Exists[{A,B},A Sin[t]^2+B Cos[t]^2==1]]


is easily found through inspection as A==B==1, but Resolve[] of the statement does not find the solution. Is there a way that Mathematica can solve this equation?

Reduce[a Sin[t]^2 + b Cos[t]^2 == 1, {a, b, t}];
Cases[%, _[___, a == 1, ___, b == 1, ___]]


{(-π + t)/(2 π) ∉ Integers && a == 1 && b == 1}

Update

Assuming $$\{a,b\}\in\mathbb{R}$$.

Reduce[a Sin[t]^2 + b Cos[t]^2 == 1 && a ∈ Reals && b ∈ Reals, {a, b, t}]


(a == 1 && b == 1) || ((a | b) ∈ Reals && C[1] ∈ Integers && a - b != 0 && (t == 1/2 (-ArcCos[(-2 + a + b)/(a - b)] + 2 π C[1]) || t == 1/2 (ArcCos[(-2 + a + b)/(a - b)] + 2 π C[1])))

Cases[%, _[___, a == 1, ___, b == 1, ___]]


{a == 1 && b == 1}

• What's the rest of the output? It makes no sense that $t$ would have to be an odd multiple of $\pi$, which is what your first condition is saying; the conditions still hold no matter what $t$ is. Pperhaps there are other conditions that were returned, other than the Last? Apr 24, 2020 at 11:55
• I assume you don't have access to M, or else you would evaluate it instead of asking? I can put it in, but they are somewhat bulky. The condition for all $t$ is obtained when we assume $a$ and $b$ are real. Apr 24, 2020 at 13:13
• I'm working from home and didn't want to go through the hassle of firing up my college's VPN to see what the full result was. Mainly I just wanted to see whether there was some kind of bug in Mathematica's output, or whether it was just phrased in some arcane way. In my experience, Reduce rarely outputs its results in the "nicest" possible way. Apr 24, 2020 at 19:28

"For all t " means

D[a Sin[t]^2 + b Cos[t]^2 - 1,t]==0//Simplify
(*(a - b) Sin[2 t] == 0=> a==b*)

a Sin[t]^2 + b Cos[t]^2 == 1 /.b->a//Simplify
(*a==1*)