problem of maximum in physics Aa elastic ball with a mass $m_1$ is moving at the speed of $v$ and strikes a first elastic ball at rest.
The second ball, with a mass $m_2$ acquires a speed $v_2$ and strikes a third elastic ball at rest, with a mass $m_3$, giving it a speed $v_3$.
If the masses of the first and the third balls are fixed, find what mass should be the second ball in order to have the highest velocity for the third ball.
I've tried with the conservation of the momentum and kinetic energy.
$m_1* (v_{m1})^i=m_1* (v_{m1})^f+m_2* (v_{m2})^f+m_3* (v_{m3})^f$
$(v_{m1})^i=(v_{m1})^f+(v_{m2})^f+(v_{m3})^f$
but I'm afraid I'm lost

Suppose the first ball has speed $v^\prime$ after the first collision. We combine momentum conservation $m_1v=m_1v^\prime+m_2v_2$ with energy conservation (since the collision is elastic) $\tfrac12m_1v^2=\tfrac12m_1v^{\prime2}+\tfrac12m_2v_2^2$ to prove $v_2=\frac{2m_1v}{m_1+m_2}$ (I'll leave that as an exercise). By the same logic,$$v_3=\frac{2m_2v_2}{m_2+m_3}=\frac{4m_1m_2v}{(m_1+m_2)(m_2+m_3)}.$$So we choose $m_2$ to minimize$$\frac{(m_1+m_2)(m_2+m_3)}{m_2}=m_1+m_3+m_2+\frac{m_1m_3}{m_2}$$in terms of fixed $m_1,\,m_3$. By the AM-GM inequality, we take $m_2=\sqrt{m_1m_3}$.
