# Thoughts on the derivative of a function

• mcastillo356
In summary, ##f(x)## is continuous only at ##x=3##. Intuitively, if ##x## was in ##\mathbb R##, ##x^2## and ##6(x-3)+9## would meet at ##x=3##; but, around ##x=3##, there are ##\mathbb Q## and ##\mathbb R\setminus Q##.

#### mcastillo356

Gold Member
Homework Statement
Prove that
##f(x) = \left \{ \begin{matrix} x^2 & \mbox{if }\;x\in \mathbb Q \\ 6(x-3)+9 & \mbox{if }\;x\in \mathbb R\setminus \mathbb Q\end{matrix}\right.##
has a derivative only at ##x=3##.
Relevant Equations
Analysis, algebra, number sets
(a) ##f(x)## is continuous only at ##x=3##:
1- If ##x\in\mathbb Q##, ##f(x)=9## at ##x=3##; around, there is ##\mathbb Q##
2- If ##x\in \mathbb R\setminus \mathbb Q##, this is the set of irrational numbers.

Intuitively, if ##x## was in ##\mathbb R##, ##x^2## and ##6(x-3)+9## would meet at ##x=3##; but, around ##x=3##, there are ##\mathbb Q## and ##\mathbb R\setminus Q##.
(b) If ##f:\mathbb R \to \mathbb R##, it's easy to prove that ##f(x)## has a derivative at 3: 6.

Greetings!

mcastillo356 said:
(a) ##f(x)## is continuous only at ##x=3##:
Intuitively, if ##x## was in ##\mathbb R##, ##x^2## and ##6(x-3)+9## would meet at ##x=3##; but, around ##x=3##, there are ##\mathbb Q## and ##\mathbb R\setminus Q##.
(b) If ##f:\mathbb R \to \mathbb R##, it's easy to prove that ##f(x)## has a derivative at 3: 6.
Neither of those is a proof.
Start by quoting the definitions of continuity and differentiability.

member 428835, bhobba and mcastillo356
Can you explain why f isn't continuous for ##x \ne 3##?

docnet and mcastillo356
vela said:
Can you explain why f isn't continuous for ##x \ne 3##?
If ##x\in \mathbb Q##, the graph of ##x^2## is a sequence of points; between those points, gaps.
If ##x\in \mathbb R\setminus\mathbb Q##, the same problem.
haruspex said:
Neither of those is a proof.
Start by quoting the definitions of continuity and differentiability.
Continuity at an inner point
We say that a function ##f## is continous at an inner point ##c## of its domain if
$$\displaystyle\lim_{x \to {c}}{f(x)}=f(c)$$
For example, the domain of ##f(x)=\sqrt{4-x^2}## is the closed interval ##[-2,2]##, formed by the inner points of ##(-2,2)##, the -2 at left, and the 2 at the outer right.
Differentiability
The derivative of a funtion ##f## is another function ##f'## defined this way
$$f'(x)=\displaystyle\lim_{h \to{0}}{\dfrac{f(x+h)-f(x)}{h}}$$
at each point ##x## where the limit exists (it is a finite number). If ##f'(x)## exists, ##f## is differentiable at ##x##.
It's a translation from spanish . I guess the domain is a single point: 3. I'm I wrong?
Greetings!

mcastillo356 said:
If ##x\in \mathbb Q##, the graph of ##x^2## is a sequence of points; between those points, gaps.
If ##x\in \mathbb R\setminus\mathbb Q##, the same problem.

Continuity at an inner point
We say that a function ##f## is continous at an inner point ##c## of its domain if
$$\displaystyle\lim_{x \to {c}}{f(x)}=f(c)$$
For example, the domain of ##f(x)=\sqrt{4-x^2}## is the closed interval ##[-2,2]##, formed by the inner points of ##(-2,2)##, the -2 at left, and the 2 at the outer right.
Differentiability
The derivative of a funtion ##f## is another function ##f'## defined this way
$$f'(x)=\displaystyle\lim_{h \to{0}}{\dfrac{f(x+h)-f(x)}{h}}$$
at each point ##x## where the limit exists (it is a finite number). If ##f'(x)## exists, ##f## is differentiable at ##x##.
It's a translation from spanish . I guess the domain is a single point: 3. I'm I wrong?
Greetings!
It's not a question of being wrong. This is pure mathematics where you are expected to prove things formally.

It may be "obvious" that ##f## is continuous at ##x = 3## and discontinuous elsewhere, but you are being asked to prove that formally.

Does this make sense, given your recent course material?

bhobba, docnet and mcastillo356
What is ##\lim_{c\to x} f(c)## when we restrict to ##c\in \mathbb{Q}## (note, this says nothing about where x lives!) What is ##\lim_{c\to x} f(c)## when ##c\notin \mathbb{Q}##? What is required for ##\lim_{c\to x}f(c)## to exist when c can be any real number?

pbuk, docnet and mcastillo356
For a formal proof, start with the ##\epsilon##, ##\delta## definition of continuity and show that the function is not continuous except at ##x=3##. Then, do you have a theorem that a function with a derivative at a point must be continuous at that point?

mcastillo356
mcastillo356 said:
I guess the domain is a single point: 3
No, the domain of a function is the set of points for which its value is defined. You are told the domain is ##\mathbb R##:
mcastillo356 said:
##f(x) = \left \{ \begin{matrix} x^2 & \mbox{if }\;x\in \mathbb Q \\ 6(x-3)+9 & \mbox{if }\;x\in \mathbb R\setminus \mathbb Q\end{matrix}\right.##
To show it is continuous at 3 you need to show that:
- for any ε>0 there exists δ > 0 s.t. if |x-3|<δ then |f(x)-f(3)|<ε.

You are also asked to show it is not continuous anywhere else.

bhobba, docnet and mcastillo356
haruspex said:
To show it is continuous at 3 you need to show that:
- for any ε>0 there exists δ > 0 s.t. if |x-3|<δ then |f(x)-f(3)|<ε.

##|x^2-9|=|(x+3)(x-3)|=|x+3|\cdot|x-3|##
##x\in[2,4]\Rightarrow{|x+3|\leq 7}##
##|x^2-9|\leq 7\cdot |x-3|\leq7\cdot \dfrac{\epsilon}{7}=\epsilon##
##\delta=\dfrac{\epsilon}{7}##
##\lim_{x \to{3}}{x^2}=9=f(3)##

##|6(x-3)+9-9|=|6x-18|=6\cdot |x-3|##
##\delta=\dfrac{\epsilon}{6}##
##\lim_{x \to{3}}{(6(x-3)+9)}=9=f(3)##

Therefore, ##f## is continuous at ##x=3##

FactChecker said:
For a formal proof, start with the ##\epsilon##, ##\delta## definition of continuity and show that the function is not continuous except at ##x=3##.

Sorry, any hint?

PeroK said:
Does this make sense, given your recent course material?

WWGD
mcastillo356 said:
##|x^2-9|=|(x+3)(x-3)|=|x+3|\cdot|x-3|##
##x\in[2,4]\Rightarrow{|x+3|\leq 7}##
##|x^2-9|\leq 7\cdot |x-3|\leq7\cdot \dfrac{\epsilon}{7}=\epsilon##
##\delta=\dfrac{\epsilon}{7}##
##\lim_{x \to{3}}{x^2}=9=f(3)##

##|6(x-3)+9-9|=|6x-18|=6\cdot |x-3|##
##\delta=\dfrac{\epsilon}{6}##
##\lim_{x \to{3}}{(6(x-3)+9)}=9=f(3)##

Therefore, ##f## is continuous at ##x=3##
I'm afraid you don't show any grasp of how continuity works.
Of course ##\lim_{x \to{3}}{x^2}=9=f(3)##, but you need to show ##\lim_{x \to{3}}f(x)=f(3)##.
I spelt out exactly the form of proof that is needed in post #8. It is called an ε-δ proof.
The task for you is to figure out an algorithm by which to select a value of δ for a given value of ε. Then show that if x is within δ of 3 then regardless of whether x is rational or irrational, f(x) is within ε of 9.
There are no shortcuts.

bhobba, docnet and mcastillo356
mcastillo356 said:
##|x^2-9|=|(x+3)(x-3)|=|x+3|\cdot|x-3|##
##x\in[2,4]\Rightarrow{|x+3|\leq 7}##
##|x^2-9|\leq 7\cdot |x-3|\leq7\cdot \dfrac{\epsilon}{7}=\epsilon##
##\delta=\dfrac{\epsilon}{7}##
##\lim_{x \to{3}}{x^2}=9=f(3)##

##|6(x-3)+9-9|=|6x-18|=6\cdot |x-3|##
##\delta=\dfrac{\epsilon}{6}##
##\lim_{x \to{3}}{(6(x-3)+9)}=9=f(3)##

Therefore, ##f## is continuous at ##x=3##
This looks reasonable to me, but it's not what you were asked to prove. In fact, you may even be allowed to assume what you've proved here. I.e. for this question you may be allowed to assume that all polynomials of a real variable are continuous everywhere.

In any case, whether you assume this or prove it first, the specific aspect of this question is a function that is defined as two different polynomials, one on the rationals and one on the irrationals.

To show the discontinuity, I would think of sequences of rationals and irrationals converging to an arbitrary point ##a##.

docnet and mcastillo356
mcastillo356 said:
##|x^2-9|=|(x+3)(x-3)|=|x+3|\cdot|x-3|##
##x\in[2,4]\Rightarrow{|x+3|\leq 7}##
##|x^2-9|\leq 7\cdot |x-3|\leq7\cdot \dfrac{\epsilon}{7}=\epsilon##
##\delta=\dfrac{\epsilon}{7}##
##\lim_{x \to{3}}{x^2}=9=f(3)##

##|6(x-3)+9-9|=|6x-18|=6\cdot |x-3|##
##\delta=\dfrac{\epsilon}{6}##
##\lim_{x \to{3}}{(6(x-3)+9)}=9=f(3)##

Therefore, ##f## is continuous at ##x=3##
Ah.. reading through the above again I see what you were trying to say. What you meant was,
Given ε > 0, choose x ∈ (3-ε/7, 3+ε/7)∩(2,4).
if x rational then |f(x)-9|=|x2-9| ... etc. ... < ε.
If x irrational then |f(x)-9|=|6(x-3)| ... etc. ... < ε.

bhobba and mcastillo356
Well, the truth is that trying to make sense of my erratic steps, now I guess I've taken a first restriction for ##\delta##: ##x \in{[2,4]}##, and then a second one: ##|x-3|\leq \dfrac{\epsilon}{7}##. Now it's enough to choose ##\delta\leq \dfrac{\epsilon}{7}##. This implies that for any ##\epsilon>0##, we take ##\delta=\mbox{min}\left(3,\dfrac{\epsilon}{7}\right)##.
And I think there is another mistake: there are two ##\delta##: to ensure this piecewise (is piecewise a right word?) function is continuous at ##x=3##, we must choose the shortest one.
PeroK said:
This looks reasonable to me, but it's not what you were asked to prove. In fact, you may even be allowed to assume what you've proved here. I.e. for this question you may be allowed to assume that all polynomials of a real variable are continuous everywhere.
Let's assume it for a while.
PeroK said:
In any case, whether you assume this or prove it first, the specific aspect of this question is a function that is defined as two different polynomials, one on the rationals and one on the irrationals.

To show the discontinuity, I would think of sequences of rationals and irrationals converging to an arbitrary point ##a##.
Is it possible to prove the discontinuity with my background?(Basic knowledge of limits, continuity, and differentiation)
Thanks!

I think you should think about post #6 that I put up earlier. It let's you prove continuity/discontinuity much easier for every point (and is more educational for how to think about things like this in the future)

mcastillo356
mcastillo356 said:
Is it possible to prove the discontinuity with my background?(Basic knowledge of limits, continuity, and differentiation)
Thanks!
Yes, it's just a little awkward, that's all. Let's call the two polynomial functions p(x) and q(x).

To prove continuity at x=3, as you say, you should have two deltas covering the rational and irrational cases.

To prove the discontinuity at other points, a: if a is rational, you can consider a sequence of irrational points converging to a. And vice versa. Then use the fact that p(a)≠q(a), which means that |p(a)−q(a)|=b>0. Then use the convergence of the sequence to p(a) or q(a). You're effectively using the fact that a sequence cannot converge to two separate limits.

For differentiability at x=3, you can use the same idea of using the differentiability of each polynomial and the two deltas approach again.

That would be my strategy.

mcastillo356
Yet another perspective, hoping to help.
If your point ##x_0## is in ##\mathbb Q##, your function takes the value ##x_0^2##. Now, there will be points##x_i## in ##\mathbb R-\mathbb Q## that are indefinitely close to ##x_0## ( Why?). In the latter, the function will take values ##6x_i-9##. For any ##\epsilon>0## , there will be points ##x_i## satisfying ##|x_0-x_i|< \delta ## which must also satisfy ##|f(x_0)-f(x_i)| < \epsilon##, because of continuity.

SammyS and mcastillo356
Office_Shredder said:
I think you should think about post #6 that I put up earlier. It let's you prove continuity/discontinuity much easier for every point (and is more educational for how to think about things like this in the future)
While that works, it might not be quite obvious that only considering sequences within ##\mathbb{Q}## and sequences entirely outside ##\mathbb{Q}## is enough. Seems like a lemma is needed to show that covers sequences that are arbitrary mixes.

Last edited:
haruspex said:
While that works, it might not be quite obvious that only considering sequences within
##\mathbb{Q}## and sequences entirely outside ##\mathbb{Q}## is enough. Seems like a lemma is needed to show that covers sequences that are arbitrary mixes.

I agree, but it's pretty straightforward and it saves having to do an epsilon delta proof for every time you see this type of problem.

PeroK said:
Yes, it's just a little awkward, that's all. Let's call the two polynomial functions p(x) and q(x).

To prove continuity at x=3, as you say, you should have two deltas covering the rational and irrational cases.

To prove the discontinuity at other points, a: if a is rational, you can consider a sequence of irrational points converging to a. And vice versa. Then use the fact that p(a)≠q(a), which means that |p(a)−q(a)|=b>0. Then use the convergence of the sequence to p(a) or q(a). You're effectively using the fact that a sequence cannot converge to two separate limits.

For differentiability at x=3, you can use the same idea of using the differentiability of each polynomial and the two deltas approach again.

That would be my strategy.

Well, let's start proving discontinuity at other points:

##\left\{x_n=\left(1+\dfrac{1}{n}\right)^n\right\}_{n=0}^{\infty}=e##

##\left\{x_n=\dfrac{e}{n}\right\}_{n=0}^{\infty}=0##

##p(e)=6(e-3)+9=6e-9##
##q(0)=0##

Well, is this a good start?

PeroK
No, it is not. Let's forget it

PeroK
mcastillo356 said:
Well, let's start proving discontinuity at other points:

##\left\{x_n=\left(1+\dfrac{1}{n}\right)^n\right\}_{n=0}^{\infty}=e##

##\left\{x_n=\dfrac{e}{n}\right\}_{n=0}^{\infty}=0##

##p(e)=6(e-3)+9=6e-9##
##q(0)=0##

Well, is this a good start?
What is that?! It's an original approach at least.

The obvious way to start is to let ##a \ne 3## and, first, let ##a## be rational, so that ##f(a) = a^2##

Now, if we take a sequence of irrational points, ##x_n##, that converges to ##a##, then we have ##f(x_n) = 6x_n - 9##. Can you make progress from there?

mcastillo356
mcastillo356 said:
Well, let's start proving discontinuity at other points:
This part is where it is easier to see how to use the approach in post #6.
For a≠3, consider a sequence of rationals converging to a and a sequence of irrationals converging to a.

mcastillo356
Hi, PF, what about if I link this thread at the spanish maths forum "Rincón Matemático"?. I've realized my lack of background, and my gaps in English. To accomplish them I would also appreciate very much your help. I know it's unusual, it's just an idea to keep on moving, the next step to give a try, from my point of view. RM is ready. What is your opinion?.
Greetings!

As someone pointed out. Maybe an argument using sequences instead of epsilon/delta argument would be easier, and a bit more intuitive.

A good start, it acquaint yourself with the definition of continuity using epsilon/delta and the one using sequences. There is another formulation using neighborhoods, but I believe, its less intuitive than the others for beginning students.

After practicing them a bit, you could prove that they are all equivalent.

My suggestion is to practice on two easier problems. Ie., showing that a function is continuous and showing that a function is discontinuous. Then return to this one. It is apparent that you lack an understanding of continuity and differentiation. So trying to work this problem out at this stage may be wasted time...

mcastillo356
Hi,PF

Office_Shredder said:
What is ##\lim_{c\to x} f(c)## when we restrict to ##c\in \mathbb{Q}## (note, this says nothing about where x lives!) What is ##\lim_{c\to x} f(c)## when ##c\notin \mathbb{Q}##? What is required for ##\lim_{c\to x}f(c)## to exist when c can be any real number?

I've been at the spanish forum, RM: we've came to the conclusion that some background on sequences and topology is needed to face the question, and I have none of them.
My decision is to give a last chance: the quote above. Is there an easier answer to the statement of the thread, based on an undergraduate's skills and lacks?.
I've also translated and wrote down the quote, but RM leads me again to topology.
My question: can you give me some more hints on Office_Shredder's quote?.

Greetings!

mcastillo356 said:
Hi,PF

I've been at the spanish forum, RM: we've came to the conclusion that some background on sequences and topology is needed to face the question, and I have none of them.
My decision is to give a last chance: the quote above. Is there an easier answer to the statement of the thread, based on an undergraduate's skills and lacks?.
I've also translated and wrote down the quote, but RM leads me again to topology.
My question: can you give me some more hints on Office_Shredder's quote?.

Greetings!
Sequences are usually the first thing to study in a course on real analysis. If you know the definition of a limit in terms of sequences, then this is fairly elementary. It's introductory pure mathematics and requires no topology.

Are you taking a course in real analysis?

PeroK said:
Sequences are usually the first thing to study in a course on real analysis. If you know the definition of a limit in terms of sequences, then this is fairly elementary. It's introductory pure mathematics and requires no topology.

Are you taking a course in real analysis?
I'm enrolled in real analysis, in the first college year of the Physics career. It's the only subject I've chosen (I had that chance, and I took this subject). At this moment, I've only taken a quick look at sequences. So I guess I need some more time.

Greetings. Thanks, PF!

mcastillo356 said:
Hi,PF

I've been at the spanish forum, RM: we've came to the conclusion that some background on sequences and topology is needed to face the question, and I have none of them.
My decision is to give a last chance: the quote above. Is there an easier answer to the statement of the thread, based on an undergraduate's skills and lacks?.
I've also translated and wrote down the quote, but RM leads me again to topology.
My question: can you give me some more hints on Office_Shredder's quote?.

Greetings!
If you consider a sequence of rational numbers, xi converging to x, what does the sequence f(xi) look like? What does it converge to?
Then do the same for a sequence of irrationals converging to x.

mcastillo356
Hi, PF
It suffices to prove that every irrational number in ##\mathbb R## is the limit of a sequence of rational numbers, and every rational number in ##\mathbb R## is the limit of a sequence of irrational numbers? I've got some stuff on internet. It might be useful, but I need time to check it.

mcastillo356 said:
Hi, PF
It suffices to prove that every irrational number in ##\mathbb R## is the limit of a sequence of rational numbers, and every rational number in ##\mathbb R## is the limit of a sequence of irrational numbers? I've got some stuff on internet. It might be useful, but I need time to check it.
I think you can assume that. This question doesn't expect you to prove that.

mcastillo356
haruspex said:
If you consider a sequence of rational numbers, xi converging to x, what does the sequence f(xi) look like? What does it converge to?
Then do the same for a sequence of irrationals converging to x.
##f(x_i)## is another sequence; it converges to ##f(x)##
The same for irrationals.
Is it that easy?. It's already proven: the polynomial functions converge to ##9## at ##x=3##

mcastillo356 said:
##f(x_i)## is another sequence; it converges to ##f(x)##
The same for irrationals.
Is it that easy?. It's already proven: the polynomial functions converge to ##9## at ##x=3##
If you have enrolled in a course on real analysis, you perhaps ought to take it seriously.

mcastillo356
mcastillo356 said:
##f(x_i)## is another sequence; it converges to ##f(x)##
The same for irrationals.
Is it that easy?. It's already proven: the polynomial functions converge to ##9## at ##x=3##
You do not seem to have understood what I asked you to do.
haruspex said:
If you consider a sequence of rational numbers, xi converging to x, what does the sequence f(xi) look like?
I.e. write out the expression for that sequence, using what f looks like for rationals. Do the same for a sequence of irrationals. Post what you get.

mcastillo356
As a more concrete example, what is
$$\lim_{n\to \infty} f(\pi/n))$$
And what is
$$\lim_{n\to \infty} f(1/n)$$

mcastillo356
Well, here is my output. Sorry for the excessive time taken to post, and, forgive language mistakes.

#### Attachments

• Thoughts.docx
16.6 KB · Views: 101