Solving trig equation Mathematica repeats results

  • Context: Mathematica 
  • Thread starter Thread starter NigelTufnel
  • Start date Start date
  • Tags Tags
    Mathematica Trig
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 5K views
NigelTufnel
Gold Member
Messages
11
Reaction score
1
I am new to Mathematica and I'm not sure if I'm using it properly but sometimes the output doesn't make sense to me. I Hope someone can help me understand or correct my usage.

When solving trig equations Mathematica's Solve[] function gives the correct list of solutions but some of the solutions are repeated more than once. I present an example below.

Given the simple trig equation:
2 Sin[x]^2 + 3 Sin[x] + 1 == 0

Find only those solutions that are in the interval zero to 2*Pi.

There are only three solutions:
(7 Pi)/6, (3 Pi)/2, and (11 Pi)/6

Here is how I input the problem into Mathematica:
Solve[{2 Sin[x]^2 + 3 Sin[x] + 1 == 0, 0 <= x <= 2 Pi}, x]

Here is the output that Mathematica produces:
{{x -> (7 Pi)/6}, {x -> (3 Pi)/2}, {x -> (3 Pi)/2}, {x -> (11 Pi)/6}}

Notice that one of the solutions (3 Pi)/2 is repeated twice in the list of solutions. Why does it repeat this one solution. Why not repeat the others? Why repeat any of them? Am I doing something wrong?
 
Physics news on Phys.org
Mathematica considers it a double root. Compare with Solve[x^2 == 0, x].
 
Thank you very much Hypersphere. You have made me aware of my need to study the concept of multiplicity and multiple roots.