# Claim this function is contin and diff

• Nov 20th 2008, 11:35 AM
Claim this function is contin and diff
Suppose that $f(x)=\left\{\begin{array}{cc}x^2,&\mbox{ if }
x \ is \ irrational \\0, & \mbox{ if } x \in \mathbb {Q} \end{array}\right.$

Is f continuous at 0 and is f differentiable at 0?

Claim: f is continuous at 0.

Given $\epsilon > 0$, pick $\delta = \sqrt { \epsilon }$, then whenever $|x-0|=|x|< \delta$

Now, $|f(x)-f(0)|=|f(x)| = \left\{\begin{array}{cc}|x^2|,&\mbox{ if }
x \ is \ irrational \\0, & \mbox{ if } x \in \mathbb {Q} \end{array}\right. < x^2 = \delta ^2 = \epsilon$

Q.E.D.

Claim: f is differentiable.

Proof.

Now, if $x_0 \in \mathbb {Q}$, then $\lim _{h \rightarrow 0 } \frac { f(x_0+h)-f(0)}{h}= \lim _{h \rightarrow 0 } \frac {f(h)}{h}=0$

If $x_0$ is irrational, then $\lim _{h \rightarrow 0 } \frac { f(x_0+h)-f(0)}{h}= \lim _{h \rightarrow 0 } \frac { (x_0+h)^2-0}{h}= \lim _{h \rightarrow 0 } \frac {2x_0^2+2x_0h+h^2}{h} = 0$

So f is diff.

Q.E.D.

Is this right? Thanks.
• Nov 20th 2008, 11:48 AM
TheEmptySet
Quote:

Suppose that $f(x)=\left\{\begin{array}{cc}x^2,&\mbox{ if }
x \ is \ irrational \\0, & \mbox{ if } x \in \mathbb {Q} \end{array}\right.$

Is f continuous at 0 and is f differentiable at 0?

Claim: f is continuous at 0.

Given $\epsilon > 0$, pick $\delta = \sqrt { \epsilon }$, then whenever $|x-0|=|x|< \delta$

Now, $|f(x)-f(0)|=|f(x)| = \left\{\begin{array}{cc}|x^2|,&\mbox{ if }
x \ is \ irrational \\0, & \mbox{ if } x \in \mathbb {Q} \end{array}\right. < x^2 = \delta ^2 = \epsilon$

Q.E.D.

Claim: f is differentiable.

Proof.

Now, if $x_0 \in \mathbb {Q}$, then $\lim _{h \rightarrow 0 } \frac { f(x_0+h)-f(0)}{h}= \lim _{h \rightarrow 0 } \frac {f(h)}{h}=0$

If $x_0$ is irrational, then $\lim _{h \rightarrow 0 } \frac { f(x_0+h)-f(0)}{h}= \lim _{h \rightarrow 0 } \frac { (x_0+h)^2-0}{h}= \lim _{h \rightarrow 0 } \frac {2x_0^2+2x_0h+h^2}{h} = 0$

So f is diff.

Q.E.D.

Is this right? Thanks.

On the differentiable part you are showing that the derivative exits at 0 so $x_0=0$ and it is not irrational

You can do this with only one case, but you have the right idea

The defintion you are using is this

$f'(c)=\lim_{h \to 0}\frac{f(c+h)-f(c)}{h}=\lim_{h \to 0}\frac{f(0+h)-f(0)}{h}=\lim_{h \to 0}\frac{f(h)-f(0)}{h}$

You may want to use the squeeze thorem

Note that $0 \le f(x) \le x^2$ for all x.

Good luck.
• Nov 20th 2008, 12:37 PM
$\lim _{h \rightarrow 0 } \frac {[f(h)]^2}{h} \geq \lim _{h \rightarrow 0 } \frac {f(h)}{h} \geq 0$

Is it something I can do with the left hand side? Does it involve rationality?
• Nov 20th 2008, 12:49 PM
TheEmptySet
Quote:

$\lim _{h \rightarrow 0 } \frac {[f(h)]^2}{h} \geq \lim _{h \rightarrow 0 } \frac {f(h)}{h} \geq 0$

Is it something I can do with the left hand side? Does it involve rationality?

Question 1:

Is this statement true:

$0 \le f(x) \le x^2$ for ALL(both rational and irrational) values of x.

$0 \le \lim_{h \to 0}\frac{f(0+h)-f(0)}{h} \le \lim_{h \to 0}\frac{(0+h)^2-0^2}{h}=\lim_{h \to 0}h$