there is a whole book “counterexamples in analysis”, basically for each theorem they find why every condition is required. these functions and ideas based on them are indispensable.
this weierstrass function is definitely a mind bender I remember from high school.
I don’t know if they are the same books as the names are quite generic, but i picked up both this one and the topology book sibling suggested at the library during my undergrad, and read both cover to cover. Both slim books and very clear.
My favorite counterexamples in analysis were based on the cantor set as it allowed counerexamples for many different scenarios while still producing functions that were “nice” in other respects
this weierstrass function is definitely a mind bender I remember from high school.