How to solve this system of trigonometric trancendental equations over the reals?
Sin
is defined in the whole complex plane, while ArcSin
is not. Solving a system involving ArcSin
makes unneccessary problems therefore it is better to use Sin
instead ArcSin
. Let's take a look at this:
ContourPlot[{x^2 + 2x Sin[y] + 3Cos[y] == 0, x/2 + Sin[y] == Sin[y - Pi/3]},
{x, -25, 25}, {y, -5 Pi, 5 Pi}]
We can see there are infinitely many solutions, however one seems to ask about the only one solution equivalent to that observed with ContourPlot
involving ArcSin
. Thus we are interested in solutions -4<= x <=4
and -1 <= y - Pi/3 <= 1
. We are solving the system without ArcSin
(it make the problem easier) however we have to add appropriately modified restriction on variables x
and y
:
sol = {x, y} /. { ToRules @ Reduce[{x^2 + 2x Sin[y] + 3Cos[y] == 0,
x/2 + Sin[y] == Sin[y - Pi/3],
-4 <= x <= 4,
-1 <= y - Pi/3 <= 1},
{x, y}]}
{{1/4 (-Sqrt[3] - Sqrt[15]), 2 ArcTan[Sqrt[3/5]]}}
ContourPlot[{x^2 + 2 x Sin[y] + 3 Cos[y] == 0, ArcSin[x/2 + Sin[y]] == y - Pi/3},
{x, -4, 4}, {y, 0, 2 Pi},
Epilog -> {Red, PointSize[0.025], Point[sol]}, ContourStyle -> Thick,
PlotPoints -> 25, MaxRecursion -> 4, AspectRatio -> Automatic]
This is an extension of my earlier comment. The solution of the equations, transformed as suggested by b.gatessucks, is
s = Reduce[{x^2 + 2*x*Sin[y] + 3*Cos[y] == 0,
x/2 + Sin[y] == Sin[y - Pi/3]}, {x, y}, Reals]
(* (C[1] ∈ Integers && ((x == 1/4 (-Sqrt[3] - Sqrt[15]) &&
y == 2 ArcTan[Sqrt[3/5]] + 2 π C[1]) || (x == 1/4 (-Sqrt[3] + Sqrt[15]) &&
y == -2 ArcTan[Sqrt[3/5]] + 2 π C[1]))) || (C[1] ∈ Integers && x == Sqrt[3] &&
y == π + 2 π C[1]) *)
Now substitute the first of the three solutions into the original equations
FullSimplify[{x^2 + 2*x*Sin[y] + 3*Cos[y] == 0,
ArcSin[x/2 + Sin[y]] == y - Pi/3} /. (s[[1, 2, 1]] // ToRules), s[[1, 1]]]
(* {True, C[1] == 0} *)
Therefore, the C[1] == 0
member of the first family of solutions is valid,
({x, y} /. (s[[1, 2, 1]] // ToRules) /. C[1] -> 0)
(* {1/4 (-Sqrt[3] - Sqrt[15]), 2 ArcTan[Sqrt[3/5]]} *)
Doing the same with the second family of solutions, however, yields,
FullSimplify[{x^2 + 2*x*Sin[y] + 3*Cos[y] == 0,
ArcSin[x/2 + Sin[y]] == y - Pi/3} /. (s[[1, 2, 2]] // ToRules), s[[1, 1]]]
(* {True, False} *)
and similarly for the third family of solutions.
Note that the one valid solution is equivalent to that from Maple.
FullSimplify[({x, y} /. (s[[1, 2, 1]] // ToRules) /. C[1] -> 0) ==
{-2 Cos[ArcTan[Sqrt[15]] + Pi/6] - Sqrt[15]/2, ArcTan[Sqrt[15]]}]
(* True *)