I've been solving a question,

If $\cos(x) + \sin(x)=\sqrt{2} \cos(\pi/2 - x)$ then find the value of $x$.

We know that $\cos(x) + \sin(x)= \sqrt{2} \sin(\pi/4 + x)$. So, $$\sin(\pi/4 + x) = \cos(\pi/2 - x)$$ But $\cos(\pi/2 - x) = \sin x$, so we must have $$\sin(\pi/4 + x)=\sin(x).$$ Now if I change $\sin(x)$ to $\sin(\pi - x)$ then the correct answer will come, i.e. $$\sin(\pi/4 + x)=\sin(\pi - x) \implies \pi/4 + x = \pi -x \implies x=3\pi/8.$$ But why is $\pi/4 + x=x$ not true. My book says, if $\sin(x)=\sin(y)$ then $ x = (-1)^ny + n\pi $. If I put $n=0$ then $x=y$ but this is not true in my case. Why?

I also looked on the relevant Wikipedia article but could not understand why these formulas are true for any value of $\theta$ that may be more that $\pi/2$ and less than $0$.

  • 1
    $\begingroup$ Sine is a periodic function. $\endgroup$ – Error 404 Jul 7 '15 at 16:38
  • $\begingroup$ I meant to say that Sine function is periodic on $\Bbb R$ not on $\Bbb C$.:D $\endgroup$ – Error 404 Jul 7 '15 at 17:11
  • $\begingroup$ @VikrantDesai I know that $\sin$ is a periodic function with period $2\pi$. $\endgroup$ – user103816 Jul 7 '15 at 17:27

My book says, if $\sin(x)=\sin(y)$ then $ x = (-1)^ny + n\pi $.

Yes, that means if $\sin(x)=\sin(y)$, then there exists some $n$ such that $ x = (-1)^ny + n\pi $, not that you get to choose which $n$, or that the statement is true for every $n$. For example, $$\sin(0)=0=\sin(7\pi)$$ and we do indeed have that $0=(-1)^{n}\pi+n\pi$ for $n=7$, but that is the only $n$ that works.

More generally, you should be aware that most functions do not have the property that $f(x_1)=f(x_2)\implies x_1=x_2$. Take a look at the Wikipedia page on injective functions.

  • $\begingroup$ Let $\sin(x)=\sin(0)$, now $x=(−1)^nπ+nπ$ for every integer $n$. Why is this true for every $n$ but in my case only for a specific $n$? Secondly how do we find the value of $n$ for the question given in the book. $\endgroup$ – user103816 Jul 8 '15 at 10:54
  • $\begingroup$ Your first sentence seems to ignore what I said in my answer (and also uses the formula wrong). Given a fixed number $x$ in advance - "fixed" meaning $x$ doesn't change, it's not being used as a variable, it's some actual number - then $$\sin(x)=\sin(0)\;\implies\; x=(-1)^n\cdot0+n\pi=n\pi\;\textsf{ for SOME integer }n$$ (As I explained in my answer.) Of course, this means is that, if I wanted to find all of the individual numbers $x$ that have the property $\sin(x)=\sin(0)$, then I would know that the set of numbers $$\{(-1)^n\cdot0+n\pi:n\in\mathbb{Z}\}=\{n\pi:n\in\mathbb{Z}\}$$ is it. $\endgroup$ – Zev Chonoles Jul 8 '15 at 16:27
  • $\begingroup$ No, I didn't ignore your answer. I didn't reckon that you meant $x$ and $y$ to be fixed values. In my question $x$ is not fixed, it can be $2n\pi+3\pi/8$. I still don't get if $x$ is a variable in my question then why $x+\pi/4=x$ is wrong. My guess is that perhaps $x$ is not a complete variable-- it can take only those values which satisfy $\cos(x) + \sin(x)=\sqrt{2} \cos(\pi/2 - x)$ so $x$ is neither completely fixed nor completely variable. And again how do I find $n$ for fixed $x$ and $y$? -- do I try trial and error? $\endgroup$ – user103816 Jul 9 '15 at 9:24
  • $\begingroup$ @user103816: You're interested in finding every real number $x$ with the property that $$\sin(x+\tfrac{\pi}{4})=\sin(x).$$ So now let $x$ be any particular such number - it's fixed, but we still don't know what it is. What do we know about $x$? As we've discussed, we know that this number $x$ has the property that $$\textsf{there EXISTS an integer }\,n\,\textsf{ such that }\,x+\tfrac{\pi}{4}=(-1)^nx+n\pi$$ We can see that it's impossible for $n$ to be even, but if $n$ is odd, we can rearrange to get $$\textsf{there EXISTS an ODD integer }\,n\,\textsf{ such that }\,2x=n\pi-\tfrac{\pi}{4}$$ $\endgroup$ – Zev Chonoles Jul 9 '15 at 9:39
  • $\begingroup$ So the set of real numbers $x$ that are solutions to the equation, i.e. the set $$\{x\in\mathbb{R}\,:\,\sin(x+\tfrac{\pi}{4})=\sin(x)\}$$ is equal to the set $$\left\{\frac{n\pi-\tfrac{\pi}{4}}{2}\,:\,n\textsf{ is an odd integer}\right\}$$ which can be written more simply as $$\left\{k\pi+\tfrac{3\pi}{8}\,:\,k\textsf{ is an integer}\right\}$$ $\endgroup$ – Zev Chonoles Jul 9 '15 at 9:43

See, If $\sin \theta =0,$ then $\theta=n\pi, \forall n \in \Bbb Z$. Similarly if $\cos\theta=0$, then $\theta=\frac {(2n+1)\pi}{2}, \forall n \in \Bbb Z$.

Now, If $\sin x=\sin y$, then $\sin x - \sin y=0$ $\Rightarrow$ $2\cos(\frac{x+y}{2})\sin(\frac{x-y}{2})=0$ $\Rightarrow$ $\cos(\frac{x+y}{2})=0$ or $\sin(\frac{x-y}{2})=0$.

If $\cos(\frac{x+y}{2})=0$, then $\frac {x+y}{2}=\frac {(2n+1)\pi}{2}, \forall n \in \Bbb Z$ $\Rightarrow$ $x=(2n+1)\pi-y, \forall n \in \Bbb Z$. If $\sin(\frac{x-y}{2})=0$, then $\frac {x-y}{2}=n\pi, \forall n \in \Bbb Z$ $\Rightarrow$ $x=2n\pi + y, \forall n\in \Bbb Z$.

Combining these two results, we see that $x=(-1)^{n}y+n\pi, \forall n \in \Bbb Z. $


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.