I'm doing a bunch of analysis problems and have come across this one.

I feel quite dumb for this, I'm sure this is a 16-year old teenager level basic calculus problem but can't for the life of me remember how to actually formulate the problem.

I have a triangle within a circle (which I'm calling C) of radius 1 which can be seen in the following diagram.

The angle TSP is a right angle.

What is the maximum of the sum of the lengths TS and SP? Presumably, the points S and T can move about providing S stays on the diametre and T stays on the "rim" of the circle and the angle remains as a right angle.

Ie: Find max(TS+SP).

My instinct tells me I need to formulate this into a problem featuring something I can differentiate. Then I just find where the derivative equals zero and go from there, like I said; basic calculus principles. But I'm not even sure how to formulate it into an equation.

Thanks in advance for any assistance y'all can provide.