[Math] The sides of a right triangle are on the coordinate axes and its hypotenuse passes through the $(1,8)$ .how to minimize the length of the hypotenuse

calculus

Q: The sides of a right triangle are on the coordinate axes and its hypotenuse passes through the point $(1,8)$ . Find the vertices of this triangle such that the length of the hypotenuse is minimum

I've been having trouble setting up this problem.

Figure I made for the said question

At first, I thought I'd make $S$ into

$S= d_1 + d_2$

$d_1= \sqrt{(1-0)^2 + (8-y)^2}$

$\to d_1=\sqrt{y^2-16y+65}$

$d_2 = \sqrt{(1-x)^2+(8-0)^2}$

$\to d_2 = \sqrt{x^2-2x+65}$

$ \to S = \sqrt{y^2-16y+65} + \sqrt{x^2-2x+65}$

After this, I know that we find the derivative of S and minimize with that, but how do I relate $x$ & $y$ so that I can write
$y$ in terms of $x$ , since I think I first need to write S in terms of one variable.

Thanks for the help

Best Answer

the line passing through $(1,8)$ has equation

$y-8=m(x-1)\;\;y=mx-m+8$

which intersect $x-$axis at $\left(\dfrac{m-8}{m};\;0\right)$ and $y-$axis at $(0;\;8-m)$

Hypotenuse $h(m)=\sqrt{\left(\dfrac{m-8}{m}\right)^2+(8-m)^2}$

as square root is an increasing function, $h(m)$ will be minimum when

$r(m)=\left(\dfrac{m-8}{m}\right)^2+(8-m)^2=m^2+\dfrac{64}{m^2}-16 m-\dfrac{16}{m}+65$

will be minimum

$r'(m)=-\dfrac{128}{m^3}+\dfrac{16}{m^2}+2 m-16=\dfrac{2 \left(m^4-8 m^3+8 m-64\right)}{m^3}$

$m^4-8 m^3+8 m-64=0\to (m-8) (m^3-8) =0$

$m=8$ gives hypotenuse $h(8)=0$ which makes no sense

$m^3=8\to m=2$ gives $h(2)=3 \sqrt{5}$ which is the minimum we were looking for

indeed second derivative is $r''(m)=\dfrac{2 \left(m^4-16 m+192\right)}{m^4}$ and $r''(2)=22>0$

it is positive at $m=2$ so it is a minimum

hope this helps