3. (physics) A wire is made into a right-angled triangle with legs of length $l=1$ m. From vertices A and B, two bugs start crawling along the legs simultaneously with speeds $v_{A}=5$ cm/s and $v_{B}=2 v_{A}=10$ cm/s (see figure). What is the minimum time after the start of their movement when the distance between the bugs reaches a minimum?

![](https://cdn.mathpix.com/cropped/2024_05_06_25c5d6100f66704b4a85g-2.jpg?height=354&width=354&top_left_y=1770&top_left_x=1545)
Solution. Let the time that has passed since the beetles started moving be $t$. Then beetle

A will travel a distance of $v_{A} t$, beetle B - a distance of $v_{B} t=2 v_{A} t$. Therefore, the distance $S$ between the beetles at this moment will be

$$
S=\sqrt{\left(l-v_{A} t\right)^{2}+4 v_{A}^{2} t^{2}}
$$

We will find the minimum value of $S$ as a function of time. For this, we will differentiate the function $S(t)$, set the derivative to zero, and solve the resulting equation. Moreover, it is technically more convenient to differentiate $S^{2}$ rather than $S$, as the expressions will be much simpler, and both $S$ and $S^{2}$ reach their maximum at the same value of the argument. Thus,

$$
\left(S^{2}\right)^{\prime}=-2\left(l-v_{A} t\right) v_{A}+8 v_{A}^{2} t
$$

Setting the derivative (**) to zero, we get an equation for the time that has passed from the start of the movement until the moment when the distance between the beetles is the smallest

$$
l-v_{A} t=4 v_{A} t
$$

From which

$$
t=\frac{l}{5 v_{A}}=4 \mathrm{~s}
$$