Looking for a better counterexample

I'm supposed to find a counterexample to counter this claim

Suppose $f: X \mapsto Y$ is a continuous function. Suppose X is bounded then $f(x)$ is bounded. My counterexample is this:

Let $X = (-\pi/2, \pi/2)$. A is bounded by $B_{\pi/2}(0)$. Let $f(x) = \tan(x)$ and let $Y = \mathbb{R}$ and $\mathbb{R}$ is unbounded.

First of all, is my counterexample right? Second, is there simpler solution?

• You want "$\mathbb{R}$ is unbounded", but that's presumably a typo. – MathematicsStudent1122 Nov 15 '17 at 5:30
• To be pedantic: you really need that $\text{im} f$ is bounded, not that $Y$ is bounded. – gj255 Nov 15 '17 at 10:44

Your counterexample is right. My go-to solution for this is $X = (0, 1]$, $Y = [1, \infty)$ and $f(x) = 1/x$.

• Follow up: if A is bounded by B, does A have to be a proper subset of B? If A = B, is A still bounded? – user1691278 Nov 15 '17 at 5:41
• I don't understand the question. What are $A$ and $B$? When you say $A$ is bounded by $B$, do you mean $A \subseteq B$? – Theo Bendit Nov 15 '17 at 5:58
• Yes. Let $A = B = [1,2]$. Is A bounded by B? – user1691278 Nov 15 '17 at 6:02
• Oh I see; you're asking about some terminology. My best advice is to look where it was introduced. My instinct is that yes, $A$ is always "bounded" by itself, but it's up to the specific author to make that clearer. – Theo Bendit Nov 15 '17 at 6:04
• @user1691278 I think you should be careful to distinguish the codomain $Y$ from the range of $f$ (also known as the image of $f$, sometimes denoted $f[X]$ or just $f(X)$). For example if I said $X=[0,1]$ and $Y=\mathbb{R}$, and defined $f:X\to Y$ by $f(x)=x$, then $X$ is bounded and $Y$ is unbounded, but I would not have given a valid example because $f$ is not unbounded. The problem is that the range is smaller than the codomain in my example. So a detailed answer to your problem should be clear about this. (A function is called surjective or onto if the range is all of the codomain.) – Jeppe Stig Nielsen Nov 15 '17 at 10:36

Here is more:

$f(x) = 1/x +1/(x-1)$, $x \in (0,1).$

The trick is to choose an interval open, or half open.

Can you find a closed interval $[a,b]$, bounded, where $f$, continuos, is not bounded? :))

• To be (a bit) more precise: The trick is not to choose an open interval (or, more generally, set), but rather an interval that is not closed. – Muschkopp Nov 15 '17 at 9:41
• Thanks, hopefully a bit better now. – Peter Szilas Nov 15 '17 at 10:56