# Discontinuous functions

## Homework Statement

I have to find f: R $$\rightarrow$$ R which is discontinuous at the points of the set {1/n : n a positive integer}$$\cup$$ {0} but continuous everywhere else.

Also find g: R $$\rightarrow$$ R which is discontinuous at the points of the set {1/n : n a positive integer}but continuous everywhere else.

## The Attempt at a Solution

Could I define f as f(x) = 1/(integer(x) -1) for x $$\in$$ [0,1) (where integer means round up to next integer), f(x) = x otherwise.

Similarly for g, can I say g(x) = 1/(integer(x) -1) for x $$\in$$ (0,1) (where integer means round up to next integer), g(x) = x otherwise.

I'm not too sure about these functions but cannot think of any more 'normal' ones that would satisfy the criteria.

Related Calculus and Beyond Homework Help News on Phys.org
CompuChip
Homework Helper
If you are looking for a 'normal' function, you probably want f(x) = 1/g(x), where g(x) has a zero at every integer n and at 0. In that case, I can think of a suitable g(x) off the top of my head.

By the way, note that restricting the domain to [0, 1) or (0, 1) does not define a function on R.

Can I say f(x) = 1/g(x) where:
g(x) = 0 if x is in (0,1)
g(x) = 1 otherwise

Well no, since then you are having it be discontinuous on (0,1). Perhaps try 1/g, where g is a step function with an appropriate argument so that you get 1/x back when x is of the form 1/n, but the left and right limits as you approach an x of this form are different fractions altogether.

I think I may be confused about what 'at the points of the set' means, does it just mean the end points, I thought it meant all points in the set?

So for {1/n: n a positive integer} U {0} could I say:
f(x) = -1, x<0
f(x) = -1/2, x=0
f(x) = 1/x, 0<x<1
f(x) = 2, x>1

For {1/n: n a positive integer} I could change this to:
f(x) = -1, x$$\leq$$0
f(x) = 1/x, 0<x<1
f(x) = 2, x>1