# Thread: I need some examples

1. ## I need some examples

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

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

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

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

$\displaystyle 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\}$

$\displaystyle f(x)$ is continuous nowhere, and $\displaystyle g(x)$ is continuous only at $\displaystyle x=0$ and $\displaystyle 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. $\displaystyle 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 $\displaystyle [a,b]$; that function there is still defined on $\displaystyle (-\infty,\infty)$.

7. $\displaystyle 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
$\displaystyle 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 $\displaystyle c,d,e\in[a,b]$ such that $\displaystyle a<c<d<e<b$. Define a function:

$\displaystyle 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\}$

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