# Thread: I need some examples

1. ## I need some examples

Is there a function which is defined on $\mathbb{R}$ but which is NOT continuous on ANY point of $\mathbb{R}$?

What about a function which is defined on $\mathbb{R}$ and is continuous at exactly TWO points of $\mathbb{R}$?

2. Originally Posted by binkypoo
Is there a function which is defined on $\mathbb{R}$ but which is NOT continuous on ANY point of $\mathbb{R}$?

What about a function which is defined on $\mathbb{R}$ and is continuous at exactly TWO points of $\mathbb{R}$?
$f(x)=\left\{\begin{array}{lr}1:&x\in\mathbb{Q}\\0: &x\notin\mathbb{Q}\end{array}\right\}$

$g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap (-\infty,1]\\x-2:&x\in\mathbb{Q}\cap(1,\infty)\\0:&x\notin\mathbb {Q}\end{array}\right\}$

$f(x)$ is continuous nowhere, and $g(x)$ is continuous only at $x=0$ and $x=2$.

3. what about a function f defined on an interval [a,b] which is continuous at 2 points of [a,b]?

4. Use the exact same function; just restrict the domain.

5. $g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap (-\infty,1]\\x-b:&x\in\mathbb{Q}\cap(1,\infty)\\a:&x\notin\mathbb {Q}\end{array}\right\}
$

would this work>?

6. It needs to be defined on $[a,b]$; that function there is still defined on $(-\infty,\infty)$.

7. $g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap[a,a+\delta]\\x-b:&x\in\mathbb{Q}\cap[a+\delta,b]\\a:&x\notin\mathbb{Q}\end{array}\right\}
$

I'm shooting in the dark here, not too sure

8. Originally Posted by binkypoo
$g(x)=\left\{\begin{array}{lr}x:&x\in\mathbb{Q}\cap[a,a+\delta]\\x-b:&x\in\mathbb{Q}\cap[a+\delta,b]\\a:&x\notin\mathbb{Q}\end{array}\right\}
$

I'm shooting in the dark here, not too sure
Take any three constants $c,d,e\in[a,b]$ such that $a. Define a function:

$g(x)=\left\{\begin{array}{lr}x-c:&x\in\mathbb{Q}\cap[a,d]\\x-e:&x\in\mathbb{Q}\cap(d,b]\\0:&x\notin\mathbb{Q}\end{array}\right\}$

$g$ will be continuous at $x=c$ and $x=e$.