Assuming that your v(t) is a velocity, then you have got it right:

To find a distance, which is the magnitude of the velocity:

where |v(t)| is the magnitude of the velocity, in this case the absolute value of the velocity function. Here are the two relevant graphs.

-Dan