Given the task: Through the point $M(1,3)$, draw a straight line so that it cuts off in the first quadrant a rectangular triangle having a smaller hypotenuse.
I reasoned so: Equation of a line is expressed as $A(x-1)+B(y-3)=0$, $A \ne 0$ and $B \ne 0$, this a hypotenuse.
And, this hypotenuse $\cap Oy = I(0; y^{*})$ and $\cap Ox = J(x^{*}; 0)$. I don't know $x^{*}$ and $y^{*}$, but I know that I need to find a $\min{x^2+y^2}$.
How do I do this using differential calculus?