Thoughts on the derivative of a function

  • #1
mcastillo356
Gold Member
464
207
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!
 

Answers and Replies

  • #2
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
(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.
 
  • Like
  • Informative
Likes joshmccraney, bhobba and mcastillo356
  • #3
vela
Staff Emeritus
Science Advisor
Homework Helper
Education Advisor
15,752
2,391
Can you explain why f isn't continuous for ##x \ne 3##?
 
  • Informative
  • Like
Likes docnet and mcastillo356
  • #4
mcastillo356
Gold Member
464
207
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.
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!
 
  • #5
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,721
15,330
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?
 
  • Like
  • Informative
Likes bhobba, docnet and mcastillo356
  • #6
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
5,460
1,391
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?
 
  • Like
  • Informative
Likes pbuk, docnet and mcastillo356
  • #7
FactChecker
Science Advisor
Homework Helper
Gold Member
7,583
3,312
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?
 
  • Informative
Likes mcastillo356
  • #8
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
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##:
##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.
 
  • Like
  • Informative
Likes bhobba, docnet and mcastillo356
  • #9
mcastillo356
Gold Member
464
207
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##

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?

Does this make sense, given your recent course material?

🙁
 
  • #10
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
##|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.
 
  • Like
  • Informative
Likes bhobba, docnet and mcastillo356
  • #11
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,721
15,330
##|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##.
 
  • Informative
  • Like
Likes docnet and mcastillo356
  • #12
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
##|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. ... < ε.
 
  • Love
Likes bhobba and mcastillo356
  • #13
mcastillo356
Gold Member
464
207
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.
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.
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!
 
  • #14
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
5,460
1,391
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)
 
  • Informative
Likes mcastillo356
  • #15
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,721
15,330
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.
 
  • Informative
Likes mcastillo356
  • #16
WWGD
Science Advisor
Gold Member
6,291
8,135
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.
 
  • Like
  • Informative
Likes SammyS and mcastillo356
  • #17
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
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:
  • #18
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
5,460
1,391
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.
 
  • #19
mcastillo356
Gold Member
464
207
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?
 
  • #20
mcastillo356
Gold Member
464
207
No, it is not. Let's forget it:frown:
 
  • #21
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,721
15,330
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?
 
  • Informative
Likes mcastillo356
  • #22
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
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.
 
  • Informative
Likes mcastillo356
  • #23
mcastillo356
Gold Member
464
207
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!
 
  • #24
MidgetDwarf
1,389
548
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...
 
  • Informative
Likes mcastillo356
  • #25
mcastillo356
Gold Member
464
207
Hi,PF

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?.
If I should provide more information, please tell me.

Greetings!
 
  • #26
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,721
15,330
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?.
If I should provide more information, please tell me.

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?
 
  • #27
mcastillo356
Gold Member
464
207
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!
 
  • #28
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
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?.
If I should provide more information, please tell me.

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.
 
  • Like
Likes mcastillo356
  • #29
mcastillo356
Gold Member
464
207
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.
 
  • #30
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,721
15,330
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.
 
  • Informative
Likes mcastillo356
  • #31
mcastillo356
Gold Member
464
207
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##:wideeyed:
 
  • #32
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
23,721
15,330
##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##:wideeyed:
If you have enrolled in a course on real analysis, you perhaps ought to take it seriously.
 
  • Informative
Likes mcastillo356
  • #33
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
2022 Award
39,169
8,489
##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##:wideeyed:
You do not seem to have understood what I asked you to do.
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.
 
  • Like
Likes mcastillo356
  • #34
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
5,460
1,391
As a more concrete example, what is
$$\lim_{n\to \infty} f(\pi/n))$$
And what is
$$\lim_{n\to \infty} f(1/n)$$
 
  • Informative
Likes mcastillo356
  • #35
mcastillo356
Gold Member
464
207
Well, here is my output. Sorry for the excessive time taken to post, and, forgive language mistakes.
 

Attachments

  • Thoughts.docx
    16.6 KB · Views: 70

Suggested for: Thoughts on the derivative of a function

Replies
3
Views
367
Replies
6
Views
224
Replies
2
Views
411
Replies
7
Views
506
Replies
8
Views
472
Replies
2
Views
514
Replies
7
Views
847
  • Last Post
Replies
2
Views
360
Top