[Math] How to draw the graph of f(x)= [sin x] + [sin 2x]

continuitygraphing-functionstrigonometry

I needed to solve this question:

Let f(x) = [sin x] + [sin 2x] such that x belongs to (0,10) ,where [.] is the greatest integer function, then find the number of points where f(x) is discontinuous.

For solving such type of questions, I usually draw their graphs and find the points of discontinuity of the graph. However, since the trigonometric functions are inside the greatest integer function, I am unable to apply any trigonometric identity and convert them into one single function. I tried defining piece-wise functions separately for each term, and then adding the two, but it gets very tedious and lengthy.

Best Answer

Let’s see…

Function $f$ is the sum of two $2\pi$-periodic functions, hence it suffice to draw the graph in $]-\pi , \pi]$. We got:

$$ \begin{split} \sin x = 1 \quad &\Leftrightarrow \quad x = \frac{\pi}{2} \\ 0 \leq \sin x < 1 \quad &\Leftrightarrow \quad 0\leq x \leq \pi \land x \neq \frac{\pi}{2} \\ -1 \leq \sin x < 0 \quad &\Leftrightarrow \quad -\pi < x < 0 \\ \sin 2x = 1 \quad &\Leftrightarrow \quad x = \frac{\pi}{4}, - \frac{3\pi}{4} \\ 0 \leq \sin 2x < 1 \quad &\Leftrightarrow \quad 0\leq x \leq \frac{\pi}{2} \land x \neq \frac{\pi}{4} \\ &\phantom{\Leftrightarrow \quad} \text{ or } -\pi < x \leq -\frac{\pi}{2} \land x \neq -\frac{3\pi}{4} \\ &\phantom{\Leftrightarrow \quad} \text{ or } x = \pi \\ -1 \leq \sin x < 0 \quad &\Leftrightarrow \quad -\frac{\pi}{2} < x < 0 \text{ or } \frac{\pi}{2} < x < \pi \end{split} $$ therefore: $$\begin{split} [\sin x] &= \begin{cases} 1 &\text{, if } x = \frac{\pi}{2} \\ 0 &\text{, if } 0 \leq x \leq \pi \land x \neq \frac{\pi}{2} \\ -1 &\text{, otherwise} \end{cases} \\ [\sin 2x ] &= \begin{cases} 1 &\text{, if } x = \frac{\pi}{4}, -\frac{3\pi}{4} \\ 0 &\text{, if } 0\leq x \leq \frac{\pi}{2} \land x \neq \frac{\pi}{4} \\ & \text{ or } -\pi < x \leq -\frac{\pi}{2} \land x \neq -\frac{3\pi}{4} \\ & \text{ or } x = \pi \\ -1 &\text{, otherwise} \end{cases} \end{split} $$ When we put everything together we find: $$ f(x) := \begin{cases} -2 &\text{, if } -\frac{\pi}{2} < x < 0 \\ -1 &\text{, if } -\pi < x < -\frac{3\pi}{4}, -\frac{3\pi}{4} < x \leq -\frac{\pi}{2}, \frac{\pi}{2} < x < \pi \\ 0 &\text{, if } x= -\frac{3\pi}{4}, 0\leq x < \frac{\pi}{4}, \frac{\pi}{4} < x < \frac{\pi}{2}, x = \pi \\ 1 &\text{, if } x = \frac{\pi}{4}, \frac{\pi}{2} \end{cases} $$

Related Question