# Solving the “Spider and Fly problem” using calculus

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.

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

No. The shortest path is not the sum of the shortest paths to the edge. If the spider insists on walking along the shortest path from the spider to the edge, and then along the shortest path from the edge to the fly, it will have to walk some additional distance along the edge to do that (resulting in a total distance of 3).

Instead the spider walks towards the edge diagonally, and travels a distance $\sqrt{1+d^2}$ (Pythagoras) by the time it reaches the edge, and then it travels a further distance of $\sqrt{1+(1-d)^2}$ to get to the fly.

So you should minimize $$\sqrt{1+d^2}+\sqrt{1+(1-d)^2}$$

• where $\sqrt{1+(1-d)^2}$ comes from? – Hanan N. May 9 '16 at 16:20
• Also Pythagoras - see edited image – Wouter May 9 '16 at 16:41

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$.

• +1 Not strictly an answer, since the OP says "I have to use calculus", but I think restrictions like that are silly! – almagest May 9 '16 at 9:11
• @almagest haha Thanks for the upvote! Well, I do hope that intuitively it will also help with the calculus part. (Restrictions when solving a problem? Unheard of!) – MathematicianByMistake May 9 '16 at 9:16