1
$\begingroup$

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?

$\endgroup$
2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ How can I simplify solution x == -2 ArcTan[1 - Sqrt[2]] + 2 \[Pi] C[1])? $\endgroup$ – minhthien_2016 Jul 9 at 3:50
  • $\begingroup$ -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. $\endgroup$ – bill s Jul 9 at 3:51
  • $\begingroup$ I want your solutions should be simplified. $\endgroup$ – minhthien_2016 Jul 9 at 3:57
  • $\begingroup$ I used and get the correct solutions. Reduce[(Sin[x] + Cos[x] - Sqrt[2]) Sqrt[-11 x - x^2 - 30] == 0, x, Reals] // FullSimplify` $\endgroup$ – minhthien_2016 Jul 9 at 4:06
  • 1
    $\begingroup$ @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 $\endgroup$ – Bob Hanlon Jul 9 at 5:58
0
$\begingroup$

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

$\endgroup$
  • $\begingroup$ Please see my second way. $\endgroup$ – minhthien_2016 Jul 9 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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