# Integrating velocity over space graph to get time

Given the following graph, where the y-axis is velocity (m/s) and the x-axis is space (m):

$$v(s) = \begin{cases} \sqrt{5s} & s < 20 \\ 10 & s \geq 20 \end{cases}$$

The question is about how much time the body needs to move the first 100 meters.

From 20 to 100 meters it needs 8 seconds. But I'm not sure how to solve the square root part. How can it be solved by integration?

-
Hint: We have $$\frac{ds}{dt}=\sqrt{5s}.$$ This is a separable differential equation. Rewrite as $$\frac{ds}{\sqrt{5s}}=dt$$ and integrate. Remember to use the initial condition to evaluate the constant of integration.