Why $f(x)=|\sin{x}-1|=1-\sin{x}$? What if $\sin{x}-1$ is zero?

92 Views Asked by At

$g(x)=|\sin{x}-1|+|3-\cos{x}-\sin{x}|+2\sin{x}$

Answer: Above equality is simplified to $$1-\sin{x}+3-\cos{x}-\sin{x}+2\sin{x}=4-\cos{x}$$

$$-1 \le\sin{x}\le1$$

So , I know that $f(x)=|\sin{x}-1|$ will be equal to $1-\sin{x}$ when $-1 \le\sin{x}\lt1$.

But what if $\sin{x}$ is exactly $1$, then wouldn't the expression be $\sin{x}-1$?

I always considered $|x|=x$, whenever $x$ is equal to or greater than $0$.

3

There are 3 best solutions below

0
On

$\vert \sin x - 1 \vert = \vert 1 - \sin x \vert, \; \forall x \in \Bbb R; \tag 1$

since

$1 - \sin x \ge 0, \; \forall x \in \Bbb R, \tag 2$

$\vert \sin x - 1 \vert = \vert 1 - \sin x \vert = 1 - \sin x, \; \forall x \in \Bbb R. \tag 3$

3
On

Usually, we hear that $x=|x|$ is $x$ is "positive" and $x=-|x|$ if $x$ is "negative," and often the case of $x=0$ isn't really discussed. In fact, as

$$|0|=0=-0,$$

we can include $0$ in either case above. In particular, we can say the following:

If $x\leq 0$, then $|x|=-x$.

As $\sin x\leq 1$, we know $\sin x - 1 \leq 0$, so...

0
On

Yes, usually, the absolute value is defined as (see Wikipedia): $$|x|=\begin{cases}\ \ \ x,\ x\ge 0\\ -x,\ x<0\end{cases}$$ However, it can be adjusted (see the opening paragraph in the above article): $$|x|=\begin{cases}\ \ \ x,\ x>0\\ -x,\ x<0 \\ \ \ \ 0, \ x=0\end{cases}$$ So, using the adjusted form: $$|\sin x-1|=\begin{cases}\ \ \ \ \sin x-1,\ \ \sin x-1>0\\ -(\sin x-1),\ \sin x-1<0 \\ \ \qquad \qquad \ 0, \ \ \sin x-1=0\end{cases} = \\ \begin{cases}\ \ \ \ \ \ \ \ \sin x-1,\ \ \sin x-1\not>0 \ (\emptyset)\\ \qquad \ 1-\sin x,\ \sin x-1<0 \\ \ 0=1-\sin x, \ \ \sin x-1=0\end{cases} = 1-\sin x, \sin x-1\le 0. $$