# Continuity of trigonometric function with absolute values

I have to evaluate the continuity of this function $$f(x) = \begin{cases} \sin x + \dfrac{\sqrt{1-\cos2x}}{\sin x}, & x \neq 0 \\[6px] \sqrt{2}, & x=0 \end{cases}$$

For the function to be continuous we need $$\lim_{x \to 0}f(x) = f(0)$$

We know that $1 - \cos2x = 2\sin^2x$ so we can rewrite the $x \neq 0$ part as: $$\sin x + \frac{\sqrt{2\sin^2x}}{\sin x} = \sin x + \sqrt{2}\frac{\lvert\sin x\rvert}{\sin x}$$

Do I have to take cases here ($x \to 0^-$ and $x \to 0^+)$ for the $\lvert\sin x\rvert$ to find the limit I want, or can I assume that $\sin x > 0$?

UPDATE

Taking cases we have: $$\lvert\sin x\rvert = \begin{cases}-\sin x, & x < 0 \\[4px] \sin x, & x>0 \end{cases}$$

so $$\lim_{x \to 0^-}\sin x + \sqrt{2}\frac{-\sin x}{\sin x} = -\sqrt{2}$$

$$\lim_{x \to 0^+}\sin x + \sqrt{2}\frac{\sin x}{\sin x} = \sqrt{2}$$

Can I assume something like this?

This Wiki link makes it clear that we can have $-{\sin x}$. Does it have anything to do with the fact that $n \in \mathbb{Z}$?

• Not doing the casework and simply evaluating the limit at $x=0$ should do the job. – Tanuj Dec 14 '17 at 19:37
• @Tanuj i don't really understood your comment. If i take cases the limit left of 0 will give $- \sqrt2$ and the right $\sqrt2$ , thus making the limit not definable and the function non continuous. Is something wrong with my thinking? – Segmentation Dec 14 '17 at 19:43
• Just have a look at my answer . – Tanuj Dec 14 '17 at 19:44
• Do not forget to accept the answer if it helped. – Tanuj Dec 14 '17 at 19:47

You can't assume $\sin x>0$; what's true is that, in a punctured neighborhood of $0$ one has $\lvert\sin x\rvert>0$, which is quite different.

Just observe that $\lvert-1\rvert>0$, but surely $-1$ is not greater than $0$.

Computing the limits from the left and from the right isn't necessary: what you need to see is whether $\lim_{x\to0}f(x)=\sqrt{2}$. How to do this may involve computing the two limits.

You wouldn't need case work for $$g(x)=\begin{cases} 1 & x\ne0\\[4px] -1 & x=0\end{cases}$$ would you?

In your particular case it is convenient to do it, because, as you show, $$\lim_{x\to0^-}f(x) \neq \lim_{x\to0^+}f(x)$$ so the limit at $0$ doesn't even exist and therefore the function is not continuous at $0$.

• So you say that my approach is ok for this particular problem but it is not always necessary to compute left/right limits? – Segmentation Dec 14 '17 at 22:37
• @Segmentation Yes, that's it. The $g$ example was meant to clarify it. – egreg Dec 14 '17 at 22:52

The case work isn't necessary , because if you see the graph of $y=\sin x$ , you would figure out that whether $x$ be $0^{+}$ or $0^{-}$ , the value of $\sin x$ would give you the value $0$.

Note that case work is necessary when you're getting different values for the same function from the right hand side and left hand side of the given point about which you've got to check the limit.

• To make it clear. Because $|sinx|$ is always equal to $0$ from either sides, we can assume that $|sinx| = sinx$ ? – Segmentation Dec 14 '17 at 19:51
• Yes , precisely ! – Tanuj Dec 14 '17 at 19:55
• If my answer helped , could you accept it ? It would be helpful for other people visiting this question. – Tanuj Dec 14 '17 at 19:56
• $\frac{|sinx|}{sinx} \to -1\ for\ x \lt 0\ and\ \to +1\ for\ x\gt 0$ – herb steinberg Dec 14 '17 at 20:23
• @herbsteinberg that's what i am trying to say. I updated my question with more information aboout this. – Segmentation Dec 14 '17 at 20:29