# How to tell if a function is differentiable or not

1. Feb 13, 2004

### Claire84

If f is a function defined by the fomula f(x)=xe^(modx), then show that f is differentiable at every point c, with
f'(c)=(mod(c) +1)e^(modx)

The hint that is given is 'consider separately the cases cgreater than 0, c less than 0 and c=0

To prove that f is differemtiable at every point c, do I have to have f as 2 seorate functions mmultiplied together, and if each of them is differentiable then does it mean that f is differentiable? I tried this and it was fimne fpr the function equal to x, but I couldn't work it out for the function equal to e^(modx) . Is there a better way of proving that it is differentiable?

Also, is there a reason why we have mod(c) inside the brakcets of f'(c) as opposed to just c?

2. Feb 13, 2004

### matt grime

hint, the definition of mod x is

mod(x) = x if x +ve
-x if x -ve

when x is not zero the function is then either xe^x or xe^{-x} and you should be able to state that that's clearly diffible.

The problem is at x=0

you need to find

lim h--->0 of he^{mod(h)}/h = e^{mod(h)}

as h goes to 0 from above AND below - that's the defintion of derivative.

clearly the limit is 1 in either case, so you can conclude it's diffible

now try and decide why the thing given is the derivative

other example: mod(x) is not diffible at 0 cos the left and right limits in the limit defining the derivative are -1 and 1 resp.

3. Feb 13, 2004

### Claire84

Okay my confusion came because I was working out the derivative of e^(modx) I used the definition of a derivative to work it out

f(c+h) - f(c) all divided by h as h tends to zero.

So I'd have e^(mod(c+h)) - e^(mod(c)) all divided by h

I didn't know where to go from here because I couldn't split the e^(mod(c+h)) up to make the expression simpler

4. Feb 13, 2004

### Claire84

Suddenly the penny is starting to drop here- thanks for your help! Gahhhh sometimes I can be so slow!

5. Feb 13, 2004

### matt grime

good, as long as you can see that anywhere away from zero, as h gets small, it must be that c and c+h are both the same sign, and you can remove the modulus entirely.

6. Feb 14, 2004

### Claire84

Hm got the first part of whast you're saying but the bit abaout why we need the c and c+h to be the same sign.......... not sure about that. Sorry, my kowledge of these things is a bit limited!

7. Feb 14, 2004

### HallsofIvy

"mod x" is x if x is positive, -x if x is negative. (That really puzzled me until matt grime defined it. I would say "absolute value".)

It helps a lot to know that both x and c+h are positive because that way emodc and emod(c+h)are just ec and ec+h. Similarly, if c and c+h are both negative emodc= e-c and ec+h= e-c-h. That means that you can ignore the "mod" part entirely.

The important point is that if c> 0 to begin with, since we are interested in the limit as h->0 we can assume that |h|< c/2 so, at worst, with h= -c/2 c+h= c-c/2= c/2> 0.

If c= 0, then c+h will be positive or negative depending on whether h is positive or negative and we have to consider both emodh= eh (when h is positive) and emodh= e-h (when h is negative).

8. Feb 14, 2004

### Claire84

Okay, I've just been looking at the questoion again and my problem is even how to get to this stage. Do I have to apply the product rule to xe^(modx) so I have to work through the full definition of the product rule? I'm using fg)'(c) = f'(c)g(c) + f(c)g'(c) , for the derivatives using the definiton of a derivative. I can't seem to get this down into the form they want. How am I supposed to be approaching this? I can see what you're saying is making a sense but it's just how to get to that bit. Do I need to use the product rule here? Just using the definiton of a derivative isn't enough, right?

9. Feb 14, 2004

### Claire84

Right, it's fine when c=0, but for the others I'm finding it hard to break it down. Right now this is hat I have, for c being greater than zero-

f'(c) = e^c + e^c ((e^(h) - 1) divided by h))c

Can you tell me where I go from here, or if I'm on the right track? Thanks aain for your help btw.

10. Feb 14, 2004

### Claire84

Oh hang on, just faffed about with some numbers on my calculator and is it true that e^h - 1 all divided by h tends to 1 as h tends to zero? Why is this? Sorry, it's late and brain is even more off than usual!

11. Feb 14, 2004

### matt grime

because (e^h-1)/h as h tends to zero is the derivative at 0....

away from zero you can just treat it as a derivative of ordinary functions.

so do it for x greater than zero and for x less than zero remembering how mod(x) is defined.

you will get a derivative for each case, the *best* way to write this is in the form they gave you

xe^x for x positive, its derivative is

xe^x+e^x by the product rule

for x negative

xe^{-x}, the derivative is

-xe^x +e^{-x}

remember -x=modx for x negative

so the answer can be encapsulated as

(mod)x)+1)e^mod(x)

do you really need to do it from first principles? the answer should state that the limits at 0 are the same from both sides, which you seem to have mastered.

12. Feb 15, 2004

### Claire84

Ah I get what's oing on now! I'm not sure whether we had to get it from first principles or not but I did it that way and it looks out and everything fits in fine. So thanks for your help!

13. Feb 15, 2004

### Claire84

But I thought that at c=0 we had this

lim h--->0 of he^{mod(h)}/h = e^{mod(h)}

as opposed to e^h - 1

14. Feb 15, 2004

### matt grime

you asked why {e^-1}/h went to 1 as h went to zero, that was why i put that in there.

15. Feb 15, 2004

### Claire84

Oh it's ok, I just didn't realize why it went to 1, like if there was some prooof. But I've just looked at my notes and we seem to be able to take it as being 1 without having to go any furhter.

16. Feb 15, 2004

### Claire84

Okay, Referring to a point that was made earlier, if we have e^ mod (h + c) can we have that if c is less an zero then h tends to zero from the positive side or vice versa? Because would the mod of this then be e^(-c + h). Or do we have them always both being the same sign because we'll always get the same value whether h is positive or negative here as it tends to zero?

17. Feb 15, 2004

### matt grime

I'm not sure i really understand this question.

for h sufficiently small, x+h will be negative for a negative x, so its modulus is -(x+h) irrespective of whether h is positive or negative. want to check? put x = -1 and h = 1/2 and -1/2 and see it all works out.

18. Feb 15, 2004

### Claire84

Okay, say we've got like for c less than zero

e^(-c) + ce^(-c)((e^)-h) -1 divided by h) this is when h is negative

What would happen if we had c less than zero but h positive?

Last edited: Feb 15, 2004
19. Feb 16, 2004

### matt grime

re-read my last post, or look here:

as long as h is sufficiently small (|h| < |c|/2,

c+h is negative, so its mod is -(c+h) irrespective of the sign of h.

as you are taking limits, and |c|/2 is not zero, you may assume |h| < |c|/2

20. Feb 16, 2004

### Claire84

It was just the h on the bottom line that was confusing me really since there's no modulus sign around it. Like when c is positive but h approaches zero from the negative direction.

21. Feb 16, 2004

### Claire84

Like in what I wrote, the bit where we have e^(-h) -l all divided by h, would this tend to -1 as h tended to zero? So then we would have e^(c) - ce^(c) this is when c is positive btw. So how does this work?

Or hang on, when we have e^(mod(h+c) earlier on, can we not split up this mod if h and c are different signs so we can't have e^(-c)e^(h) when c is negative and h is positive?

22. Feb 16, 2004

### matt grime

I'm sorry, I can't see where yuo are finding the derivative

at zero or not at zero. you must use different arguments at in each case

so 1. are you finding the derivative at c where c is not zero?

if yes, assume |h| < |c|/2 so that c and c+h have the same sign irrespecitve of whether h is positive or negative.

if this is negative

then you need to find the limit as h tends to zero of

((c+h)e^{-c-h}-ce^{-c})/h

if c and c+h are positive then the minus signs in the powers ALL become positive.

there is no need to worry about the sign of h. absolutely none, this is a none issue.

at the origin is the only time you need to consider anything different

case a, h is always -ve when the limit

you need is (he^(-h))/h = e^{-h}

case b, when h is positive

(he^h)/h = e^h

either limit is 1.

i don't see where the e^h -1 comes from

you only need to worry about the signs in the mod part, no where else!

i wouldn't advocate finding those limits from first principles, just state what the answers are.

I think you are making this way too complicated for yourself.

Last edited: Feb 16, 2004
23. Feb 16, 2004

### Claire84

So it's okay to make the assumtpion about mod h being less than mod (c/2)? Is that because h is tending to zero so is going to be so tiny?

What I've been getting at is like if you have c positive and h negative. It's not the power I'm getting at so much as opposed to the h on the bottom of e^-h) -1 all divided by h.

e^(-c) +c((e^(mod h+ modc)-e(c)) divided by h)

so you'd get e^(-c) -ce^c

but if h had been positive would you not have got this but with +ce^c at the end as opposed to the negative of this?

And yeah, I know I'm over-complicating it. This always happens in everything I do (really should get my head seen to.....). You've got to pity my poor Pure Maths lecturer who constantly gets his brain picked aboput evey little detail that he teaches!

24. Feb 16, 2004

### matt grime

yes h will onyl be important whe it's tiny.

the only point where you need to consider signs is in the exponent (the power) there are no other signs that change as there are no other moduli lying around.

you've also gone too far in manipulating the limits. you ain't going to prove anything from first principles really, all you do is appeal to that fact that for x negative, you limit is the same as finding the deivative as xe^{-x} and for x positive xe^x, and at zero the limit is trivally 1.

just spotted a mistake,

you say mod(c) + mod(h)

but that isn't what you want, that's not mod(c+h) which is what you do need

25. Feb 16, 2004

### Claire84

Okay, okay, I meant mod (c+h)!

So basically I vould take most of this from the product rule alone with the exception of when we have c=0 and a lot of what I've done is really unnecessary? I just wasn't sure what level to take the question to really.