0

I have the following function: $$|\sin{x}|\cdot sgn{x}$$ where $$ -\pi<x<\pi$$

I have a few questions. Is $ |\sin{x}|$ the same as $\sin{x}$ for $ -\pi<x<\pi$? I am asking this because when I entered both functions on a plotter (Desmos), the functions overlapped completely for $ -\pi<x<\pi$. If yes, it would be much easier as I would have to test only for $x=0$. If no, can someone please help me how to decompose the function into simpler terms, because we're dealing with absolute values and the sign function?

john doe
  • 893
  • 2
    $sin x$ is negative for values between $-\pi < x < 0$, and positive for the remaining range. As such, you function including the absolute value and sign really just represent the standard $sin(x)$ function. – Petrus1904 Jan 05 '21 at 17:43

1 Answers1

1

For every $x\in\mathbb{R}$, $x\neq 0$, you have $$ x=\frac{x}{|x|}\cdot |x|. $$ Therefore if you define the sign function as $\mathrm{sign}(x):=x/|x|$ if $x\neq 0$, and whatever you prefer for $x=0$, e.g., $\mathrm{sign}(0)=1/2$, you always have that $x=|x|\cdot\mathrm{sign}(x)$. In particular, $$ \sin(x)=|\sin(x)|\cdot \mathrm{sign}(\sin(x))\, . $$ After that, if $g$ is any other function that has the same sign of $\sin(x)$, you get $$ \sin(x)=|\sin(x)|\cdot \mathrm{sign}(\sin(x))=|\sin(x)|\cdot \mathrm{sign}(g(x)). $$ For example, $\sin(x)$ and $x$ have the same sign in the interval you are considering. Hence, $$\sin(x)=|\sin(x)|\cdot \mathrm{sign}(x).$$ Hope this helps.

Kosh
  • 1,490