Re: solve trig equations

*To*: mathgroup at smc.vnet.net*Subject*: [mg125767] Re: solve trig equations*From*: Andrzej Kozlowski <akozlowski at gmail.com>*Date*: Sun, 1 Apr 2012 03:39:25 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <jl3v0c$3lo$1@smc.vnet.net> <201203310842.DAA13002@smc.vnet.net>

On 31 Mar 2012, at 10:42, Flavin wrote: > On Mar 30, 4:39 am, Neal Becker <ndbeck... at gmail.com> wrote: >> Solve[{Cos[a]+Cos[b]==x,Sin[a]+Sin[b]==y},{a,b},Reals] >> Solve::nsmet: This system cannot be solved with the methods available to Solve. >> >> >> This is a simple enough system, what am I doing wrong? > > I don't know why your command doesn't work, but this does. > FullSimplify[Solve[{Cos[a]+Cos[b]==x,Sin[a]+Sin[b]==y},{a,b}],{x\ > [Element]Reals,y\[Element]Reals}] The reason why this works and the original does not is that having the domain specification Reals in Solve imposes tough conditions on Solve (it has to establish that the solutions are real) while your method does not. Essentially what happens in your case is that Solve solves the equations over the complex numbers, which is quite easy Solve[{Cos[a]+Cos[b]==x,Sin[a]+Sin[b]==y},{a,b}] and after that it makes a few simplifications using the assumptions that x and y a real but without any guarantee that the answers are real for all real values of x and y. The original input requires such a guarantee. Using Reduce gives the full answer and one can see how complicated the conditions on x and y have to be to ensure that the solutions are real. One can also do this using Solve, which gives solutions in terms of ConditionalExpression, which maybe preferable for some purposes: Solve[{Cos[a] + Cos[b] == x, Sin[a] + Sin[b] == y}, {a, b}, Reals, MaxExtraConditions -> All, Method -> Reduce] Andrzej Kozlowski