# How can I get solutions of this trigonometric equation?

I am trying to solve the equation $$\left(\sin (x)+\cos (x)-\sqrt{2}\right)\cdot \sqrt{-11 x-x^2-30}=0$$ in Real domain. I tried

First way

Solve[{(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0}]


I got

{{x -> -6}, {x -> -5}, {x -> [Pi]/4}}

Second way

   Solve[{(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0}, x,
Reals] // FullSimplify


I got

{{x -> -6}, {x -> -5}, {x -> -((7 [Pi])/4)}, {x -> -((7 [Pi])/4)}}

Third way

sol = (TrigExpand@
Reduce[(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0,
x, Reals] // FullSimplify // Last) /. C -> k


I got

x == -((7 [Pi])/4)

How to get the correct solutions?

Solve gives you a warning that it may not find all possible answers. Use Reduce instead:

Reduce[{(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0}]

(C \[Element] Integers && x == -2 ArcTan[1 - Sqrt] + 2 \[Pi] C) || x == -6 || x == -5


which shows that there is an infinite family of solutions, one for each integer C.

• How can I simplify solution x == -2 ArcTan[1 - Sqrt] + 2 \[Pi] C)? Jul 9, 2019 at 3:50
• -2 ArcTan[1 - Sqrt] // N simplifies this to a number. 2 Pi C is 2 Pi times any integer, so cannot be simplified. Jul 9, 2019 at 3:51
• I want your solutions should be simplified. Jul 9, 2019 at 3:57
• I used and get the correct solutions. Reduce[(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0, x, Reals] // FullSimplify Jul 9, 2019 at 4:06
• @minhthien_2016 - Reduce[{(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0}]//FullSimplify eliminates the ArcTan and makes it easy to see that your result is just the case for C -> -1 Jul 9, 2019 at 5:58

If you restrict the solution range to -6<= x<= -5 (from checking Sqrt[-11 x - x^2 - 30] )

Solve[{(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0 // TrigToExp, -6 <= x <= -5}, x]
(* {{x -> -6}, {x -> -5}, {x -> -((7 \[Pi])/4)}, {x -> -((7 \[Pi])/4)}} *)


Solve`( not NSolve!!) gives all real solutions

• Please see my second way. Jul 9, 2019 at 9:45