# Relationship between centripetal and angular acceleration?

Regarding circular motion...

The way that I know of how to derive the centripetal acceleration is based on the geometrical representation of two instantaneous linear velocities of equal magnitudes on a circle, and comparing the triangles to obtain the relationship $a = \frac{v^2}{r}.$

However, I've seen it stated in the textbook that this formula still holds even when there is angular acceleration and hence the magnitude of both angular and linear velocity are not constant.

My question is, wouldn't the change in magnitude of the linear velocity in subsequent instances render the formula for centripetal acceleration inaccurate under these circumstances, as the derivation above relies on the magnitudes being the same? Or do the shape of the triangles still retain similar relationships, thus $a = \frac{v^2}{r}$ still hold?