# How do you differentiate -|t|?

How do you differentiate $-|t|$? Using Wolframalpha it says to re-write $-|t|$ as ($-\sqrt{t^2}$). Why? (This is part of a bigger question, that being to calculate the differential of $e^{-|t|/T}$ ).

How do you differentiate −|t|?

If $t\gt0$, you differentiate $-t$ (easy). If $t\lt0$, you differentiate $t$ (easy). If $t=0$, you don't (differentiate), since the function is not (differentiable).

Absolute values are notoriously messy to work with, since they by definition force you to split into cases. On the other hand $\sqrt{t^2}$ doesn't, so in that respect it's easier to work with. That is why they suggest the change. Once you've worked through the differentiation, though, feel free to swap back, as the absolute value signs are easier to read.

You differentiate $\sqrt{t^2}$ with the chain rule, like any other composite function. The answer is $$\left[\sqrt{t^2}\right]' = \frac{1}{2\sqrt{t^2}}\cdot 2t = \frac{t}{\sqrt{t^2}} = \frac{t}{|t|}$$ which is a function that is undefined for $t = 0$, for $t < 0$ it is $-1$ and for $t > 0$ it is $+1$.

• This does not address the differentiability at $0$.
– Did
Commented Sep 15, 2016 at 6:44

$f(t)=-|t|$ is continuous $\forall t\in\mathbb R$ and differentiable on $\mathbb R-\{0\}$. You need to restrict your domain in order to avoid the singularity at $0$ if you want to differentiate $f$.

$$-|t|=\left\{\begin{array}{cc}-t & \text{ if }t\geq0\\ t&\text{ if }t<0\end{array}\right..$$