Find the domain and graph: $$f(t)=\frac{-t}{|t|}$$
My book says to define it piecewise.
My questions:
$\mathbf{1)}$ Do all rational functions have to be defined piecewise, or just this one because there is an absolute value in the denominator, and the absolute value is always defined piecewise?
$\mathbf{2)}$ Are all rational functions defined piecewise in order to avoid having a denominator be equal to zero, is that the general reason for defining anything piecewise, to avoid having division by zero? (so then this would mean that the domain of a rational function is always defined piecewise, or only when we need to avoid having denominator be $=0$?)
This is how my book defines $f(t)$ piecewise:
If $t>0$, then $|t|$ is $t$ since $t$ is already positive.
For $t>0$, simplify $$f(t)=\frac{-t}{|t|} = \frac{-t}{t}=-1$$
If $t<0$, then $|t|$ is $-t$ since $t$ is negative.
For $t<0$, simplify $$f(t)=\frac{-t}{-|t|} = \frac{-t}{-t}=1$$
(or for the last part, should the negative be inside the absolute value sign for $t<0$, as in $|-t|$ instead of $-|t|$?)
So we define it piecewise to avoid having $0$ in the denominator? Because isn't absolute value defined at $0$, the absolute value is continuous everywhere, and thus defined at $0$?
I'm confused about defining things piecewise, and how to know when to apply a piecewise attempt in order to define a function's domain.
Also, I'm confused about the second part of this, where $t<0$ for $|t|$. How is it that here, $|t|$ is $-t$ if absolute value is always positive?
Maybe I'm not understanding the absolute value concept correctly, because in grade school it has always been drilled into my head that |absolute value| just "turns things positive", so here I don't really understand how it can be negative.
I understand how the domain is $(-\infty,0)\cup(0,\infty)$, because by using open intervals we're not letting it be exactly $=0$, but I'm confused about the whole piecewise thing.
The absolute value is defined at $0$ with value $0$. It is nicely continuous. The reason your function is not defined at $0$ is because you can't divide by zero. If your function were $g(t)=\frac {-t}t$ with no absolute value you still would not have $0$ in the domain.