To recover the third solution in Mathematica as is to explain why it is missing in the solution without extra conditions.
zeros=Reduce[(3 - Cos[4 x]) (Sin[x] - Cos[x]) == 2 && x >= -2 π &&
x <= 0, x] /. C[1] -> 0
(x == -((3 [Pi])/2) || x == -[Pi])
So the solution implicitly is the substitution for C1==0. This has to done by interpreting the periodicity of the trigonometric composition.
FunctionPeriod[(3 - Cos[4 x]) (Sin[x] - Cos[x]), x]
2 [Pi]
That is too what the constant C1 is for in the solution of Solve
and Reduce
.
So getting the -Pi in the solution was a different interpretation in the question and is not an error.
zlist = List @@ zeros[[All, 2]];
This shows each period of the functions has two zero on the real axis.
Solve[(3 - Cos[4*x])*(Sin[x] - Cos[x]) == 2, x]
This shows the constant C1 and this domain of C1. So there are as many solutions as the Integers
are mighty.
The ConditionalExpression
is much to advanced for beginners. In the Plot
built-in it does not matter because Plot
uses Through
. That evaluates the ConditionalExpression
on the choosen interval of the Plot
. In the output of Mathematica, the substitution evaluates them too and this makes a choice of an interval in which the solution reside. Sinces most beginners courses in maths do not teach Complexes there are obsolete solutions.
zlist = List @@ zeros[[All, 2]]
zlist = Append[zlist, zlist + 2 π] // Flatten
Plot[(3 - Cos[4 x]) (Sin[x] - Cos[x]) - 2, {x, -2 Pi, 2 Pi},
Ticks -> {{-2 Pi, -Pi, 0, Pi, 2 Pi}, {-1, 1}},
Epilog -> {Red, PointSize[0.01], Point[Thread[{#, 0} &@zlist]]}]
With 12.0.0 I have no problems solving this input. Most probable source for beginners are token variables. Just use Clean or CleanAll on the variables or CleanAll["Global`*"] or Quit and try again.
ComplexPlot[(3 - Cos[4*x])*(Sin[x] - Cos[x]) -
2, {x, -2 π - 2 π I, 2 π + 2 π I},
Epilog -> {Red, PointSize[0.01], Point[Thread[{#, 0} &@zlist]]}]
For the second part of the question
Reduce[Tan[2 x] Tan[7 x] == 1, x, Reals]
FunctionPeriod[Tan[2 x] Tan[7 x], x]
(Pi)
Reduce
is slightly easier to understand in the output compared to Solve
.
Reduce
contains Solve
complete and the methods of Solve
can restricted in Reduce
with the option Method->Reduce
Solve
behave almost like Reduce
. Instead of Solve
Reduce
is invoked.
In the documentation page of Reduce
Wolfram Inc states that "For transcendental equations, Solve may not give all solutions:". On the other side "Reduce does not solve equations that depend on branch cuts of Wolfram Language functions:". So plot the function first and identify the problem.
Solve
has much more options than Reduce
in the documentation page. It is up to oneself to test their functionality in Reduce
.
solt = Solve[Tan[2 x] Tan[7 x] == 1, x, Reals]
zert = solt[[All, 1, 2]] /. C[1] -> 0 // List // Flatten
plo = Plot[Tan[2 x] Tan[7 x] - 1, {x, -1.0125 π, 1.0125 π},
Epilog -> {Red, PointSize[0.02], Point[Thread[{#, 0} &@zert]]}]
lip = ListPlot[
Callout[{# // N, 0}, #,
LeaderSize -> {{32, 135 \[Degree], 6}, {5, 180 \[Degree]}}] & /@
zert, PlotMarkers -> Automatic, PlotTheme -> "Web"];
Show[plo, lip, ImageSize -> 600, AspectRatio -> 1/4]
The substitution of the trigonometrics is a nice alternative. Both factors work brilliant and give a polynomial of fifth order.
equ1 = (3 - Cos[4 x]) (Sin[x] - Cos[x]) - 2 == 0;
equ2 = t == 3 - Cos[4 x];
Eliminate[TrigExpand[{equ1, equ2}], x]
(* 16 t^2 - 4 t^4 + t^5 == 32 *)
Solve[16 t^2 - 4 t^4 + t^5 == 32, Reals]
(* {t -> 2} *)
The polynomial for the substitution of t == 3 - Cos[4 x] has only one solution.
Plot[{16 t^2 - 4 t^4 + t^5, 32}, {t, -3, 3},
Epilog -> {Red, PointSize[0.02], Point[{2, 32}]}]
Reduce[-Cos[x] + Sin[x] == 1, x, Reals]
Solve[-Cos[x] + Sin[x] == 1, x, Reals]
(Element[C[1], Integers] && x == Pi/2 + 2*Pi*C[1]) ||
(Element[C[1], Integers] && x == Pi + 2*Pi*C[1])
{{x -> ConditionalExpression[Pi/2 - 4*Pi*C[1], Element[C[1], Integers]]},
{x -> ConditionalExpression[2*(-(Pi/2) + 2*Pi*C[1]), Element[C[1], Integers]]},
{x -> ConditionalExpression[2*(Pi/2 + 2*Pi*C[1]), Element[C[1], Integers]]},
{x -> ConditionalExpression[Pi/2 - 2*(Pi + 2*Pi*C[1]), Element[C[1], Integers]]}}
Reduce[3 - Cos[4 x] == 2, x, Reals]
Element[C[1], Integers] && x == (Pi*C[1])/2
Some examples:
Table[(Pi*C)/2, {C, -6, 6}]
(* {-3*Pi, -((5*Pi)/2), -2*Pi, -((3*Pi)/2), -Pi, -(Pi/2), 0, Pi/2, Pi, (3*Pi)/2, 2*Pi,
(5*Pi)/2, 3*Pi} *)
The cause is 4 is even and this means the zeros of both factors match.
Mathematica stays a little back on Root object and representation of numbers in terms of trigonometrics for example. This question might help further in this and other problems, transform root objects into trigonometric expressions. Especially the robust approach in the AskConstants package AskConstants download and AskConstants WTC presentation on Youtube. This package is free and the user are professional Mathematica users at the University of Hawaii.