# 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?

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

• Hint: parameterize them both by the slope of the hypotenuse. – amd Aug 16 '17 at 21:37
• I tried that , but there is some mistake when I look at it in a graphing program. Just to check, does it become $y=\frac{8x}{(x-1)}$ ? – Dahen Aug 16 '17 at 21:42
• You should not indicate answer (5,10) intercepts in the sketch already – Narasimham Aug 16 '17 at 23:18
• that's just a simple sketch I made in desmos, I know that the answer is not (5,10) but it's just more of a way to visualize the question – Dahen Aug 16 '17 at 23:20

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

• thanks , it really does, the thing I almost tried the same method but this is much better, what I'm working with right now is a nightmare haha – Dahen Aug 16 '17 at 22:50
• $m$ should be $- 2,$ no? – Narasimham Aug 16 '17 at 23:21
• @Narasimham yeah I noticed that too, using $-2$ gives a smaller result, but I cant tell how got $(m^3-8)$ instead of $(m^3+8)$ – Dahen Aug 16 '17 at 23:24

Hint...let the angle between the line and the $x$ axis be $\theta$ so that the length of the line is $$8\csc\theta+\sec\theta$$ which differentiates nicely...

• doesn't that add another problem though? the line should also pass $(1,8)$ , does that equation make it so that the line passes that point as well? – Dahen Aug 16 '17 at 21:44
• Application of simple trigonometry gives the length of the green line as $$\color{red}{8}\csc\theta+\color{red}{1}\sec\theta$$ – David Quinn Aug 16 '17 at 21:57
• ohh okay thanks, didnt notice that. – Dahen Aug 16 '17 at 21:58

Giving method of Lagrange Multiplier solution very briefly.

Let the equation of straight line be

$$\frac{x}{a}+\frac{y}{b}=1 \tag1$$

Satisfies $(1,8)$ so plugging in this point,we get constraint $f(a,b)$

$$8a+b -a\,b =0 = f(a,b), say \tag2$$

$$\frac{f_a}{f_b}=\frac{8-b}{1-a} \tag3$$

Next object function length

$$g(a,b) =\sqrt{a^2+b^2}\tag4$$

$$\frac{g_a}{g_b}=\frac{a}{b} \tag5$$

(on simplifying)

Next Lagrangian $$f(a,b)- \lambda g(a,b) \tag6$$

needs the above two quotients.

$$\frac{f_a}{f_b}= \frac{g_a}{g_b}= \lambda \tag7$$

Solving (2), (7) we get intercepts:

$$(a,b)=(5,10) \tag8$$