9
$\begingroup$

Namely,

$$\left\{x^2+2 x \sin (y)+3 \cos (y)=0,\sin ^{-1}\left(\frac{x}{2}+\sin (y)\right)=y-\frac{\pi }{3}\right\}$$ My simple-minded trial

Reduce[{x^2 + 2x Sin[y] + 3Cos[y] == 0,  ArcSin[x/2 + Sin[y]] == y - Pi/3},
       {x, y}, Reals]

is unsuccessful: the command is running for hours, almost crashing my computer. The plot

ContourPlot[{x^2 + 2x Sin[y] + 3Cos[y] == 0, ArcSin[x/2 + Sin[y]] == y - Pi/3}, 
            {x, -5, 5}, {y, 0, 2Pi}]

enter image description here

demonstrates the only real solution. It is easy to solve it numerically with

FindRoot[{x^2 + 2x Sin[y] + 3Cos[y] == 0, ArcSin[x/2 + Sin[y]] == y - Pi/3}, 
         {{x, 0}, {y, 1}}]
{ x->-1.40126, y->1.31812}

however I am interested in a symbolic solution. At first sight, I can't see a way to solve this quite nonstandard system under consideration by hand. Maple 2017.2 cracks it in a moment, outputting $$ \left\{ x=-2\,\cos \left( \arctan \left( \sqrt {15} \right) +\pi/6 \right) -1/2\,\sqrt {15},y=\arctan \left( \sqrt {15} \right) \right\} . $$

$\endgroup$
4
  • 3
    $\begingroup$ If you take Sin of the second equation then the system is much more tractable. $\endgroup$ Sep 13, 2017 at 11:55
  • 1
    $\begingroup$ @b.gatessucks: But not equivalent. $\endgroup$
    – user64494
    Sep 13, 2017 at 12:13
  • 2
    $\begingroup$ Yes, true, but easy to filter a afterwards. $\endgroup$ Sep 13, 2017 at 12:39
  • 1
    $\begingroup$ @b.gatessucks: Can you kindly elaborate your suggestion, giving an answer? $\endgroup$
    – user64494
    Sep 13, 2017 at 12:53

2 Answers 2

9
$\begingroup$

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 *)
$\endgroup$
12
$\begingroup$

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}]

enter image description here

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]

enter image description here

$\endgroup$
7
  • 1
    $\begingroup$ Thank you for your realization of the idea suggested by @b.gatesucks. Can you base your statement "So we are interested in solutions $-5\le x \le5 $and $0 \le y \le 2\pi$"? You solve a different system which is not equivalent to the assigned one. AFAIKI,the original system has the unique real solution (and a lot of complex solutions). $\endgroup$
    – user64494
    Sep 13, 2017 at 13:17
  • $\begingroup$ @user64494 You are correct. Substituting the three solutions into the original equations shows that only one is valid. $\endgroup$
    – bbgodfrey
    Sep 13, 2017 at 13:23
  • $\begingroup$ @bbgodfrey: The transformed system has infinite number of real solutions. The point is how to select (with Mathematica, not by hand) the only right one. $\endgroup$
    – user64494
    Sep 13, 2017 at 13:26
  • $\begingroup$ @user64494 The three solutions of the transformed equation contains C[1], with C[1] an integer. Hence, there are three infinite families of solutions. Substitute each of the three solutions into the original equations to obtain {True, C[1] == 0} for one family and {True, False} for the others. I can provide more detail, if desired. $\endgroup$
    – bbgodfrey
    Sep 13, 2017 at 13:30
  • $\begingroup$ @bbgodfrey: It would be kind of you. Thanks in advance. $\endgroup$
    – user64494
    Sep 13, 2017 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.