We mostly do not worry about deriving these each time. That's why they're memorized or looked up if needed. You can use the triangle to derive the derivative of arctan.

Differentiate the right equation implicitly:

.........[1]

It follows from the triangle that:

And so, from [1], we have