Show that the piecewise defined function is continuous at $x=0$

1.5k Views Asked by At

I am faced with the following problem:

Determine whether the following function is continous, once differentiable, or twice differentiable:

$f(x) = \begin{cases} x^3+x-1 &\text{if $x \leq 0$;} \\ x^3-x-1 &\text{if $x >0$}. \end{cases}$

So far, I have shown that $f$ is not once differentiable at $x = 0$, and since $C^{2}(\mathbb{R}) \subset C^{1}(\mathbb{R})$, it is also not twice differentiable.

What I am having a little bit of difficulty with is showing that it is continuous at $x = 0$. Here is what I've done so far: since each piece of the piecewise defined function is continuous on its domain of definition, all I need to do is check the point $x = 0$.

  • For $x > 0$, I want to see if the right-hand limit exists. In this case, $|f(x) - f(0)| = |x^{3}-x-1 - (0^{3} + 0 - 1)| = |x^{3} - x| = |x(x^{2}-1)| = |x||x^{2}-1|$.

Now, if $|x|<1$, then $|x^{2} - 1| = |x+1||x-1| \leq (|x|+1)(|x|+1) = 2(|x|+1)< 2(1+1) = 4$.

So, I have that $|x||x^{2}-1|<4|x| < \epsilon$ if we take $|x|<\frac{\epsilon}{4}$. Therefore, I take $\displaystyle \delta = \min\left\{ 1, \frac{\epsilon}{4}\right\}$, and I have $\forall \epsilon > 0$ that $|f(x) - f(0)|<\epsilon$; i.e., the right-hand limit exists and is equal to $-1$.

  • For $x < 0$, I want to see if the left-hand limit exists. In this case, $|f(x) - f(0)| = |x^{3}+x-1 - (0^{3}+0-1)| = |x^{3}+x-1+1| = |x^{3} + x| \leq |x^{3}| + |x|$.

If $|x|<1$, then $|x^{3}|<|x|$.

So, I have that $|x^{3}|+|x| < |x| + |x| = 2|x| < \epsilon$ provided we take $\displaystyle |x| < \frac{\epsilon}{2}$. Therefore, I take $\delta = \min \left\{1, \frac{\epsilon}{2} \right\}$, and I have $\forall \epsilon > 0$ that $|f(x) - f(0)|<\epsilon$; i.e., the left-hand limit exists and is equal to $-1$.

Thus, $\lim_{x\to 0}f(x) = -1$, and since $f(0) = -1$, we have that $f$ is continuous at $x = 0$. Thus, it is continuous $\forall \mathbb{R}$.

I suppose what I would like to know is if I showed this correctly and, if not, how I might fix it.

Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

Hint. For any $x$ such that $|x|<1$ implies that $$|f(x)-f(0)|\leq |x^{3}| + |x| \leq 2|x|$$ and provide to take $|x|\leq \epsilon/2$ is enough.