# Why is a function not differentiable at a point?

1. Mar 19, 2004

I'm only in high school, and I was wondering: Why are some functions not differentiable at certain points?

2. Mar 19, 2004

### mathman

"Why" is a funny question. They just are. For example x.sin(1/x) does not have a derivative at x=0, even though it is continuous. There are more ccomplicated examples, like continuous functions with derivatives nowhere.

3. Mar 19, 2004

I guess I can understand how a derivitave f'(x) could have undefined values like any other function... But the thing is, the derivitave, is (as I was thought in my math 31 class) the slope of a tangent line.

My question: How can there be no tangent line? Or, how can it have no slope?

In the example you gave, the original function was undefined, so that doesn't help me that much.

4. Mar 19, 2004

Consider the function y = |x|.

For x < 0, the slope is -1. For x > 0, the slope is 1. So what's the slope at 0?

Well, a slope of -1 would be tangent. But 1 would also be tangent. And so would 0! Right along with 1/2, -1/2, 1/4, .3225509809234, -.6548941623189435, etc. So which is it?

5. Mar 20, 2004

That helps. Thanks.

6. Mar 20, 2004

### Chen

What are continuous functions and how is y = |x| one?

7. Mar 20, 2004

A continuous function is one whose graph you can draw without having to lift your pencil.

More precisely, it is a function with domain D such that

$$\lim_{x \to x_0} f(x) = f(x_0)\qquad \forall x \in D$$

8. Mar 20, 2004

### Chen

So how can $$f(x) = x\sin (x^{-1})$$ be a continuous function? I must lift my pencil because it is not defined at $$x = 0$$, is it?

9. Mar 20, 2004

Actually, it is. It goes to 0 as x = 0.

The sin term is bounded by -1 and 1, but the x term goes to 0. 0 times -1 or 1 or anything inbetween is still 0.

10. Mar 20, 2004

### matt grime

It is continuous with the defintion of it as 0 at 0.

any if x_i is any sequence tending to zero then x_i*sin(1/x_i) tends to zero too (sandwich principle).

but taking pen off paper is not the definition of discontiuous:

(x^2 -2)^-1 is continuous when the domain is the rational numbers.

11. Mar 20, 2004

### Chen

Ok, thanks. For some reason in school when I asked about this the teacher said that continuous functions are functions whose derivative is defined for every x.

12. Mar 20, 2004

Why should we have to impose the value of 0 at x = 0 on xsin(1/x) in order to make it continuous? The limit still exists, and that's what determines the continuity, right?

13. Mar 20, 2004

### matt grime

The function as given is not defined at 0. I can define it to be anything I care about. You can either state the function is continuous which implies the value must be zero there, or you can define the value is zero and then conclude it is continuous. Personal preference as to which comes first in your opinion.

14. Mar 20, 2004

I'm not following you here.

"The function as given is not defined at 0. I can define it to be anything I care about."

and

"You can either state the function is continuous which implies the value must be zero there, or you can define the value is zero and then conclude it is continuous."

mean different things to me. The first sounds like I can define it to be whatever I want, like 5 for example, whereas the second seems to say it must be 0.

15. Mar 20, 2004

### matt grime

xsin(1/x) as given is not defined at zero. We can assign any value to it at the origin to make a complete function on the real line. The first time this came up it was stated that the function is continuous. That implicitly states that we chose the value zero there. Any other choice would lead to a discontinuous function. That's all.

16. Mar 20, 2004

### Chen

The way I see it, at x = 0 the function either has a value of zero, or it has an asymptote. But if that's the case then as x approaches zero the function needs to tend to infinity, right? But that can't be right, because as cookiem said the values of sine are limited to be between 1 and -1, so $$-x \leq f(x) \leq x$$ for every x, right? So if x is very small how can the function tend to infinity?

17. Mar 20, 2004

Hm... I must be dense because I'm still not following you.

Is

$$f(x) = \left\{ \begin{array}{11} 1 & x \neq 2 \\ 5 & x = 2 \end{array} \right.$$

continuous? Is it a fair analogy to our previous choice of function?

18. Mar 20, 2004

### matt grime

Two posts in 1.

the reason xsin(1/x) does not come with a value at zero is cos of the 1/x inside the sin.

the function you give cookiemonster is most definitely not a continuous function (assuming you're not doing something bizarre with the topology).

19. Mar 20, 2004

### Chen

Doesn't there have to be an asymptote wherever a function is not defined? I may well be wrong here because I never really studied advanced math...

20. Mar 20, 2004

I should read what I write more often. Geez, I'd already explained the whole thing to myself in one neat little equation.

Sorry for the trouble, matt.

21. Mar 20, 2004

### matt grime

All that is required is for there not to be a definition of the function at that point.

sin(1/x) is not trivially defined at zero unless we declare its value to be something specific; no assignment of a value makes it continuous at zero. The real valued function sqrt(x) is not defined for x negative, there are no sinuglarities in sight.

22. Mar 20, 2004

### HallsofIvy

No, that's not"what determines continuity". To be continuous at a point, a, a function must have 3 properties:
1) lim(x->a)f(x) exists
2) f(a) exists
3) lim(x->a)f(x)= f(a).

For example, if I define f(x)= x for x not equal to 1 and f(1)= 5,
the limit, as x approaches 1, exists (it is equal to 1) and the function is defined at x=1 (and has value 5) but the function is not continuous at x=1 because the two values are not the same.

Similarly, if I define f(x)= (x2-4)/(x-2), it is easy to see that the limit, as x approaches 2, exists and is equal to 4. This f is not continuous at 2 because f(2) does not exists (0/0 is undetermined).

Both of these are example of a "removable discontinuity" because we can make a continous function by redefining f at a single point. (In the first example, define f(1)= 1, in which case the function is exactly f(x)= x. In the second, define f(2)= 4 so the function is exactly f(x)= x+ 2.

23. Mar 20, 2004

Yeah, I kinda realized that when I read my own definition. Thanks for the effort, though.

You have to admit, it's pretty impressive that somebody can throw out the definition of something and then change it in their own mind for no apparent reason not five minutes later.

24. Mar 21, 2004

### HallsofIvy

Actually, "impressive" is not the word that springs to my mind.

25. Mar 21, 2004