0
$\begingroup$

I am working through my study guide for my calculus class for the test we're having tomorrow. There are two problems that I'm not completely sure about.

For each of the following statements, determine whether it is true or false and justify your answer.

  1. For any function $f:\left[0,1\right]\rightarrow\mathbb{R}$, its image $f\left(\left[0,1\right]\right)$ is an interval.
  2. For any continuous function $f:D\rightarrow\mathbb{R}$, its image $f\left(D\right)$ is an interval.

For the first one, I said:

False. Let $f(x)=\frac{1}{x-\frac{1}{2}}$, $f$ is not continuous at $x=\frac{1}{2}$, and thus the image is not an interval.

For the second one, I said:

False. If $D$ is not an interval.

For the first one, I am decently confident that my answer is correct. I would just like to know what you think, if it is sufficient enough.

However, for the second one, I don't know where to go for the second one. The professor would like an example, so maybe something like $D=(-\infty,0)\cup(0,\infty)$ and $f(x)=\frac{1}{x}$? Because, then the image of $f(D)$ would not include 0, and thus not be an interval. Would that work as an example?

  • 0
    What part are you uncertain of? Is $f(x)=1/x$ continuous on $D$? Is $F(D)$ an interval? If you know the answers are "yes" and "no", then you know you have a counterexample.2012-12-02
  • 0
    Your answer to the first question is wrong, though. $f$ is not defined at $1/2$, so you haven't given a function with domain $[0,1]$ as required.2012-12-02
  • 0
    What is $D$? If $D$ is connected, then so is $f(D)$, thus $f(D)$ will be an interval. If $D$ is not then you can find a counterexample2012-12-02
  • 0
    Well, the reason why the image of $\,\frac{1}{x - 0.5}\,$ is not an interval is...because it is not. Someone could argue that the function isn't continuous at $\,0.5\,$ doesn't look sufficient, yet mentioning that the function has a vertical assymptote at $\,x=0.5\,$ is. Now just define $\,f(0.5)=-346.3434\,$ and you\re done. Your answer to second question is correct yet you must give an example, and you found a rathr nice one.2012-12-02
  • 0
    @ChrisEagle Ok, since f is not defined at $f(0.5)$, what else could I use to find something that has an image which is not an interval, but still defined everywhere in $[0,1]$? Maybe it would have something to do with continuity, since the problem does not say "continuous function"?2012-12-02
  • 0
    @Alex: That's entirely the wrong question to ask. Don't abandon your example because of a minor flaw! The function isn't defined at $0.5$, so just define it there. Make sure your definition doesn't cause the image to become an interval, and you're done.2012-12-02
  • 0
    Nevermind, @DonAntonio answered the question I was asking! Thank you, so simply setting a random value for $f(0.5)$ is sufficient to define it there, but still not be continuous.2012-12-02
  • 0
    No, there's one value of $f(0.5)$ that will *not* work. Can you see why?2012-12-02
  • 0
    Well, my first thought would be $\infty$ (if I could set a function value to $\infty$...), but after looking closer at the function, as $x$ gets closer to 0.5 from the negative side, it approaches $-\infty$, and $\infty$ from the positive side. Wouldn't any value that I set create a discontinuity between the positive and negative sides?2012-12-02
  • 0
    I think it's more helpful to learn to find easiest examples. You have one for 2 (Stefan above gives you the technical reason why it works, or can work); but your example for 1 (which can be made ok) is much too difficult. Recall that a function is just any functional relation between 2 spaces. Try something constant first. Here, mapping 0 to 1, and all other x in (0, 1] to 0 is a very easy counter you'll instantly see works.2012-12-02

1 Answers 1

2

Here are some easy counterexamples:

  1. Define $$f(x) := \begin{cases} 0 & x \in \left[0,\frac{1}{2}\right] \\ 1 & x \in \left(\frac{1}{2},1 \right] \end{cases}$$ Then $f([0,1]) = \{0,1\}$ and this is obviously no interval.
  2. You already mentioned $g(x) := \frac{1}{x}$ for $x \in D:=(-\infty,0) \cup (0,\infty)$. That works. Another (maybe easier) one would be $$h(x) := x \qquad \qquad D=:[0,1] \cup [2,3]$$ Then $h(D)=[0,1] \cup [2,3]$ and this is -again- no interval (but $h$ is continuous).