# 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[2]) Sqrt[-11 x - x^2 - 30] == 0}]


I got

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

Second way

   Solve[{(Sin[x] + Cos[x] - Sqrt[2]) 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[2]) Sqrt[-11 x - x^2 - 30] == 0,
x, Reals] // FullSimplify // Last) /. C[1] -> 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[2]) Sqrt[-11 x - x^2 - 30] == 0}]

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


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

• How can I simplify solution x == -2 ArcTan[1 - Sqrt[2]] + 2 \[Pi] C[1])? – minhthien_2016 Jul 9 at 3:50
• -2 ArcTan[1 - Sqrt[2]] // N simplifies this to a number. 2 Pi C[1] is 2 Pi times any integer, so cannot be simplified. – bill s Jul 9 at 3:51
• I want your solutions should be simplified. – minhthien_2016 Jul 9 at 3:57
• I used and get the correct solutions. Reduce[(Sin[x] + Cos[x] - Sqrt[2]) Sqrt[-11 x - x^2 - 30] == 0, x, Reals] // FullSimplify – minhthien_2016 Jul 9 at 4:06
• @minhthien_2016 - Reduce[{(Sin[x] + Cos[x] - Sqrt[2]) 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] -> -1 – Bob Hanlon Jul 9 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[2]) 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. – minhthien_2016 Jul 9 at 9:45