I have the equation: $A \sin x + B \cos[x] = 0$ that should be satisfied for all the $x$. Of course, the solution is obvious: $A=B=0$, but I need Mathematica to resolve it automatically because this is a part of a bigger code.
I have tried SolveAlways, ForAll, Reduce and Resolve functions and nothing works.
eq = A Cos[x] + B Sin[x] == 0
SolveAlways[eq, x]
SolveAlways::ifun: Inverse functions are being used by SolveAlways, so some solutions may not be found; use Reduce for complete solution information.
{{}, {B -> 0}}
Reduce[ForAll[x, eq], {A, B}]
Reduce::nsmet: This system cannot be solved with the methods available to Reduce
Actually Reduce[eq, {A, B}]
gives the results and the needed result of {A->0,B->0}
is there, however, there are other expressions, that I do not need (with the dependence of $A$ and $B$ on $x$).
I wonder, if it is a robust way to handle this simple problem?
SolveAlways[Reduce[eq,{A,B}],x]
$\endgroup$eq
is a big system of equations the Reduce function will fail before SolveAlways will have a chance to filter the results out. $\endgroup$