I want to solve this system of two equations for $x$ $$\{ \sin (2\pi x)+\sin (\frac{2\pi}y)=0 \quad , \quad \cos (2\pi x)-\cos (\frac{2\pi}y)=0 \} \qquad (1)$$
I use Solve
:
Solve[ { Sin[ 2 π x] + Sin[(2 π )/y ] == 0, Cos[ 2 π x] - Cos[(2 π )/y ] == 0 }, x ] // Simplify
(*{{x -> ConditionalExpression[ArcTan[Cos[(2 π )/y], -Sin[(2 π )/y]]/(2 π ) + C[1], C[1] \[Element] Integers]}}*)
The result is in the form of a conditional expression:
$$x=\frac{1}{2\pi}\text{ArcTan}[\cos (\frac{2\pi}y),-\sin (\frac{2\pi}y)]+c_1, \qquad c_1\in\mathbb{Z}$$
Substituting $x=\dfrac{1}{2\pi}\arctan\left(\frac{-\sin (\frac{2\pi}y)}{\cos (\frac{2\pi}y)}\right)+m$ into $(1)$, I get
Sin[ 2 π x] + Sin[(2 π )/y] /. x -> ((ArcTan[-(Sin[(2 π )/y]/Cos[(2 π )/y])]/(2 π )) + m) // FullSimplify[#, Assumptions -> y > 0 && y \[Element] Reals && m \[Element] Integers] &
Cos[ 2 π x] - Cos[(2 π )/y] /. x -> ((ArcTan[-(Sin[(2 π )/y]/Cos[(2 π )/y])]/(2 π )) + m) // FullSimplify[#, Assumptions -> y > 0 && y \[Element] Reals && m \[Element] Integers] &
(* (-1 + Sign[Sec[(2 π )/y]]) Sin[(2 π )/y]*)
(* (-1 + Sign[Sec[(2 π )/y]]) Cos[(2 π )/y] *)
which means that the equations vanish simultaneously if $\text{sgn} (\frac{2\pi}y)=+1$, i.e., only for those $y$ for which $\text{sgn} (\frac{2\pi}y)=+1$, we can simplify $x=\dfrac{1}{2\pi}\arctan\left(\frac{-\sin (\frac{2\pi}y)}{\cos (\frac{2\pi}y)}\right)+m$ as $x=m-\frac1y$
On the other hand, it is evident that both equations $(1)$ vanish at $x=m-\frac1y$ for all values of $y$ (while some of them may not satisfy $\text{sgn} (\frac{2\pi}y)=+1$).
Sin[ 2 π x] + Sin[(2 π)/y] /. x -> m - 1/y // FullSimplify[#, Assumptions -> y > 0 && y \[Element] Reals && m \[Element] Integers] &
Cos[ 2 π x] - Cos[(2 π)/y] /. x -> m - 1/y // FullSimplify[#, Assumptions -> y > 0 && y \[Element] Reals && m \[Element] Integers] &
(*0*)
(*0*)
ArcTan[x, y]
is the same as $\arctan(y/x)$. I think you have it switched when you plugged the thing back in. $\endgroup$ConditionalExpression
, changingC[1]
tom
in your second code block, I get zero. $\endgroup$Simplify[expr, y > 2 \[Pi]]
on the conditional expression, it gives youm - 1/y
. $\endgroup$