Given : m = 2 kg, E = 40 J
The speed of the body while crossing the centre of the path (mean position) is vmax and the total energy is entirely kinetic energy.
\(\frac{1}{2}\)mv2max = E
∴ vmax = \(\sqrt{\frac{2E}{m}}= \sqrt{\frac{2×40}{2}}\) = 6.324 m/s