Mathematica Solving trig equation Mathematica repeats results

  • Thread starter Thread starter NigelTufnel
  • Start date Start date
  • Tags Tags
    Mathematica Trig
AI Thread Summary
Mathematica's Solve[] function can produce repeated solutions for trigonometric equations, as demonstrated with the equation 2 Sin[x]^2 + 3 Sin[x] + 1 == 0. In this case, the output included the solution (3 Pi)/2 twice, indicating it is a double root. The user was initially confused about why some solutions were repeated while others were not. This behavior is due to the concept of multiplicity in roots, which Mathematica accounts for in its output. Understanding the nature of multiple roots is essential for effectively using Mathematica for solving equations.
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.
 

Similar threads

Replies
2
Views
1K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
1
Views
2K
Replies
19
Views
2K
Replies
2
Views
2K
Replies
5
Views
3K
Replies
1
Views
2K
Replies
1
Views
2K
Back
Top