Calculus/Differentiation of absolute values
Expert: Paul Klarreich - 12/29/2006
QuestionThanks, I did all of that and I did it all right! Just one more thing, the piecewise funtion part, is this x+xsinx x>=0
-x+xsinx x<0
what I would right? I don't understand where the = part goes.
Angie
P.S. And if you want me to cite you then I will, I just needed to understand the problems.
-------------------------------------------
The text above is a follow-up to ...
-----Question-----
I understand this problem perfectly, but I have another one like it and I want to make sure I'm on the right track. Here it is:
sketch f(x)= |x| + xsin(x) in the following window
xmin=-2pi
xman= 2pi
ymin= -5
ymax= 10
This one has multiple questions, I'll give you the ones I got and the answers and the one I'm lost on too beause they are all related.
a. prove that f(x) is an even function.
Just plugged (-x) into the funtion and the result was the original function.
b. Is f(x) continuous at x=0? Explain.
I have yes because f(0) exists and the limit as x approaches 0 exists and both of these are equal.
c. does f'(0) exist? Explain using a piecewise function.
This I modeled of the earlier problem. I said it did not exist because the limits were different, -1 and 1. I found this using that method used in the other problem. For the piecewise, I'm a little lost, but I put this:
x+xsinx x>=0
-x+xsinx x<0
d. Use your calculator to find f'(0). Describe the procedure that you use and what the calculator says.
I put that I get error in domain because f(x) is nondifferentiable at x=0.
Thank you so much, your previous answer helped me out a lot! You are great at explaining problems!
Angie
-------------------------------------------
The text above is a follow-up to ...
-----Question-----
If f(x)= |x-3| + x^2, which of the following is true about f(x)?
a. the function is not continuous and not differentiable at x=3.
b. the function is not continuous but differentiable at x=3.
c. the function is continuous but not differentiable at x=3.
d. the funtion is continuous and differentiable at x=3.
e. f'(x) = 6.
I believe that this funtion is continutuous since the value of the limit at x=3 equals the function value at x=3. However, I can't figure out if it's differentiable or not. I know it has something to do with it's limits, but I'm lost beyond that. Thanks for the help!
Angie
-----Answer-----
Questioner: Angie
Category: Calculus
Subject: differentiation of absolute vaules
Question: If f(x)= |x-3| + x^2, which of the following is true about f(x)?
a. the function is not continuous and not differentiable at x=3.
b. the function is not continuous but differentiable at x=3.
c. the function is continuous but not differentiable at x=3.
d. the funtion is continuous and differentiable at x=3.
e. f'(x) = 6.
I believe that this function is continuous since the value of the limit at x=3 equals the function value at x=3. However, I can't figure out if it's differentiable or not. I know it has something to do with its limits, but I'm lost beyond that. Thanks for the help!
Angie
.....................................
Hi, Angie,
General clues about functions like this:
A. Absolute value of x, or of x-a, will have a 'sharp corner' at x=a. So it will be continuous but not differentiable at a.
B. Polynomials, like x^2, are always continuous and differentiable everywhere.
C. The sum of two continuous functions is continuous.
D. The sum of two differentiable functions is differentiable.
But if one of the two is not, then all bets are off and you have to look at the actual example. (Which we now proceed to do.)
Certainly your f(x), the sum of an abs() and a polynomial is continuous, but the abs() is not differentiable, so the f(x) is not differentiable.
Looks as if (c) is your answer.
Proof that f(x) is not differentiable at x = 3? Start with the definition of g(x) = | x - 3 |
g(x) = x - 3, when x >= 3
-x + 3, when x < 3
Then: f(x) = g(x) + x^2, and:
f(x) = x - 3 + x^2, when x >= 3
-x + 3 + x^2, when x < 3
WARNING: THE FOLLOWING DISCUSSION MAY CONTAIN FRACTIONS AND OTHER MATERIAL INAPPROPRIATE FOR CERTAIN COMPUTING SYSTEMS. VIEW IT IN A FIXED-SIZE FONT, SUCH AS COURIER.
Now we try for the derivative f'(3):
f(3 + h) - f(3)
f'(3) = lim ---------------
x->3 h
But the limit, as we will see, is different for h>0 and h<0.
First, assume h > 0:
f(3 + h) - f(3)
lim --------------- =
h->0 h
3 + h - 3 + (3+h)^2 - [0 + (3)^2]
lim --------------------------------- =
h->0 h
h + 9 + 6h + h^2 - 9
lim ------------------------ =
h->0 h
7h + h^2
lim ---------- =
h->0 h
lim (7 + h) = 7
h->0
Now, do it over, but assume h < 0: Now f(x) = -x+3 + x^2
f(3 + h) - f(3)
lim --------------- =
h->0 h
-(3 + h) + 3 + (3+h)^2 - [0 + (3)^2]
lim ----------------------------------- =
h->0 h
- 3 - h + 3 + (3+h)^2 - [0 + (3)^2]
lim ----------------------------------- =
h->0 h
- h + 9 + 6h + h^2 - 9
lim ------------------------ =
h->0 h
5h + h^2
lim ---------- =
h->0 h
lim (5 + h) = 5
h->0
Aha! Different answers. Since the left- and right-hand limits are not the same, the limit does not exist. f(x) is not differentiable at x = 3.
General clue about dealing with abs() functions:
Use the definition:
Abs(something) =
the something, if the something > 0
- (the something), if the something < 0, and make sure to use those parentheses.
-----Answer-----
Hi, Angie,
Someone who calls himself 'x' (one of your classmates, perhaps?) has already sent me this question. Here is my reply, along with my nasty comments, which, naturally, do not apply to you:
You can, if you like, look this up in the archived answers on this site, but here it is, anyway.
============ QUESTION AND ANSWER FROM X ============
Questioner: x
Category: Calculus
Subject: Derivatives of Absolute Value
Question: f(x)=abs(x)+ xsin(x)
Xmin=-2Pie Xmax=2Pie
Ymin=-5 Ymax-10
1. Prove that f(x) is an even function.
2. Is f(x) continuous at x=0? Explain.
3. Does f'(x) exist? Explain.
.........................................
Hi, x, (Is that really the name your parents gave you?)
For your function:
f(x) = abs(x) + x sin(x),
You can apply these definitions and rules:
f(x) is even if f(-x) is the same as f(x)
The sum of two even functions is even.
The sum of two continuous functions is continuous.
The sum of two differentiable functions is differentiable.
A. f(-x) = abs(-x) + (-x)(sin(-x))
Now abs(x) can be written many ways. One of them is:
abs(x) = sqrt(x^2)
[I am sure your precalculus teacher told you every day and twice on Tuesdays, that sqrt(x^2) was not just x.]
Then abs(-x) = sqrt( (-x)^2 ) = sqrt( x^2 ) = abs(x), and abs(x) is even.
Now sin(-x) = - sin(x), because sin(x) is an ODD function.
Back to :
f(-x) = abs(-x) + (-x)(sin(-x))
= abs(x) + (-x)(- sin(x))
= abs(x) + x sin(x)
= f(x)
proving f(x) is even.
B. abs(x) is continuous at x = 0. Another definition of abs(x) is rule-based:
abs(x) = | x, when x >= 0 [Rule R]
| -x, when x < 0 [Rule L]
Now abs(0) = 0, applying Rule R. What about limits?
lim abs(x) =
x->0+
lim x = 0, applying Rule R
x->0+
lim abs(x) =
x->0-
lim -x = 0, applying Rule L
x->0-
These limits are the same, so lim abs(x) = 0 = abs(0), making the function continuous.
Since x and sin x are also continuous at x = 0, so is f(x).
C. Now differentiability. Obviously the only 'issue' is what happens at x = 0?
[NOTE: see an earlier answer from me about DIFFERENTIATION OF ABSOLUTE VALUES.]
Assume g(x) = abs(x). What is g'(0)? Does it exist? Look at the left and right-hand limits.
Right-hand limit:
g(0 + h) - g(0)
lim --------------- =
x->0+ h
0 + h - 0
lim ----------- = [Using rule R]
x->0+ h
h
lim ---- =
x->0+ h
lim 1 = 1 as the right-hand limit.
x->0+
. . . . . . . . . .
Left-hand limit:
g(0 + h) - g(0)
lim --------------- =
x->0- h
-(0 + h) - 0
lim ------------ = [Using rule L]
x->0- h
-h
lim ---- =
x->0- h
lim -1 = -1 as the left-hand limit.
x->0-
Since these limits are not the same, the LIMIT does not exist, the derivative does not exist at x = 0, so your entire derivative f'(x) does not exist at x = 0. [No problem for any other x, of course.]
In the future, please provide a name. I am sure your fingers must have slipped when you entered the name part.
On the other hand, if you left out your name because that might reveal to your teacher that you got the answer from me, that is unethical, unless you cite this source when handing in the solution.
I leave it to you to judge which happened.
AnswerQuestioner: Angie
Category: Calculus
Subject: differentiation of absolute values
Question: Thanks, I did all of that and I did it all right! Just one more thing, the piecewise function part, is this
x+xsinx x>=0
-x+xsinx x<0
>> Yes, that's the idea. If abs() is part of a function, then the 'piecewise' nature of the definition applies to the whole thing.
what I would write? I don't understand where the = part goes.
>> I'm not sure what you're asking. You would write that:
f(x) = abs(x) + x sin x means:
f(x) = x + x sinx, when x >= 0
- x + x sinx, when x < 0
>> [Don't be afraid to write words and phrases in your mathematics. It makes it much more understandable, especially to yourself.]
Angie
P.S. And if you want me to cite you then I will, I just needed to understand the problems.
>> Well, that was intended for Mr. 'x', of course. Naturally, when you get help, it is always proper to acknowledge it.