Examples of bounded/continuous sets and functions

Give an example of a set X and a function f: X -> Real numbers such that:

1) f is continuous at 2 points but is discontinuous everywhere else on X.

I have put this:

f(x)=

x^2-x where x belongs to rationals

0 where x doesn't belong to rationals on X= real numbers

Is this right?

2) f is continuous on X and sup {f(x)|x belongs to X} belongs to {f(x)|x belongs to X} but inf{f(x)|x belongs to X} doesn't belong to {f(x)|x belongs to X}

Could this be a possible answer? :

f(x) = x^2 on X = (-10,10]

3) f is bounded on X but not continuous on X

I'm not sure what to put here.

Re: Examples of bounded/continuous sets and functions

Quote:

Originally Posted by

**CourtneyMoon** Give an example of a set X and a function f: X -> Real numbers such that:

1) f is continuous at 2 points but is discontinuous everywhere else on X.

I have put this:

f(x)=x^2-x where x belongs to rationals

0 where x doesn't belong to rationals on X= real numbers

That will work.

Quote:

Originally Posted by

**CourtneyMoon** Give an example of a set X and a function f: X -> Real numbers such that:

2) f is continuous on X and sup {f(x)|x belongs to X} belongs to {f(x)|x belongs to X} but inf{f(x)|x belongs to X} doesn't belong to {f(x)|x belongs to X}

Could this be a possible answer? :

$\displaystyle f(x) = x^2$ on $\displaystyle X = (-10,10]$

The range of your $\displaystyle f(x)$ is $\displaystyle [0,100]$

Does the range contain both if $\displaystyle \inf~\&~\sup~?$

Try $\displaystyle f(x)=-x^2$ on $\displaystyle (-1,1).$

Quote:

Originally Posted by

**CourtneyMoon** Give an example of a set X and a function f: X -> Real numbers such that:

3) f is bounded on X but not continuous on X

Let $\displaystyle X=[1,2]$ and $\displaystyle f(x) = \left\{ {\begin{array}{*{20}c} {x,} & {rational} \\ {0,} & {irrational} \\ \end{array} } \right.$.

Re: Examples of bounded/continuous sets and functions

Quote:

Originally Posted by

**Plato** That will work.

The range of your $\displaystyle f(x)$ is $\displaystyle [0,100]$

Does the range contain both if $\displaystyle \inf~\&~\sup~?$

Try $\displaystyle f(x)=-x^2$ on $\displaystyle (-1,1).$

Let $\displaystyle X=[1,2]$ and $\displaystyle f(x) = \left\{ {\begin{array}{*{20}c} {x,} & {rational} \\ {0,} & {irrational} \\ \end{array} } \right.$.

Okay thanks, would f(x)= -x^2 on X =(-1,1) (which you said) work on X=(-1,1] too?

For the f is bounded on X but not continuous on X could I possibly have this:

f(x)= mod x on X = [-10,10] ?

Re: Examples of bounded/continuous sets and functions

Quote:

Originally Posted by

**CourtneyMoon** Okay thanks, would f(x)= -x^2 on X =(-1,1) (which you said) work on X=(-1,1] too?

NO! It does not work for $\displaystyle X=(-1,1]$.

For now the range is $\displaystyle [-1,0]$ which contains the $\displaystyle \inf$.

Quote:

Originally Posted by

**CourtneyMoon** For the f is bounded on X but not continuous on X could I possibly have this: f(x)= mod x on X = [-10,10] ?

What does f(x)= mod x mean?

Re: Examples of bounded/continuous sets and functions

Hmm okay, thank you.

Sorry I meant f(x)=|x| on X = [-10,10]

Re: Examples of bounded/continuous sets and functions

Quote:

Originally Posted by

**CourtneyMoon** Hmm okay, thank you.

Sorry I meant f(x)=|x| on X = [-10,10]

NO again! The function $\displaystyle f(x)=|x|$ **is continuous everywhere.**

The function I suggested **is continuous nowhere **on $\displaystyle [1,2]$.