1. ## examples needed

Hi y'all I was just wondering if anyone could help me out with some examples of the following:
a function f where two of the following conditions hold:
--f is continuous on [a,b],
--the interval [a,b] is closed,
--the interval [a,b] is bounded,
yet f is not bounded on [a,b].

a function f where two of the previous conditions hold and f IS bounded on [a,b].

a function f where $f\to \mathbb{R}" alt="f\to \mathbb{R}" /> with $D\subseteq \mathbb{R}$ closed and bounded which does not attain its maximum value in D.

Thanks in advance for any help!

2. Originally Posted by dannyboycurtis
Hi y'all I was just wondering if anyone could help me out with some examples of the following:
a function f where two of the following conditions hold:
--f is continuous on [a,b],
--the interval [a,b] is closed,
--the interval [a,b] is bounded,
yet f is not bounded on [a,b].

a function f where two of the previous conditions hold and f IS bounded on [a,b].

a function f where $f\to \mathbb{R}" alt="f\to \mathbb{R}" /> with $D\subseteq \mathbb{R}$ closed and bounded which does not attain its maximum value in D.

Thanks in advance for any help!
Well for the first one, it can't be a function in $\mathbb{R}$, because continuous functions on compact sets are bounded, so we have to be more adventurous.

Define a set $A=\{x\in\mathbb{Q}~|~2\leq x^2\leq3\}$ (This is basically the interval $[\sqrt{2},\sqrt{3}]$, but since we're in $\mathbb{Q}$, we have to be more careful when defining it.)

Then define the function $f:A\subset\mathbb{Q}\longrightarrow\mathbb{Q}$ given by $f(x)=\frac{1}{3-x^2}$

EDIT: Just noticed that only TWO of the conditions have to hold. In that case, take $f(x)=\frac{1}{x}$ on $(0,1]$.

--------

For the second one, the continuous function $fa,b)\subset\mathbb{R}\longrightarrow\mathbb{R}" alt="fa,b)\subset\mathbb{R}\longrightarrow\mathbb{R}" /> given by $f(x)=x$ will be bounded on $(a,b)$.

----------

$f=[0,2]\subset\mathbb{R}\longrightarrow\mathbb{R}" alt="f=[0,2]\subset\mathbb{R}\longrightarrow\mathbb{R}" /> given by:
$f(x)=\left\{\begin{array}{lr}x:&0\leq x<1\\0:&1\leq x\leq 2\end{array}\right\}$
$f$ has a $\sup$ in $D$, but no max.