# How to find the least path consisting of the segments AP, PQ and QB

Let $A = (0, 1)$ and $B = (2, 0)$ in the plane. Let $O$ be the origin and $C = (2, 1)$ . Consider $P$ moves on the segment $OB$ and $Q$ move on the segment $AC$.

Find the coordinates of $P$ and $Q$ for which the length of the path consisting of the segments $AP, PQ$ and Q$B$ is least.

Hint: Let $A'$ be the point one unit above $A$.
Let $B'$ be the point one unit below $B$.
Join $A'$ and $B'$ by a straight line. Show that gives the length of the minimal path.
If you draw it, $ACBO$ is a rectangle, and the path $APQB$ is a zig-zag. Reflect the $PQB$ part to the line $OB$ ($P$ and $B$ stays, $Q$ goes to $Q'$, say), and let $AC$ go to $A'C'$ by this reflection, a horizontal subsegment of $y=-1$. Reflect $Q'B$ to this new $A'C'$ line, taking $B$ to $B'$. Drawn?
Then $AP+PQ+QB = AP+PQ'+Q'B'$, and this is clearly minimal iff it is straight $A-B'$. That is the $P$ and $Q$ points are at one and two third parts of the original segments.