So my calculus book gives me

,

and

.

I have to differentiate

and

.

So, for the first one, I would take to be and get

but it says it should be

.

I don't understand how this works.

Also for the second one they get

,

and using the principle that I learned from the first one it makes sense except that the secant should not be squared.