# (Spivak) - a function with strange behaviour.

Poll closed Apr 19, 2004.
1. ### Yes

1 vote(s)
100.0%

0 vote(s)
0.0%
1. Apr 12, 2004

### kioria

1) Find a function, $$f(x)$$ which is discontinuous at $$1, \frac{1}{2}, \frac{1}{3}, \frac{1}{4} ...$$, but continuous at any other points.

Solution (I have come across, probably wrong and a half):
f(x) = { 1 for all real x; 0 for 1/x where x is natural numbers.

Can any one tell me the answer to this?

Last edited: Apr 12, 2004
2. Apr 12, 2004

### ReyChiquito

The function you have founded have indeed that property, there is an infinite set of functions that can do the job...

3. Apr 12, 2004

### kioria

Excellent! Thank you.

4. Apr 13, 2004

### Nexus[Free-DC]

Does the function need to be defined everywhere? If not, you can construct an elegant solution as follows:

$$f(x)=\frac{(x-1)(x-1/2)(x-1/3)...}{(x-1)(x-1/2)(x-1/3)...}$$

This function is equal to 1 except at the points $$\frac{1}{n}$$, where it is undefined.

5. Apr 13, 2004

### matt grime

Part of the definition of a function is its domain, and it needs to be defined on its domain.

If you mean, say, is 1/x a function from R to R? No: you've not defined what it is at zero, until you do it is at best a function from R\{0} to R.

This is a big problem that is not taught properly when it first arises and causes many unnecessary problems.

The one you gave has the nice property that one may define f at the points in question so that it is 1, and is continuous at all those points.

6. Apr 16, 2004

### Gokul43201

Staff Emeritus
discontinuity

see attachment for a family of solutions

#### Attached Files:

• ###### continuity.doc
File size:
14 KB
Views:
56
7. Apr 17, 2004

### kioria

Thanks for all the help :)

8. Apr 17, 2004

### kuengb

Kioria, I just want to add that the function you gave is also discontinuous at x=0, not only at x=1/n. But you can change it like this to kill that bug:

f(x) = { 0 for all real x; x for x=1/n , n any natural number

9. Apr 17, 2004

### matt grime

If you're going to get picky then the original definition doesn't define a function.

10. Jun 19, 2004

### kioria

Interesting. Good stuff.

11. Jun 19, 2004

### fourier jr

The Gauss Transformation is a function that is like that. It looks like this:

G(x) = 1/x + [ 1/x ] for x in the interval (0,1]
G(x) = 0 @ x=0

[] means floor, aka least integer function.

Last edited: Jun 19, 2004
12. Jun 25, 2004

### stefanfuglsang

Another suggestion

$$\Gamma( \frac {-1}{x} ), for x > 0$$