Why the point of a ramp function where its derivative doesn't exist is not taken into account?
Mathematically you describe the triangle wave as a series of line segments (hopefully you saw this in the Caltec course).

Electrically a triangle wave is synthesized by integrating a square wave, possibly by using a switchable current source driving a capacitor.  If you look closely at the output of a typical analog function generator, you'll notice that the points of the triangle waves aren't perfect -- they're either rounded, or they contain spikes, or they have "hiccups", etc.

In a real electronic circuit, you cant get perfect points on the triangle wave.  Circuits can't act infinitely fast, so at some scale the peaks of the triangle wave (even if it has hiccups or spikes) will be continuous and rounded.  We model the output of the triangle wave generator as a mathematically perfect triangle wave when we can get away with it, because trying to describe just how it might be rounded, and what's going on in that teeny interval where it is rounded, gets very messy and complicated.  If we can approximate the thing by the mathematical ideal without losing much accuracy in the answer we want, that's what we do.

This is, by the way, what we do in pretty much all of engineering and science.  The universe is infinitely complicated.  If you want to know how many equations you need to exactly describe the behavior of your signal generator + oscilloscope, count the electrons and then multiply by 2 -- and that leaves out a bunch of very real protons and neutrons, and an infinite number of virtual particles.  So the first step to solving any problem -- often so early that it's not stated -- is to say "how can I simplify this to the point where I can solve it before I die of old age?"