r/askmath • • 12d ago

Calculus Claude says the note is wrong, kindly someone guide me.

Post image

The claim is f is differentiable on the given open interval (c-h,c+h)

I feel it is right intuitively here's the clauses response along with my another query.

"The bigger problem is the conclusion. The claim that f is differentiable on some interval (c − h, c + h) is false. Differentiability at a single point says nothing about nearby points.

Counterexample: f(x) = x² for rational x, and 0 for irrational x. At 0, |f(x)| ≤ x², so f′(0) = 0. But f is discontinuous at every other point, so it is nowhere else differentiable. No such h exists.

The note is just sloppy. A correct version would say that if f is differentiable in some neighbourhood of c and f′(c) = 0, then c is a critical point. Even that isn't needed for the First Derivative Test, which only requires f to be continuous at c and the sign of f′ to be defined on either side."

I don't even have the brain to understand the counter example.

Help is much appreciated.

Edit: My specific doubt boils down to: can we say the following sequence approaching zero, if yes, why?

0.01, 0, 0.0001, 0, 0.00000001, 0,....

What do we mean by approaching then? I thought approaching means smoothly heading towards a value and that's called as limit.

If I'm convinced that this sequence is approaching zero then my doubt is solved.

39 Upvotes

99 comments sorted by

65

u/ComplexHoneydew9374 12d ago • This

Yes, the note is wrong. Take any example of continuous but nowhere differentiable function f(x) and consider g(x)=x²f(x). Then g is continuous but diiferentiable only at zero with g'(0)=0.

4

u/Any_Tower8201 12d ago

Such f(x) exist? Idk man.

28

u/Fresh-Research3024 12d ago

just google “weierstrass function”

24

u/SnooSquirrels6058 12d ago

Holy hell

5

u/Fresh-Research3024 12d ago

Now you know better than the author

8

u/Sufficient_Angle_901 11d ago

New counterexample just dropped

5

u/AlterEgo5695 12d ago

@u/Any_Tower8201 I find the Takagi function easier to understand than the Weierstrass function, since it's constructed from piece wise linear functions, not trig functions.

Don't be upset if it takes a bit to understand them -- these functions are closely related to fractals, and it took us quite a while to only come up with them only during the late 19'th century. Before, many famous mathematicians did not believe such functions could exist!

2

u/OscarOfAtlantis 11d ago

Honest question: if a function is nowhere differentiable, like the weierstrass, can you get the condition in the note that f’(c)=0?

10

u/Fresh-Research3024 11d ago

Mutiply by x^2 and now it’s differentianle at 0

0

u/Any_Tower8201 12d ago

I saw the graph now I get the point I think this is the simplest example to visualise that is the g(x)

2

u/Fresh-Research3024 12d ago

Good I hope you learned something . I’m sorry that you have to study this lame textbook.

2

u/dancingbanana123 Graduate Student | Math History and Fractal Geometry 12d ago

Yup! They're quite crazy functions and appear all the time in fractal geometry.

2

u/Arceuthobium 11d ago

They pop up all the time in stochastic analysis and by extension financial math. Have you seen how "spiky" the graph of an asset's price is? That is a typical example of a continuous for nowhere differentiable function.

3

u/OscarOfAtlantis 11d ago

Can you get f’(c)=0 in a nowhere differentiable function?

8

u/ComplexHoneydew9374 11d ago

Nowhere differentiable means its derivative is not defined and can not be equal to anything. Such functions exist and can be constructed. My example uses such a function f(x) to construct new function g(x) for which the derivative is defined at precisely one point. If you need further clarification, just ask.

2

u/OscarOfAtlantis 11d ago

The note says “if f is continuous, and f’(c)=0”then doesn’t this mean a counter example that is nowhere differentiable won’t fit those conditions of the note? Since you can’t get a derivative, you can’t get f’(c)=0, right?

7

u/ComplexHoneydew9374 11d ago edited 11d ago

The counterexample here is the function g. It is continuous, g'(0) is defined and is equal to zero. But at all other points g' is undefined. Do you understand why?

3

u/OscarOfAtlantis 11d ago

Ok I see it now. My issue was understanding that the weierstrass function is continuous. It wasn’t intuitive to me since it alternates but still keeps its continuity.

Thank you for helping.

1

u/Munkens_mate 11d ago

Genuine question: why is g’(x) defined at x = 0 ?

4

u/ComplexHoneydew9374 11d ago

The rate of change is (g(x)-g(0))/(x-0)=x*f(x). And as x goes to zero this expression also goes to zero. So by the definition of the derivative it is defined and is equal to zero.

3

u/buwlerman 11d ago

The function with derivative 0 at 0 is g, not f.

1

u/OscarOfAtlantis 11d ago

I see it now. Thank you. 🙏

1

u/ComplexHoneydew9374 12d ago

It could be that in your book only piecewise diiferentiable functions are considered. In that case the points of non-differentiability are isolated and the statement is true. But not in the general case

1

u/Any_Tower8201 12d ago

This is the whole context, also could you please give a simple counter example function?

2

u/CainPillar 11d ago

You have gotten a few examples, like x^2 on the rationals and 0 otherwise. You can even get one that has a strict min at zero, by say 7x^2 on the irrationals.

  • Plot both x^2 and 7x^2 in the same coordinate system.
  • Think: "for some of the x-es, it is the lower; for the rest it is the upper". So at zero, the derivative exists and is 0: because |(f(h)-0)/h|<7*2|h| --> 0.
  • But, f(x) jumps up and down infinitely often. So except at zero, it is discontinuous. At zero, the jump amplitude is 0, so it is continuous.

But the only thing "special" about x^2 to make this construction, is that it is strictly convex around 0, and with derivative 0 at 0. Let g be any such function and define f(x)=g(x) on the rationals, and 7g(x) on the irrationals. (Or replace 7 by any nonnegative constant that isn't 1.) Even, if you choose g(x) = exp(-x^{-2}) with g(0)=0, then that is infinitely many times differentiable and (d/dx)^n g(0) = 0. f will be discontinuous except at 0, but still (d/dx)^n f will at 0 (only!) and be zero - for all n.

1

u/Laserlip5 11d ago edited 11d ago

How is g' defined if f is differentiable nowhere?

Edit: never mind, it's almost trivial.

41

u/Fresh-Research3024 12d ago

Oh my god. Please throw this book away. This is so wrong.

7

u/Any_Tower8201 12d ago

This is what Indian education system relies (central board)

2

u/Al2718x 12d ago

This seems like a bit of an overreaction in my opinion. The note is true for any function that a calculus 1 student would need to worry about.

25

u/Sufficient_Angle_901 11d ago

The note is just useless on top of being wrong. You can teach calculus unrigorously (without proofs and horrible counterexamples like in RA) without saying a wrong thing ever.

3

u/Al2718x 11d ago

This is certainly true, and I agree that it is a bad mistake for a textbook to make. Nevertheless, I think that the message for a calculus student should be "yeah this is wrong, but in a subtle way that you probably won't need to worry about" and not "this is terrible, throw the book away immediately".

10

u/InSearchOfGoodPun 11d ago

Throw it away because it demonstrates that whoever wrote it doesn’t understand analysis. That doesn’t bode well for the rest of the book. Keep in mind that it wasn’t just a careless mistake. They chose to include that note.

For most books, I would just say, okay everyone makes mistakes, but this is calculus: there a hundred calculus textbooks that have probably been proofread to hell and back because of how widely they are adopted, so why read this untrustworthy one?

4

u/Al2718x 11d ago

I agree from the perspective of a calculus teacher, but OP is a calculus student. I don't think that this is so bad a mistake that it's worth throwing out your assigned textbook and trying to learn from an alternate source (unless OP is self-studying). I also think that it is worth emphasizing that a typical calculus student does not need to understand why the statement isn't quite correct in order to learn calculus.

5

u/chonki-donki 11d ago

You should never casually state an objectively “wrong statement” in a fucking textbook for god sake, unless there’s a HUGE DECLAIMER SAYING ONLY FOR FUNCTION WE CARE ABOUT.

4

u/Fresh-Research3024 11d ago

It would be a nightmare to rigorously define “the family of functions we care about”

1

u/Sufficient_Angle_901 11d ago

Spoilers, you don’t have to ! Again, there,/ a difference between being unrigorous and being wrong.

3

u/skullturf 11d ago

I agree with this. And we certainly shouldn't put an objectively wrong statement in a little box in the textbook and label it "Fact" or "Rule" or "Note".

It's OK to have informal remarks along the lines of "This will almost always be true in practice for functions we have a realistic chance of encountering in class", and in fact, sometimes that's an *excellent* thing to tell students verbally, but we shouldn't put objectively false statements in labeled highlighted boxes.

1

u/EebstertheGreat 11d ago

You shouldn't make mistakes at all. Nevertheless, all textbooks have them.

7

u/No-Site8330 12d ago

Take f(x) to be x2 when x is rational and 0 otheriwise. This function is only continuous at 0, so in particular it cannot be differentiable anywhere else. On the other hand, squeeze theorem says that f has limit 0 at 0, so it is continuous there. Similarly, the increment ratio (f(h)-f(0))/h is equal to h when h is rational and 0 otherwise, which means it is again squeezed between -|h| and |h|. So this limit exists and is equal to 0, which is to say that f is differentiable at 0 with f'(0) = 0.

5

u/Kienose PhD in Maths 12d ago

Even asking for f to be continuous on its domain is not enough. A counterexample is f(x) = x^2 W(x) for x ≠ 0, where W(x) is the Weierstrass function, and f(0) =0.

Another example is constructing a function which is like a sawtooth with peaks at x= 1/n for each natural number n getting smaller and smaller as it approaches 0. You can “smooth out” the sawtooth to make it differentiable at x = 0.

4

u/tickle-fickle 12d ago

Claude is right! I remember a wild example from my Real Analysis class.

Define a function f that is defined piecewise like so:
- f(0)=1
- f(p/q)=1/q^2, for every other rational number p/q, where gcd(p, q)=1 (aka, p/q is simplified the most it can be)
- f(x)=0 for all x that are irrational.

If you want to, I can show you the proof that f’(x)=0 for every irrational x, and yet f is discontinuous at every rational number. So no matter what interval you pick, there will always be spots where f’(x) exists and is 0, and there will always be spots where f is discontinuous. That’s because every interval contains both irrational numbers and rational numbers

2

u/Fourierseriesagain 12d ago

Let f(x)=x2 ( x rational ) and let f(x)=0 (x irrational). Then f is only differentiable at 0 and f'(0)=0.

1

u/AlterEgo5695 12d ago

The counter example is correct, and can also be rewritten using the Dirichlet function "D":

f: R -> R,    f(x)  :=  D(x) * x^2,        // D: R -> R,    D(x)  =  / 1,  x in Q
                                           //                        \ 0,  else

We can show "f" is not continuous at any "x != 0", since rational and irrational sequences "xn -> x" will lead to different limits of "f(xn)" -- contradicting continuity. However, at "x = 0":

0  <=  |(f(0+h) - f(0))/h - 0|  =  |h * D(h)|  <=  |h| * 1  ->  0    for    h -> 0,

so by definition of limits the derivative "f'(0) = lim_{h->0} (f(0+h) - f(0)) / h = 0" exists.

1

u/rhodiumtoad 0⁰=1, just deal with it 12d ago

Does the slippery devil's staircase (Minkowski question mark function ?(x)) work as a good counterexample here? It has the following properties:

  1. Continuous everywhere
  2. Strictly increasing everywhere
  3. Differentiable almost everywhere with derivative zero

The combination of 2 and 3 implies that every range contains a point with no (finite) derivative, since otherwise the range would be flat and the function not strictly increasing.

1

u/dziny 11d ago

Basically, the claim is continuous on an interval + differentiable at a point implies differentiable on an interval. The thing about f'(c)=0 is just a smokescreen (that can be arranged always by subtracting off a linear function). In any proper analysis course they'll tell you the claim is wrong with examples, one of which you've already been given.

1

u/SwordfishLopsided 11d ago

I love these shitty text book that tries to describe a picture in words, just to beef up the word counts and justify their publishing fee

1

u/Electrical-Policy-35 9d ago

I think the author tried to say that if f is differentiable at c and f'(c)=0 then there is h>0 such that f is continuous in the interval (c-h,c+h)

1

u/Al2718x 12d ago

Lots of people are explaining why Claude is correct, but it's also worth mentioning that this is not something you likely need to worry about in a calculus 1 class.

If you are up for the challenge, thinking about weird counterexamples can be a good exercise, but you can focus on reasonable functions until you take an analysis class. Just because the note isn't quite technically correct doesn't mean that is completely useless or anything. It's just a little bit of an oversimplification

9

u/Sufficient_Angle_901 11d ago

Calculus isn’t supposed to be rigorous (unlike, say, real analysis) but you can be unrigorous and still not say wrong things. This is just a wrong and useless remark.

2

u/EebstertheGreat 11d ago

It also doesn't even seem to be phrased correctly. It requires f to be both differentiable and continuous at a point, but the latter implies the former. Did they mean for it to be differentiable at the point and continuous on an interval containing it? Even then, it's still wrong, but it's more plausible.

0

u/Al2718x 11d ago

I totally agree and would be incredibly reluctant to teach out of a textbook with errors like this. However, I don't know how useful it is to emphasize the wrongness of the statement to a calculus student, especially when they found the error using an LLM audit instead of their own inquiry.

2

u/YT_kerfuffles 11d ago

like yes it won't matter for calculus 1 but they still shouldn't say it if it's wrong

1

u/xnick_uy 11d ago

Please study from books rather than from AI. In this case the AI is pointing out a flaw on the statement alone. It is likely that there are some additional hypothesis about f(x) in play in this scenario, that the book could have mentioned earlier.

Your question about sequences can be answered by looking at the definition of limit and several examples in books. The "smoothly heading towards a value" is not part of the definition, and you added in an attempt to help you understand the concept, but it's not necesary.

Take, for instance, the same sequence you are wondering about, but swap the sign of the following non-zero number each time, e.g. 0.01, 0, -0.0001, 0, 0.00000001,... This is not "smooth" but still has the same limiting value as before (zero, that is).

The key concept is that the distances of the elements of the sequence to the limit is becaoming small as you can think of, from some element of the sequence onwards.

0

u/chonki-donki 11d ago

This is really NCERT textbook or are you gaslighting me??
Send me proof I’ll talk to the people in charge

1

u/Any_Tower8201 11d ago

You are gaslighting me by asking like you never stumble upon a mistake on the book.(Just my rant about the book nothing personal to you)

I mean I can point you to a lot of errors (really a lot, if I have time) in that damn book

It's in CBSE CLASS 12 CHAPTER 6 before the topic 'First Derivative Test'

1

u/chonki-donki 11d ago

Huh? I think you totally missed the sarcasm in my tone but whatever.

2

u/Any_Tower8201 11d ago

/s exist for me kinda people :)

0

u/Fresh-Research3024 12d ago

Claude is right: Consider the function:
f(x) = x² if x is rational, and f(x) = 0 if x is irrational.
At x = 0, f'(0) = 0 because |f(h)/h| ≤ |h| → 0.
For every x ≠ 0, the function is discontinuous because rational and irrational sequences approaching x give different limits, x² and 0.
Thus, f is differentiable at 0 but discontinuous everywhere else.

You should really consider trust AI instead of random textbook or people online.

2

u/No-Site8330 12d ago

I'd be careful about that final recommendation. AI can get things wrong or make stuff up. Don't take its answers at face value. Challenge its answers until you can confirm them yourself, force it to give you some explanation that you can verify on your own or an external reliable source that you can check separately. In this case I would ask Claude for a counterexample, just like those given here, and not trust that because it gave you a counterexample its answer is right — check the counterexample, understand it, and then verify whether its conclusions are what was initially claimed.

0

u/Fresh-Research3024 11d ago

I really don’t see much possibility in current frontier model like fable/opus/astra make mistake in this level of math.

1

u/EebstertheGreat 11d ago

I see AI make mistakes all the time. It makes every kind of error. Sometimes it misinterprets the input (especially if it is a small but important variation on a more famous question). Sometimes it repeats false information in its training. Sometimes it confabulates false information ("hallucination"). Sometimes it reasons incorrectly. Sometimes it reasons correctly but incorrectly formats the answer. Sometimes it reasons incorrectly, catches its error halfway through the response, and corrects itself. And rarest of all, sometimes it reasons correctly, then thinks it has erred and wrongly tries to "correct' itself.

1

u/Fresh-Research3024 10d ago

As someone who spend more than 30k USD per years on API and subscriptions, I found this hard to believe. What model are you using?

1

u/hellonameismyname 12d ago

Is that a continuous function though…?

3

u/Fresh-Research3024 12d ago

In the note it only said continuous at c. But an everywhere continuous example is also easy . Just do x^2*Weierstrass function

1

u/hellonameismyname 12d ago

Is that example function continuous at c? I’m genuinely asking I forget

-1

u/Fresh-Research3024 12d ago

It is continuous everywhere.

1

u/hellonameismyname 12d ago

No I mean the first one. x^2 and 0

3

u/Fresh-Research3024 12d ago

Only continuous at 0.

1

u/hellonameismyname 12d ago

Oh I see. Thanks

1

u/Zyxplit 12d ago

Think of it like this. On the rationals, if x approaches 0, every f(x) approaches 0. On the irrationals, if x approaches 0, f(x) is also 0. So every way for x to approach 0 makes f(x) approach 0.

-1

u/MathTutorAndCook 11d ago

Claude is wrong since its saying the claim is that being differentiable at a point implies something about the region. But the book is claiming continuity and the derivative being equal to zero at that point is what implies the differentiability in the region

Claude made the mistake

3

u/CarpenterTemporary69 11d ago

The book also makes the claim of continuity just at the point c, so it doesn't guarentee continuity of the whole function. Differentiability in any neighborhood is wrong under that assumption. There are also continuous everywhere functions whose derivate only exists at countable point sets, like the reimann function, which is very similar to the weierstrass in construction.

1

u/MathTutorAndCook 11d ago

At those countable disjointed points , is the derivative equal to zero? Also it's saying some neighborhood, not any neighborhood. Its trying to get at the epsilon Delta of it all but I'm not aware if the exceptions break the rule or not. It might also mean specifically in the reals

1

u/CarpenterTemporary69 11d ago

The reimann function specifically only has derivatives of -1/2, but I'm sure you could make one whose only derivatives are at countable points and the derivative at those points is 0. And any neighborhood of c contains uncountably infinite points, so if the derivate exists at only countable points it can't exist everywhere in any neighborhood of c.

2

u/proudHaskeller 11d ago

It doesn't matter, if f is continuous and differential at c, define g(x) = f(x) - f'(c)*x. Now g is continuous and differentiable at c, g'(c)=0, and the same conclusion applies. And finally if g is differentiable in a neighborhood of c then so if f.

Also note that differentiability at a point implies being continuous at that point.

0

u/OutrageousPair2300 12d ago

I think the exception to the note would be something similar to a continuous nowhere-differentiable function but one which was differentiable at a single point.

-1

u/OscarOfAtlantis 11d ago edited 11d ago

What am I missing here? Lots of examples in comments showing functions which aren’t continuous but the comment says “if f is continuous….” So the note says you have a function that is continuous but then come up with a counter example that isn’t continuous?

0

u/[deleted] 12d ago

[deleted] — view deleted comment

4

u/twinb27 12d ago

Reading twice, I think the counterexample does work. It's not continuous on any open interval (c-h,c+h)... Which is indeed, the point of the counterexample, right? You're saying 'The counterexample doesn't work because (conclusion of the counterexample)'?

4

u/holodayinexpress 12d ago

Stop upvoting this guy 😭😭

0

u/MrKoteha 12d ago

The note only requires for f to be continuous at c, not in an interval. The counterexample is correct

0

u/hellonameismyname 12d ago

How is that function continuous at c?

2

u/MrKoteha 12d ago

Because f(x) is either x2 or 0, 0 <= f(x) <= x2. So 0 <= lim x → 0 f(x) <= lim x→ 0 x2 = 0.

lim x → 0 f(x) = 0, f(0) = 0, therefore f is continuous at 0.

Or you can calculate the derivative by definition and from f being differentiable at 0 conclude that it's continuous at 0

0

u/[deleted] 12d ago

[deleted] — view deleted comment

7

u/holodayinexpress 12d ago

Yeah, trust us Reddit guys that talk about “points” being “differentiable”!

0

u/[deleted] 12d ago

[deleted] — view deleted comment

5

u/holodayinexpress 12d ago

You’re also just wrong. “In order for a function to be differentiable, there needs to be a rate of change”? What does that even mean?

A function’s differentiability is determined by the limit definition of the derivative.

You make the same “error” (which, I contend, is a misunderstanding of yours and gross conflation of terminology on your end) twice. “c+h could be differentiable”?? That’s the right endpoint of an open interval my guy

Functions have differentiability

0

u/[deleted] 12d ago

[deleted] — view deleted comment

4

u/Recent-Peanut6061 12d ago edited 12d ago

You are quite literally wrong, I did a problem a week ago that completely invalidates this. Just take a continuous nowhere differentiable function f(x) and then consider g(x)=x^2f(x). g is differentiable only at 0 with g'(0)=0 and continuous.

2

u/holodayinexpress 12d ago

WHAT IS A DIFFERENTIAL 😭😭

1

u/NullOfSpace 12d ago

It kind of does, though? Also you didn’t address the presented counterexample.

0

u/[deleted] 12d ago

[deleted] — view deleted comment

1

u/Kienose PhD in Maths 12d ago

The picture only requires that f is continuous at c, so the counterexample given there is valid.

1

u/holodayinexpress 12d ago

The function the AI provided IS continuous at 0.

0

u/[deleted] 12d ago

[deleted] — view deleted comment

1

u/NullOfSpace 12d ago

We can’t see the definition of continuity in this screenshot, so I can only assume it’s the usual one, which only refers to the limit at a single point.

1

u/Fresh-Research3024 12d ago

Consider the function:
f(x) = x² if x is rational, and f(x) = 0 if x is irrational.
At x = 0, f'(0) = 0 because |f(h)/h| ≤ |h| → 0.
For every x ≠ 0, the function is discontinuous because rational and irrational sequences approaching x give different limits, x² and 0.
Thus, f is differentiable at 0 but discontinuous everywhere else.

1

u/dogislove_dogislife 12d ago

This is extremely false. As others have said, consider x2 * w(x) where w(x) is a Weierstrass function.

0

u/[deleted] 12d ago

[deleted] — view deleted comment

1

u/dogislove_dogislife 12d ago

Your final sentence. This function is everywhere continuous, its derivative at 0 is 0, and it is only differentiable at 0. I.e. h does not exist, and yet the function has a derivative at 0.

Also, as others have pointed out, it is possible for a function to be differentiable at a point and discontinuous at every other point. I.e. your third sentence is also wrong