4

I am refreshing my Calculus memory, and bump into this example (need feedback):

$$f(x)= \begin{cases} -x, & \text{if } x < 0 \\ x, & \text{if } 0 \le x < 1 \\ 1 + x, & \text{if } x \ge 1 \end{cases}$$

I have to find the limits / state if it does not exist. Correct me if I am wrong:

  • $\lim_{x \rightarrow 0} f(x)$ does not exist

  • $\lim_{x \rightarrow 1} f(x)$ does not exist

  • $f(1) = 2$

  • $\lim_{x \rightarrow 1^{+}} f(x) = 2$

Are my answers correct?

This is the plot plot

user
  • 154,566
  • 3
    First one is wrong, the others are correct. Can you explain your reasoning behind the first conclusion? – ultralegend5385 Aug 30 '22 at 04:27
  • I plot the image and the graph of $-x$ has a gap to $x=0$ and I thought by using limit from left and right, it does not exist. – Freya the Goddess Aug 30 '22 at 06:57
  • 6
    The plot must be incorrect. Posting the plot would improve the question. – robjohn Aug 30 '22 at 07:25
  • I post the plot above – Freya the Goddess Aug 30 '22 at 12:28
  • 1
    The plot should not have a gap. What is $f(-0.1)$? – aschepler Aug 30 '22 at 12:36
  • I am using Julia to plot it and use ylims and xlims for each plot of the function. f(-0.1) = 0.1 – Freya the Goddess Aug 30 '22 at 12:39
  • 2
    @FreyatheGoddess The graph doesn't correspond to the definition for $f(x)$. – user Aug 30 '22 at 12:44
  • I think the -x graph is wrong since it should have no gap. I wrongly thought it has no limit before. – Freya the Goddess Aug 30 '22 at 13:39
  • @FreyatheGoddess in your code for plotting, you likely are not plotting the first part of f(x) for x=0. I know technically the first part does not mathematically belong to x=0, but as all plots are just small amount of straight lines on screen, when you plot piecewise functions, make sure you include values of x for corner cases in both sides of x. – Ander Biguri Aug 30 '22 at 15:14
  • Hi all. Guys and Girls here.. this is my thought on the gap. $f(x) = -x$ and on the condition for it is $x < 0$ that is why it should have a gap / hole. Based on substituting to the function we get the same value for the left-hand and right-hand limit. But, I am still confused on $f(x) = -x$ , if $x <0$ that does not include 0 so it should be a hollow point there for $-x$ graph. – Freya the Goddess Sep 01 '22 at 05:46

4 Answers4

6

The limit of $f$ for $x \to 0$ exists and is $0$. Your other answers are correct.

Wang YeFei
  • 6,390
  • 1
    I don't see why this was downvoted. It may not contain everything that the other answer does, but it is not wrong. – robjohn Aug 30 '22 at 07:23
  • Yeah — was confused as well — its pointing out the same mistake by op – Annika Aug 30 '22 at 09:30
  • 1
    I am not downvoted it, too many pessimistic I guess on this forum. Not everyone has learned like those who downvoted. No one is smarter, only learn sooner. That's all – Freya the Goddess Aug 30 '22 at 12:40
  • @robjohn I didn't downvote, but you have enough points that you know "not factually correct" isn't the only reason people do so. This answer in particular could be improved by showing why 0 is correct and attempting to address the mistake that led to the incorrect answer. – TheRubberDuck Aug 30 '22 at 13:32
  • @TheRubberDuck: your comment, "This answer in particular could be improved by showing why 0 is correct and attempting to address the mistake that led to the incorrect answer", at least, is better feedback than a downvote. The question asked which statements were correct, and since there was no explanation of the first statement, it is hard to know what the error was. Later answers do provide justification that the limit exists, but the problem seems to have been in the plotting software. As I suggested, the added plot improves the question quite a bit. – robjohn Aug 30 '22 at 15:21
  • Actually, the question, before the plot, could have been considered a collection of 4 PSQs, and probably shouldn't have been answered until after it had been improved. – robjohn Aug 30 '22 at 15:25
  • Mathematics becomes the most beautiful science is because of the process of proving the theorems and so on. StackExchange creates the downvote to take data to be processed to become knowledge. I personally think that downvoting just because we "think" we are smarter is not a wise thing to do, some are lucky have facility and able to learn comfortably, while some can't / have to be farmers, feeding their families. No equal start for everyone. Some can be rich in USA because they have connection and have time to establish the business + living in USA instead of living in poor country. – Freya the Goddess Sep 01 '22 at 05:52
5

As others have pointed out, the limit at $0$ exists. $f$ is equal to $|x|$ for $x < 1$. Since $|x|$ is continuous at $0$ so is this function.

Formally, $\forall \epsilon \in (0,1), |x|< \epsilon \implies |f|<\epsilon \implies \lim_{x\to 0} f(x) = 0$

Annika
  • 6,873
  • 1
  • 9
  • 20
5

This is (presumably) what you've plotted:

$$ y = \begin{cases} -x, & \text{if } x < -1 \\ x, & \text{if } 0 \le x < 1 \\ 1 + x, & \text{if } x \ge 1 \end{cases} $$

And this is what the graph should have looked like.

What the plot should look like

Relying on tools is nice, but it's important to make sure that they are doing what you want them to do. For example, if I did this graph by hand, I might add a little hollow circle at $\{1,1\}$ to indicate that when $x$ is $1$, $y$ isn't $1$, it's $2$. As the other answers noted, it's entirely possible to solve this problem without a plot.

2

For the first one, we have that

$$\lim_{x \rightarrow 0^+} f(x)=\lim_{x \rightarrow 0^+} x =0$$

$$\lim_{x \rightarrow 0^-} f(x)=\lim_{x \rightarrow 0^-} -x =0$$

therefore, since both one side limit are equal, we can conclude that

$$\lim_{x \rightarrow 0} f(x)=0$$

user
  • 154,566