TITLE: Solving the "Spider and Fly problem" using calculus
QUESTION [6 upvotes]: As part of my homework I've the following problem:
Find the shortest path from corner $S$ to corner $F$ (the spider should walk on the surface). 

I have to use calculus to solve the problem (more specifically using the absolute min/max theorems).
I'm struggling to come up with a "primary function" to derive and apply the absolute max/min theorems.
My guess is that i have to find the shortest path from corner $S$ to the end of the common edge (between the planes) and add to that the shortest path from that edge the corner $F$, but i'm unable to construct appropriate function (should i use the distance formula?).
Thanks.

REPLY [8 votes]: HINT
Imagine that the cube "unfolds" and you have yourself a $2D$-problem, where the shortest path is a line.
The distance that it will have to travel then, will be the diagonal of an orthogonal parallelogram of sides $2$ and $1$, since the length of the side of the originbal cube is equal to $1$.