# Examples of bounded/continuous sets and functions

• October 20th 2011, 04:49 AM
CourtneyMoon
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.
• October 20th 2011, 06:42 AM
Plato
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? :
$f(x) = x^2$ on $X = (-10,10]$

The range of your $f(x)$ is $[0,100]$
Does the range contain both if $\inf~\&~\sup~?$
Try $f(x)=-x^2$ on $(-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 $X=[1,2]$ and $f(x) = \left\{ {\begin{array}{*{20}c} {x,} & {rational} \\ {0,} & {irrational} \\ \end{array} } \right.$.
• October 20th 2011, 06:58 AM
CourtneyMoon
Re: Examples of bounded/continuous sets and functions
Quote:

Originally Posted by Plato
That will work.

The range of your $f(x)$ is $[0,100]$
Does the range contain both if $\inf~\&~\sup~?$
Try $f(x)=-x^2$ on $(-1,1).$

Let $X=[1,2]$ and $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] ?
• October 20th 2011, 07:20 AM
Plato
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 $X=(-1,1]$.
For now the range is $[-1,0]$ which contains the $\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?
• October 20th 2011, 07:22 AM
CourtneyMoon
Re: Examples of bounded/continuous sets and functions
Hmm okay, thank you.

Sorry I meant f(x)=|x| on X = [-10,10]
• October 20th 2011, 07:30 AM
Plato
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 $f(x)=|x|$ is continuous everywhere.
The function I suggested is continuous nowhere on $[1,2]$.