Original
You travel the distance from {{MATH_180}} to {{MATH_181}} at speed {{MATH_182}}, and then the
distance from {{MATH_183}} to {{MATH_184}} at speed {{MATH_185}}. The distance from {{MATH_186}} to {{MATH_187}}
is {{MATH_188}}. By the Pythagorean theorem, the distance from {{MATH_189}} to {{MATH_190}}
is
{{MATH_191}}
Hence the total time for the trip is
{{MATH_192}}
We want to find the minimum value of {{MATH_193}} when {{MATH_194}} is between 0 and
{{MATH_195}}. As usual we set {{MATH_196}} and solve for {{MATH_197}}. Write
{{MATH_198}}
We find that
{{MATH_199}}
Notice that {{MATH_200}} does not appear in the last expression, but {{MATH_201}} is not
irrelevant, since we are interested only in critical values that are
in {{MATH_202}}, and {{MATH_203}} is either in this interval or not.
If it is, we can use the second derivative to test it:
{{MATH_204}}
Since this is always positive there is a local minimum at the critical
point, and so it is a global minimum as well.