# Determining continuity of a function

1. Nov 21, 2012

### sitia

1. The problem statement, all variables and given/known data

Hi everyone,
I'm kind of struggling with determining continuity of functions.

2. Relevant equations

3. The attempt at a solution
For example, f(x)=|x-1| I know is continuous on ℝ but how do I show this clearly. I my head, I just think that the function is valid for any value of x and so it is continuous. However, I'm not sure of a way to show my work for that.

But how do I determine continuity for the following?

f(x) = {x^2sin(1/x) if x≠0 and 0 if x=0

Thanks for any help!

2. Nov 21, 2012

### LCKurtz

Generally speaking on these types of problems, you can use the continuity theorems for most values of x. For example sums, products, quotients, and compositions of continuous functions are continuous. That takes care of every value of x except x = 0 in your second example. To finish it you just have to show it is continuous at 0. So show$$\lim_{x\rightarrow 0}x^2\sin{\frac 1 x}=0$$which is the value of f(0). Your first problem is similar with the problem point being x=1.

3. Nov 21, 2012

### sitia

Why is x=1 a problem point? Cant we have a equal to 0 for f(x)?

4. Nov 21, 2012

### haruspex

Merely being able to assign a value for every x doesn't make f(x) continuous. Continuity at x=x0 means, crudely, that, for values of x nearby x0, f(x) is guaranteed to be close to f(x0).
Consider the function f(x) = sin(1/x) for x ≠ 0, f(0) = α.
Note that this cannot be continuous no matter how you choose α. No matter how close you get to 0 the value of the function continues to oscillate between 1 and -1. But for g(x) = x2 sin(1/x) (x≠0) we can choose to define g(0)=0 and find that it is now continuous.
For the function |x-1|, x = 1 is only a problem point in the sense that the proof of continuity there will be different from the proof at other points of the line.

5. Nov 22, 2012

### HallsofIvy

Staff Emeritus
Then your basic problem is that you don't know what "continuous" means! I think you will find it impossible to prove "continuous" if you do not know the precise definition of "continuous".

It does NOT mean "the function is valid for any value of x"- that's only a part of the definition. "f is continuous at x= a" means rather that
1) The function is defined at the point ("valid" in your terms)
2) The limit, $\lim_{x\to a} f(x)$ exist
3) They are equal: $\lim_{x\to a} f(x)= f(z)$

Since the last certainly implies that the two sides of the equation exist, it is sufficient to just think of the third condition.

Now, LCKurtz says that the "problem point" is x= 1 because for x> 1, |x- 1|= x- 1 which is very easy and for x< 1, |x- 1|= 1- x which is also very easy. For x= 1, you would need to to look at both x< 1 and x> 1 and so need to look at the "one-sided limits".

$\lim_{x\to 1^+}|x- 1|= \lim_{x\to 1} x- 1$ and $\lim_{x\to 1^-}|x- 1|= \lim_{x\to 1} 1- x$. What are those two one-sided limits? Are they the same (so that the limit itself exist)? If they are the same is that limit the same as the value of the function at x= 1?