# derivative of a function

• Dec 2nd 2009, 12:00 PM
DPMachine
derivative of a function
$\displaystyle f(x) = \left\{ {\begin{array}{rl} {0,} & {x \in \mathbb{Q}} \\ {x^2 - x^4 ,} & {x \notin \mathbb{Q}} \\ \end{array} } \right.$

I'm trying to find $\displaystyle f'(x)$. I think the function f is not continuous except at points 0 and 1. So if I can show that, that means f is not differentiable except (possibly) at 0 and 1. Am I going in the right direction?

If so, then f'(0) would be 0, but I'm not sure about f'(1)...
• Dec 2nd 2009, 02:53 PM
chiph588@
$\displaystyle f(x)$ is also continuous at $\displaystyle x = -1$ too.
• Dec 2nd 2009, 03:11 PM
DPMachine
Oops. Good point. $\displaystyle f(x)$ is continuous at 0, -1, and 1.

Wouldn't $\displaystyle f'(-1)=f'(1)=0$ since $\displaystyle f'(x) = \left\{ {\begin{array}{rl} {0,} & {x \in \mathbb{Q}} \\ {2x - 4x^3 ,} & {x \notin \mathbb{Q}} \\ \end{array} } \right.$? Or is it more complicated than that?
• Dec 2nd 2009, 03:40 PM
Plato
First the code $$f(x) = \left\{ {\begin{array}{cl} {0,} & {x \in \mathbb{Q}} \\ {x^2 - x^4 ,} & {x \notin \mathbb{Q}} \\ \end{array} } \right.$$ gives $\displaystyle f(x) = \left\{ {\begin{array}{cl} {0,} & {x \in \mathbb{Q}} \\ {x^2 - x^4 ,} & {x \notin \mathbb{Q}} \\ \end{array} } \right.$

Now look at $\displaystyle \lim _{h \to 0} \frac{{f(x_0 + h) - f(x_0 )}}{h}$
• Dec 2nd 2009, 07:12 PM
DPMachine
$\displaystyle f'(0)=\lim_{h \to 0} \frac{f(0+h)-f(0)}{h}=\lim_{h \to 0} \frac{f(h)}{h}=\lim_{h \to 0} \frac{h^2-h^4}{h}=\lim_{h \to 0} h-h^3 = 0$

$\displaystyle f'(1)=\lim_{h \to 0} \frac{f(1+h)-f(1)}{h}=\lim_{h \to 0} \frac{f(1+h)}{h}=\lim_{h \to 0} \frac{(1+h)^2-(1+h)^4}{h}=0$ or $\displaystyle \lim_{h \to 0} \frac{0}{h} = 0$

I think $\displaystyle f'(-1)$ would look similar to $\displaystyle f'(1)$
• Dec 2nd 2009, 08:14 PM
Drexel28
Quote:

Originally Posted by DPMachine
$\displaystyle f'(0)=\lim_{h \to 0} \frac{f(0+h)-f(0)}{h}=\lim_{h \to 0} \frac{f(h)}{h}=\lim_{h \to 0} \frac{h^2-h^4}{h}{\color{red}\star}=\lim_{h \to 0} h-h^3 = 0$

$\displaystyle f'(1)=\lim_{h \to 0} \frac{f(1+h)-f(1)}{h}=\lim_{h \to 0} \frac{f(1+h)}{h}=\lim_{h \to 0} \frac{(1+h)^2-(1+h)^4}{h}=0$ or $\displaystyle \lim_{h \to 0} \frac{0}{h} = 0$

I think $\displaystyle f'(-1)$ would look similar to $\displaystyle f'(1)$

You have a bit of a problem here. At the starred step you made a fatal error. If you would have put $\displaystyle \lim_{h\in\mathbb{R}-\mathbb{Q}\to0}\frac{f(h)}{h}$ you could have done that, but considering that your limit travels along a path containing both irrationals and rationals this is not permissable. Claim the limit is zero though and make and argument then that considering the limit along the path of the irrationals is enough.
• Dec 2nd 2009, 08:32 PM
DPMachine
Would it be similar to what I did for $\displaystyle f'(1)$?

Travelling along the irrationals, $\displaystyle \lim_{h\in\mathbb{R}-\mathbb{Q}\to0}\frac{f(h)}{h}=\lim_{h\in\mathbb{R}-\mathbb{Q}\to0}\frac{h^2-h^4}{h}=0$

And travelling along the rationals, $\displaystyle \lim_{h\in\mathbb{Q}\to0}\frac{f(h)}{h}=\lim_{h\in \mathbb{Q}\to0}\frac{0}{h}=0$

I think this should be enough because rationals and irrationals are both dense subsets of reals.
• Dec 2nd 2009, 08:42 PM
Drexel28
Quote:

Originally Posted by DPMachine
Would it be similar to what I did for $\displaystyle f'(1)$?

Travelling along the irrationals, $\displaystyle \lim_{h\in\mathbb{R}-\mathbb{Q}\to0}\frac{f(h)}{h}=\lim_{h\in\mathbb{R}-\mathbb{Q}\to0}\frac{h^2-h^4}{h}=0$

And travelling along the rationals, $\displaystyle \lim_{h\in\mathbb{Q}\to0}\frac{f(h)}{h}=\lim_{h\in \mathbb{Q}\to0}\frac{0}{h}=0$

I think this should be enough because rationals and irrationals are both dense subsets of reals.

Maybe be a little more precise. consider $\displaystyle \left|\frac{f(h)}{h}-0\right|\le\left|h-h^3\right|$ and since the right hand side converges to zero we may conclude that the left does as well by the squeeze theorem.
• Dec 3rd 2009, 12:52 PM
DPMachine
$\displaystyle \left| \frac{f(1+h)}{h} \right| \le \left| \frac{(1+h)^2-(1+h)^4}{h} \right|$

Okay, then would this make sense as well? Since the right side in this case also converges to 0, I can use the squeeze theorem to conclude that the left side also converges to 0?
• Dec 3rd 2009, 01:10 PM
Drexel28
Quote:

Originally Posted by DPMachine
$\displaystyle \left| \frac{f(1+h)}{h} \right| \le \left| \frac{(1+h)^2-(1+h)^4}{h} \right|$

Okay, then would this make sense as well? Since the right side in this case also converges to 0, I can use the squeeze theorem to conclude that the left side also converges to 0?

Friend, analysis is about precision of language. Stating an inequality and the result is not a proof. Take the time and care, but yes I believe you are on the right track.