Simplify solutions of trigonometric equation has the form Sin[a]==Sin[b]

I am trying to solve the equation $$\sin\left(2 x + \dfrac{\pi}{5} \right) = \sin \left(3 x-\dfrac{2 \pi }{7} \right).$$ My code

Clear[a, b];
a = 2 x + Pi/5;
b = 3 x - 2*Pi/7;
TrigExpand@Reduce[Sin[a] == Sin[b], x, Reals] // FullSimplify


I get

I solve by my hand.

Clear[a, b];
a = 2 x + Pi/5;
b = 3 x - 2*Pi/7;
Reduce[{a == Pi - b + 2 * k * Pi || a == b +  2 * k * Pi}, x]


I get

x == (17 [Pi])/35 - 2 k [Pi] || x == (38 [Pi])/175 + (2 k [Pi])/5

How I tell Mathematica to get the solutions like that?

I also post at here

The simplest way to adapt your code is to apply TrigFactor to your equation before feeding it into Reduce:

Reduce[TrigFactor[Sin[a] - Sin[b]] == 0, x, Reals] // FullSimplify

(* C[1] \[Element] Integers &&
(x == 2/175 π (19 - 70 C[1]) ||
x == -(4/175) π (8 + 35 C[1]) ||
x == π (17/35 - 4 C[1]) ||
x == π (-(53/35) - 4 C[1])) *)


This is not the most parsimonious way of writing out the solution set — the method you find by hand is definitely more elegant. (Effectively, the last two options in this output correspond to the first option in your solution, while the first two options in this output correspond to the second option in your solution.) Still, this is a more elegant solution the default output.

• of course+1. This is the same method I used with FullSimplify just reconfiguring the same 4 general solutions. The general solution in update1 and another way of presenting it update 2. I am still somewhat confused by what “simple solution”means. Jul 7, 2023 at 13:30
• Please see another question mathematica.stackexchange.com/questions/287280/… Jul 7, 2023 at 14:39

Update 2

Perhaps, this is a simplifcation:

The "base" solution:

base = x /. {ToRules[
Reduce[{TrigFactor[u - v] == 0, 0 < x < 2 Pi}, x]]}


yields:

{(38 π)/175, (17 π)/35, (108 π)/175, (178 π)/175, (
248 π)/175, (318 π)/175}


The general solution is $$2 \pi$$ + the "base solution"

For example:

Manipulate[
Plot[Highlighted[TrigFactor[u - v],
Placed["Ball", List /@ (base + 2 Pi k)]], {x, -5 Pi, 5 Pi}], {k,
Range[-2, 2]}]


Update

In relation to comment:

sol = Reduce[TrigFactor[u - v] == 0, x];
Expand /@ (x /. {ToRules[sol[[2]]]})


yields:

{(38 π)/175 - (4 π C[1])/5, -((32 π)/175) - (
4 π C[1])/5, (17 π)/35 - 4 π C[1], -((53 π)/35) -
4 π C[1]}


where the $$c_1$$ are integers. See original answer below u, v.

Restricting problem:

u = Sin[2 x + Pi/5];
v = Sin[3 x - 2 Pi/7];
pts = {x,
u} /. {ToRules[
Reduce[{TrigFactor[u - v] == 0, 0 <= x <= 2 Pi}, x]]}


yields:

{{(38 π)/175, Cos[(47 π)/350]}, {(17 π)/
35, -Sin[(6 π)/35]}, {(108 π)/175, -Cos[(23 π)/350]}, {(
178 π)/175, Sin[(41 π)/175]}, {(248 π)/
175, -Sin[(6 π)/175]}, {(318 π)/175, -Sin[(29 π)/175]}}


As can be seen:

  Plot[{u, Highlighted[v, Placed["Ball", List /@ pts[[All, 1]]]]}, {x,
0, 2 Pi}]


• I don't want Restrict my problem. Jul 7, 2023 at 9:28
• @minhthien_2016 I have updated my answer. Jul 7, 2023 at 9:55
• Can you simplify all solutions? Jul 7, 2023 at 10:25
• @minhthien_2016 the solutions are simple and much simpler than questions. I may leave you to further simplify. Jul 7, 2023 at 10:28
• Thank you very much. Another question mathematica.stackexchange.com/questions/287280/… Jul 7, 2023 at 14:46

First of all, we can easily find the general solution of $$\cos(x)=0$$ and $$\sin(x)=0$$ (alternative form), where $$k$$ is an integer

FindSequenceFunction[x /. Solve[#[x] == 0 && 0 <= x < 10 Pi, x], k + 1] & /@
{Cos, Sin} // Simplify


$$\left\{\left(\frac{1}{2}+k\right) \pi ,k \pi \right\}$$

Then perform rules replacement

eqn = TrigFactor[Sin[a] - Sin[b]] == 0 /.
{a -> 2 x + Pi/5, b -> 3 x - 2 Pi/7} /.
{Cos[x_] :> (x - (k + 1/2) Pi), Sin[x_] :> x - k Pi};
Solve[eqn, x] // Expand


$$\left\{\left\{x\to \frac{38 \pi }{175}+\frac{2 k \pi }{5}\right\},\left\{x\to \frac{17 \pi }{35}-2 k \pi \right\}\right\}$$