# Differentiation of abs(x)

1. Aug 30, 2008

### ghostanime2001

how do you differentiate these equations:

f(x) =
x^2 x < 3
x + 6 x >= 3

2. f(x) = abs(3x^2 - 6)

3. f(x) = abs(abs(x) - 1)

2. Aug 30, 2008

### chaoseverlasting

You can rewrite the functions by splitting their domains. Assuming these functions have no restrictions imposed on them, by definition, when their values are negative, they will be multiplied by -1 and will be unaltered for positive values (the abs function). You can find out on what domain the function will have negative values and then multiply it by -1.

3. Aug 30, 2008

### Gib Z

Welcome to PF, ghostanime2001. As you should have read before you signed up for the site, this is first of all, not the correct forum for homework help, and that even if it were, we could not offer you help as you have not shown us a reasonable attempt at the problem - we are here to help, but not to give you the solutions. I will contact one of the mods to move this thread to the homework section for you, and in the mean time you can post up your try.

EDIT: Well, a bit too slow.

4. Aug 30, 2008

### quark1005

You just go back to the definition of $$abs[(f(x)]$$

$$abs[f(x)] = f(x) \forall f(x) \geq 0$$
$$abs[f(x)] = -f(x) \forall f(x) < 0$$

And differentiate separately.

In other words, 'splitting the domains', as someone above said.

5. Aug 30, 2008

### ghostanime2001

My answer is nearly correct with a few minor errors i cannot quite explain correctly. This is what my worksheet says:

$$f(x)=\left\{\begin{array}{cc}x^2,&\mbox{ if } x<3\\x+6, & \mbox{ if } x\geq 3\end{array}\right$$

That was the question in LaTex to make it clear and i differentiated each domain seperately correctly but the sign of the intervals didnt change when i solved it. In my answer sheet the signs of the interval changed. To show you in LaTeX:

$$f'(x) =\left\{\begin{array}{cc}2x,&\mbox{ if } x<3\\1, & \mbox{ if } x>3\end{array}\right$$

Why did the sign in $$f(x)$$ 2nd interval go from $$x\geq 3$$ to

$$x>3$$

after it got differentiated ? How and Why did the interval sign get changed ?

Last edited: Aug 30, 2008
6. Aug 30, 2008

### Redbelly98

Staff Emeritus
Think about what the derivative is at x=3.

It has to do with the definition of the derivative, and the concept of limits.

7. Aug 30, 2008

### ghostanime2001

Is it because in $$f(x)$$ 3 is the solution of the second part of the domain and not the solution for the first half of the domain ? So i have to see what happens as x-->3 (the concept of limits) Is that correct ? :S

8. Aug 30, 2008

### Redbelly98

Staff Emeritus
Yes. What is

lim[h-->0] of

[f(3+h) - f(3)] / h

9. Aug 30, 2008

### ghostanime2001

$$\lim_{h \to 0} f(x) = \frac{f(3+h) - f(3)}{h} = \frac{[(3+h)+6] - 9}{h} = \frac{[3+h+6]-9}{h} = \frac{3+h+6-9}{h} = \frac{h}{h} = 1$$

????????????????????? Is this correct im not very sure :S

Last edited: Aug 30, 2008
10. Aug 31, 2008

### HallsofIvy

Staff Emeritus
f(3+ h) is NOT (3+h)+ 6. That is only true for x>= 3.
What you give is
$$\lim_{h\rightarrow 0^+}\frac{f(3+h)- f(3)}{h}$$
What is
$$\lim_{h\rightarrow 0^-}\frac{f(3+h)- f(3)}{h}$$

Last edited: Aug 31, 2008
11. Aug 31, 2008

### Redbelly98

Staff Emeritus
Halls is right. What happens when h is negative?

12. Aug 31, 2008

### ghostanime2001

okay im having alot of trouble right now. How did $$x\geq3$$ get changed to
$$x>3$$

Thats pretty much my question.

13. Aug 31, 2008

### Redbelly98

Staff Emeritus
The solution is telling you that derivitive expression [ f'(x)=1 ] is not valid at x=3.

Try evaluating, for h = -0.01:
[f(3+h) - f(3)]/h

The answer is not even close to 1.

14. Aug 31, 2008

### HallsofIvy

Staff Emeritus
Remember the definition of limit?

"$\lim_{x\rightarrow a} f(x)= L$ if and only if, for any $\epsilon> 0$ there exist $\delta> 0$ such that if $0< |x- a|< \delta$ then $|f(x)- L|< \epsilon$."

Notice that "$0< |x- a|$"? That means that what happens at x= a is irrelevant to the limit. That mean, in turn, that in the definition of derivative what happens when h= 0 is irrelevant.

By the way, the "$x\rightarrow 3^-$" and "$x\rightarrow 3^+$" were errors. I forgot that we were specifically talking about the derivative and not just a limit at x= 3. I corrected that after I read Redbelly98's comment.

15. Aug 31, 2008

### ghostanime2001

still unclear :( I'm trying my best to understand but my brain is getting fried -_-'

16. Aug 31, 2008

### ghostanime2001

$$f(x)=\left\{\begin{array}{cc}x^2,&\mbox{ if } x<3\\x+6, & \mbox{ if } \overbrace{x\geq 3}\end{array}\right$$

I want to know exactly why and HOW (Algebraically) $$\overbrace{x\geq3}$$ has changed into $$\overbrace{x>3}$$

$$f'(x)=\left\{\begin{array}{cc}2x,&\mbox{ if } x<3\\1, & \mbox{ if } \overbrace{x>3}\end{array}\right$$

17. Aug 31, 2008

### Redbelly98

Staff Emeritus
The derivative is a limit, by definition.

There are right-hand limits, where the parameter is approached from values greater than it.

And there are left-hand limits, where the parameter is approached from values less than it.

(If you're confused by this, review left-hand and right-hand limits in your textbook or class notes.)

The left- and right-hand limits must both exist, and agree with each other, for "the limit" to exist.

By not including x=3 in the solution, that tells us the limit (that defines the derivative, f'(x)) does not exist for x=3.

It has to do with the right-handed and left-handed limits at x=3. I.e., either one of them doesn't exist, or they don't agree with each other.

18. Sep 1, 2008

### ghostanime2001

$$$\lim_{x \to 3^+} f(x) = 3 + 6 = 9$ $\lim_{x \to 3^-} f(x) = (3)^2 = 9$ $\lim_{x \to 3^+} f(x) = \lim_{x \to 3^-} f(x) = 9$ $\lim_{x \to 3} f(x) = 9$$$

It looks like they do agree. So then why did the sign from $$x\geq3$$ get changed into $$x>3$$. 3 was part of the solution but then after differentiating it it is not part of the solution ? that does not make sense to me neither does it explain whats going on. The right and left limits equal 9 that means at x=3 there is a point which makes the f(x) continuous but not necessarily smooth and continuous.

19. Sep 1, 2008

### HallsofIvy

Staff Emeritus
What you have shown is that the function is continuous at x= 3. The problem, however, asked about the derivative.

$$\lim_{h\rightarrow 0^-}\frac{f(3+h)- f(3)}{h}= \lim_{h\rightarrow 0}\frac{(3+h)^2- 9}{h}= \lim_{h\rightarrow 0}\frac{6h+ h^2}{h}= \lim_{h\rightarrow 0}6+ h= 6$$

$$\lim_{h\rightarrow 0^+}\frac{f(3+h)- f(3)}{h}= \lim_{h\rightarrow 0}\frac{(3+h+6)- 9}{h}= \lim_{h\rightarrow 0}\frac{h}{h}= 1$$

Since those two are not the same the limit itself does not exist and the function is not differentiable at x= 3.

Notice that if you differentiate the two parts separately you get, as you showed before
$$f'(x)=\left\{\begin{array}{cc}2x,&\mbox{ if }x<3\\1, & \mbox{ if } {x>3}\end{array}\right$$

At x= 3, 2x becomes 6 while the other has a limit of 1: exactly the one sided limits above. While the derivative of a function does not have to be continuous, it does satisfy the "intermediate value property": if the two parts of the derivative do not give the same limit, the derivative cannot exist there.

Last edited: Sep 3, 2008
20. Sep 1, 2008

### ghostanime2001

It still doesnt explain why the sign got changed ! I wanna know HOW and if so, how did it get changed algebraically :( I already know what u said HillofIvy. I already proved the derivative but how does the SIGN GET CHANGED !!! :(:(:( ive been working on this for days and I still cant understand WHY.

Last edited: Sep 1, 2008