Math
Trigonometric equation solver
Type an equation in x (or θ) and get every solution on the interval, exact where possible. Equations that reduce to sin, cos or tan of one angle get the substitution worked out and the general solution; anything else is solved numerically and graphed.
Examples: sin x = 0.5, tan(2x) = 1, sin x + cos x = 1, 2sin^2(x) = 1 − cos x. Use x or θ.
x = 2π/3 + 2πn
x = −2π/3 + 2πn
| x | Left side | Right side |
|---|---|---|
| 0 | 0 | 0 |
| 2π/3 | 0 | 0 |
| 4π/3 | 0 | 0 |
━ y = 2(cos(x))^2 - cos(x) - 1 ┄ y = 0
Each solution is where the two curves meet.
Show the working, step by step
Read the equation (as the calculator parsed it).
2(cos(x))^2 - cos(x) - 1 = 0
Only one trig expression appears, cos x. Let u = cos(x) and rewrite.
2u² − u − 1 = 0
Solve for u.
u = 1 or u = −1/2
Solve each basic equation for the angle.
cos x = 1: principal value 0, so x = 2πn cos x = −1/2: principal value 2π/3, so x = 2π/3 + 2πn or x = −2π/3 + 2πn
Pick the solutions that fall in [0, 2π).
0, 2π/3, 4π/3
How to type equations
Write the functions the way you would on paper: sin x, cos(2x),
tan²x or tan^2(x), sec x, arcsin(x). Use
pi or π, √3 or sqrt(3). sin x/2 is
read as (sin x)/2; write sin(x/2) for the sine of half x. Leave the interval blank for
one full turn starting at 0, or type both ends (for example −pi and pi) for a closed interval.
The basic equations
Everything reduces to one of three forms, with α the principal value from the inverse function:
sin x = k: x = α + 2πn or x = π − α + 2πn, α = arcsin k cos x = k: x = ±α + 2πn, α = arccos k tan x = k: x = α + πn, α = arctan k
sin x = k and cos x = k need −1 ≤ k ≤ 1; tan x = k works for any k. In degrees replace π by 180° and 2π by 360°.
A worked example
The default equation is 2cos²x − cos x − 1 = 0 on [0, 2π).
- Only cos x appears, so let u = cos x: 2u² − u − 1 = 0.
- Factor: (2u + 1)(u − 1) = 0, so u = 1 or u = −1/2.
- cos x = 1 gives x = 2πn, which is 0 in the interval.
- cos x = −1/2: arccos(−1/2) = 2π/3, so x = ±2π/3 + 2πn, which is 2π/3 and 4π/3 in the interval.
- Solutions: x = 0, 2π/3, 4π/3 (0°, 120°, 240°).
The graph under the result plots each side as a curve; the solutions are where they meet, and the table substitutes each one back into both sides as a check.
More examples
| Equation | Solutions in [0, 2π) | General solution |
|---|---|---|
| sin x = 0.5 | π/6, 5π/6 | π/6 + 2πn, 5π/6 + 2πn |
| tan 2x = 1 | π/8, 5π/8, 9π/8, 13π/8 | π/8 + n·π/2 |
| sin x + cos x = 1 | 0, π/2 | 2πn, π/2 + 2πn |
| sin 3x = −√3/2 | 4π/9, 5π/9, 10π/9, 11π/9, 16π/9, 17π/9 | −π/9 + n·2π/3, 4π/9 + n·2π/3 |
| sin x = 2 | none | none (sine never exceeds 1) |
sin x + cos x = 1 mixes two functions. By hand you would write the left side as √2·sin(x + π/4) and solve sin(x + π/4) = 1/√2. The solver instead finds the crossings numerically, confirms that the equation repeats every 2π, and builds the general solution from the solutions in one period.
Common mistakes
- Stopping at the calculator’s one answer. arcsin, arccos and arctan return one angle; the second family comes from the symmetry of the unit circle.
- Dividing by a trig function. Factor instead, or you lose the solutions where it is zero.
- Forgetting the multiple angle. For sin 2x = k, solve for 2x over twice the interval, then halve.
- Squaring both sides. This can add false solutions; check each answer in the original equation, as the table here does.
Common questions
How do I solve sin x = 0.5?
arcsin 0.5 = π/6 (30°). Sine is also positive in the second quadrant, so π − π/6 = 5π/6 (150°) is the other solution in one turn. The general solution is x = π/6 + 2πn or x = 5π/6 + 2πn, for any integer n.
What is a general solution?
A formula for every solution, not just those in one interval. Trig functions repeat, so once you have the solutions in one period you add whole periods: 2π (360°) for sin and cos, π (180°) for tan. For tan 2x = 1 the period is halved to π/2, giving x = π/8 + n·π/2.
Why does tan(2x) = 1 have four solutions in [0, 2π)?
As x runs from 0 to 2π, 2x runs from 0 to 4π, twice round the circle. tan θ = 1 has two solutions per turn, so there are four: x = π/8, 5π/8, 9π/8 and 13π/8. Whenever the angle is kx, expect k times as many solutions.
Can it solve equations with no algebraic method, like sin x = x/2?
Yes. Anything the solver cannot reduce to a basic equation is solved numerically: it scans the interval for places where the two sides cross and refines each one. On [−π, π], sin x = x/2 has three solutions: x = 0 and x = ±1.89549. Set the interval yourself for equations like this, since they have no repeating pattern.
Should I divide both sides by sin x?
No: you lose the solutions where sin x = 0. Factor instead. 2sin²x − sin x = 0 becomes sin x (2sin x − 1) = 0, so sin x = 0 or sin x = 1/2, giving 0°, 30°, 150° and 180° in [0°, 360°). Dividing by sin x would have kept only 30° and 150°.
Related calculators
-
Trig functions and inverses
arcsin, arccos, arctan and all six functions of an angle.
-
Trig graph calculator
See where a trig graph crosses a line, with period and phase shift.
-
Sine calculator
sin θ and arcsin with both solutions per turn.
-
Quadratic equation calculator
For the quadratic in sin x or cos x that many trig equations reduce to.