Let the initial height be \(h_0 = 42\) m.
The coefficient of restitution is \(e = 0.4\).
The height of the nth rebound, \(h_n\), is related to the previous height \(h_{n-1}\) by \(h_n = e^2 h_{n-1}\).
The ball first falls a distance of \(h_0\).
After the first bounce, it rises to a height \(h_1 = e^2 h_0\) and then falls the same distance.
After the second bounce, it rises to a height \(h_2 = e^2 h_1 = e^4 h_0\) and falls the same distance.
This continues until the ball comes to rest.
The total distance travelled is the sum of the initial fall and the distances for all subsequent bounces (up and down).
Total distance \(D = h_0 + 2h_1 + 2h_2 + 2h_3 + \dots \).
\(D = h_0 + 2(e^2 h_0 + e^4 h_0 + e^6 h_0 + \dots)\).
The term in the parenthesis is an infinite geometric series with first term \(a = e^2 h_0\) and common ratio \(r = e^2\).
The sum of this series is \( S = \frac{a}{1-r} = \frac{e^2 h_0}{1-e^2} \).
So, the total distance is \(D = h_0 + 2 \left(\frac{e^2 h_0}{1-e^2}\right) = h_0 \left(1 + \frac{2e^2}{1-e^2}\right)\).
\(D = h_0 \left(\frac{1-e^2+2e^2}{1-e^2}\right) = h_0 \left(\frac{1+e^2}{1-e^2}\right)\).
Now, substitute the given values: \(h_0 = 42\) m and \(e = 0.4\).
\(e^2 = (0.4)^2 = 0.16\).
\(D = 42 \left(\frac{1+0.16}{1-0.16}\right) = 42 \left(\frac{1.16}{0.84}\right)\).
\(D = 42 \times \frac{116}{84} = \frac{1}{2} \times 116 = 58\) m.