- #1
NigelTufnel
Gold Member
- 11
- 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?
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?