# Thread: Derivatives of Absolute Values?

1. ## Derivatives of Absolute Values?

Hi, I just have a problem with absolute values and derivatives. I'm not sure what to do, and combined with logs makes it a little more scary =P

Find the derivative.
y=log|1-x|

What should I do first? I know how to find derivatives (I have all the rules and stuff in my textbook), but it doesn't show me how to get rid of the absolute value signs, doesn't give me an example =/

2. First, try graphing the function. Always helps! Graph $\log(1-x)$ first, and then it will be easy to graph $\log|1-x|$ - just reflect the negative part of the graph about the x axis.

You will see that $\log|1-x|$ has a cusp because of the absolute value. The derivative doesn't exist there but it exists everywhere else the function is defined. To find the derivative where it exists note that

$|x| = x$ if $x\geq 0$
$|x| = -x$ if $x< 0$

so that $\log|1-x|$ is actually two functions :

$\log|1-x| = \log(1-x)$ if $1-x\geq0$
$\log|1-x| = \log(x-1)$ if $1-x<0$

then just find the derivative in those two cases like you would usually.

3. writing $x<0$ and not $x\le0$ is just a subtlety.

one actually should define $|x|$ for $x>0,\,x<0$ and $x=0.$

thus it should be $1-x>0.$

4. Originally Posted by Jiyongie
Hi, I just have a problem with absolute values and derivatives. I'm not sure what to do, and combined with logs makes it a little more scary =P

Find the derivative.
y=log|1-x|

What should I do first? I know how to find derivatives (I have all the rules and stuff in my textbook), but it doesn't show me how to get rid of the absolute value signs, doesn't give me an example =/
Maybee.....

Let (1-x)=u, then $\ln{y}=\frac{1}{\ln{10}}\cdot\ln{|u|}$

if u>0 then |u|=u and $\frac{dy}{dx}\Rightarrow\frac{y'}{y}=\frac{1}{\ln{ 10}}\cdot\frac{u'}{u}$

if u<0 then |u|=-u and $\frac{dy}{dx}\Rightarrow\frac{y'}{y}=\frac{1}{\ln{ 10}}\cdot\frac{-u'}{-u}=\frac{1}{\ln{10}}\cdot\frac{u'}{u}=$

therefore $\frac{dy}{dx}=\log{|1-x|}\cdot\frac{-1}{(\ln{10})(1-x)}$

5. Thanks everyone! I think I understand now..
So there will always be two answers for questions with absolute values?

6. Originally Posted by Jiyongie
Thanks everyone! I think I understand now..
So there will always be two answers for questions with absolute values?
Not always- that depends on the question! However, when the question is asking for the derivative, then it is true that the derivative of |x|, the answer is 1 if x> 0, -1 if x< 0, and there is no derivative if x= 0. So to that question, there are three answers!