# What is the difference between $f(x)=\frac {\sqrt{\frac12(1-\cos(2x))}}{x}$ and $g(x)=\sqrt{2}\cdot\sqrt{\frac{1-\cos(2x)}{4x^2}}$?

What is the difference between these functions? $$f(x)= \frac {\sqrt{\frac12(1-\cos(2x))}}{x}\qquad g(x)=\sqrt{2} \cdot\sqrt{ \frac{1-\cos(2x)}{4x^{2} } }$$

Manipulating $$g(x)$$ to get $$f(x)$$:

\begin{align} g(x)&=\sqrt{2} \cdot\sqrt{ \frac{1-\cos(2x)}{4x^{2}}} \tag1\\[4pt] &=\sqrt{ \frac{(1-\cos(2x))}{2\cdot x^{2}}} \tag2\\[4pt] &=\sqrt{ \frac{\frac12(1-\cos(2x))}{x^{2}}} \tag3\\[4pt] &=f(x) \tag4 \end{align}

Yet, $$f(x)$$ and $$g(x)$$ have different graphs. I don't think I messed with the domain, so what is the mistake here? Since they have different graphs, they have different limits at $$x=0$$.

For graphs: https://www.desmos.com/calculator/t8cga1ayzw

$$f(x)$$ has $$x$$ in the denominator. So it includes both positive and negative values of $$x$$.

$$g(x)$$ has $$\sqrt{x^2} = |x|$$ (correction to be made here). This involves only positive values.

So, $$g(x)$$ is identical to $$f(x)$$ for $$x>0$$ and is the reflection of $$f(x)$$ about $$x$$ axis for $$x<0$$ as, $$|x| = \begin{cases}x &\text{for } x\ge0 \\ -x &\text{for } x<0 \end{cases}$$

They will have different signs at $$x<0$$.

Watch out their denominators. Note that $$\sqrt{x^2}=\left|x\right|$$ instead of merely $$x$$.

Hint:

For real $$y,$$

$$\sqrt{y^2}=|y|=\begin{cases} y &\mbox{if } y\ge0 \\ -y & \mbox{if } y<0 \end{cases}$$

It's $$\frac{|\sin{x}|}{x}-\frac{|\sin{x}|}{|x|},$$ which is $$0$$ for $$x>0$$ and $$\frac{2|\sin{x}|}{x}$$ for $$x<0$$.