1
$\begingroup$

I have a simple trig equation:

Clear[f, x]
f[x_] = Cos[2*x] - 3 Sin[x] + 2
Solve[f[x] == 0, x]

I received a very long a complicated reply that I do not understand.

{{x -> ConditionalExpression[\[Pi] - 
     ArcTan[(-3 + Sqrt[33])/(2 Sqrt[2 (-1 + 3/4 (-3 + Sqrt[33]))])] + 
     2 \[Pi] C[1], C[1] \[Element] Integers]}, {x -> 
   ConditionalExpression[
    ArcTan[(-3 + Sqrt[33])/(2 Sqrt[2 (-1 + 3/4 (-3 + Sqrt[33]))])] + 
     2 \[Pi] C[1], C[1] \[Element] Integers]}, {x -> 
   ConditionalExpression[
    ArcTan[-I Sqrt[1/2 (1 - 3/4 (-3 - Sqrt[33]))], 
      1/4 (-3 - Sqrt[33])] + 2 \[Pi] C[1], 
    C[1] \[Element] Integers]}, {x -> 
   ConditionalExpression[
    ArcTan[I Sqrt[1/2 (1 - 3/4 (-3 - Sqrt[33]))], 
      1/4 (-3 - Sqrt[33])] + 2 \[Pi] C[1], C[1] \[Element] Integers]}}

What is wrong with my formulation of the question?

$\endgroup$
  • $\begingroup$ Solve[]is used to solve polynomial equations. Try FindRoot! $\endgroup$ – Ulrich Neumann May 29 '18 at 11:17
  • $\begingroup$ use Solve[f[x] == 0, x] /. C[1] -> 0 or Assuming[{Element[C[1], Integers]}, Simplify@Solve[f[x] == 0, x]] to get one of infinitely many (periodic) solutions. $\endgroup$ – kglr May 29 '18 at 11:18
  • $\begingroup$ Reduce[f[x] == 0, x] // ToRadicals $\endgroup$ – march May 30 '18 at 4:06
1
$\begingroup$

You can solve your problem using Solve or NSolve:

 Solve[{f[x] == 0, 0 < x < 2 Pi}, x] // N
 (*{{x -> 0.756171}, {x -> 2.38542}} *)

or using FindRoot with initial condition

 FindRoot[f[x] == 0, {x, 0}]
 (* {x -> 0.756171}*)
$\endgroup$
3
$\begingroup$
Clear[f, x];
f[x_] = Cos[2*x] - 3 Sin[x] + 2;

FunctionPeriod[f[x], x]

Solve[{Cos[2*x] - 3 Sin[x] + 2 == 0, 0 < x < 2 Pi}, x] // ToRadicals // Simplify
N[%]

Solve[(Solve[Cos[2*x] - 3 Sin[x] + 2 == 0, x] /. {Rule -> Equal, List -> Or}) &&
 0 < x < 2 Pi, x] // RootReduce // ToRadicals // Normal
N[%]

enter image description here

$\endgroup$

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.