How to determine the limit of this piecewise function

77 Views Asked by At

Let $f:\mathbb{R}→\mathbb{R}$ be the function given by $$f(x)= \begin{cases} x\sin\left(\frac1{x}\right) & \text{if }x\not\in\mathbb{Q} \\x^2 & \text{if }x\in \mathbb{Q} \end{cases}$$

Determine whether $\lim_{x\to 0} f (x)$ exists, and compute the limit if it exists, justifying your answer.

I always get stuck doing these types of questions.

4

There are 4 best solutions below

0
On

suppose $r_n$ is not rational and $lim{r_n}=0$ then as function $sin$ is bounded it will be $limf(r_n)=0$. If now $q_n$ is rational then again $limf(r_n)=0$.If a sequence has both rational and irrational terms take two diferrent sequences.

0
On

By the definition of limit, if $\lim_{x\rightarrow 0} f(x)=a$,

$\forall \epsilon$ $\exists \delta >0$ such that $|f(x)-a|<\epsilon$ for all $x\in (-\delta,\delta)$.

Note that, since $x$ and $x^2$ is continuous at $x=0$, there exists $\delta_1 , \delta_2>0$ such that $|x-0|<\epsilon$ for all $x\in (-\delta_1,\delta_1)$ and $|x^2-0|<\epsilon$ for all $x\in (-\delta_2,\delta_2)$. Then, if $\delta=\min(\delta_1,\delta_2)$, note that

$0 \leq \left| x\sin{\frac{1}{x}} -0\right|\leq |x|<\epsilon$ for all $x\in (-\delta,\delta)\cap \mathbb{Q}^c$ and

$0\leq \left| x^2 \right|<\epsilon$ for all $x\in (-\delta,\delta)\cap \mathbb{Q}$

Therefore, $\forall \epsilon>0$ $\exists \delta>0$, such that

$\left|f(x)-0 \right|<\epsilon$ for all $x\in (-\delta,\delta)$

0
On

We can notice that $-1\le\sin(\frac1x)\le1$ for all $x_{\ne0}$, hence $|x\sin(\frac1x)|\le |x|$, also, when $-1<x<1$ we have $x^2<|x|$ so $|f(x)|\le|x|$.

Therefore we choose $\delta=2\varepsilon$ and thus:$$\forall \varepsilon\exists\delta\forall x\quad 0<|x-0|<\delta\implies|f(x)-0|<\varepsilon$$

0
On

We have that for $x\in \mathbb{R}$

  • $\left|x\sin\left(\frac1{x}\right)\right|\le |x|\to 0$

  • $x^2\to 0$

therefore since $\mathbb{Q}\subseteq \mathbb{R}$ also

$$f(x)= \begin{cases} x\sin\left(\frac1{x}\right)\to 0 & \text{if }x\not\in\mathbb{Q} \\x^2\to 0 & \text{if }x\in \mathbb{Q} \end{cases}$$

that is $f(x)\to 0$.