For us to calculate distance, we need to calculate displacement from the position time function of the particle. When a particle moves without changing its direction of motion, distance travelled is equal to the magnitude of displacement.
Using this, we will calculate if particle has changed its direction in the time interval 0 to 6 s and correspondingly calculate the distance from the displacement.
In order to check for direction of motion, velocity is considered.
x(t)=3+6t−t2
v=dxdt=6−2t=0
t=3 s
Velocity is positive before t=3 s and negative after that. Hence body changes its direction of motion, it starts coming back. In such cases displacement starts decreasing, but distance goes on increasing.
Distance (t=0 to t=6 s)
=|Displacement(t=0 to t=3 s)|+|Displacement(t=3 s to t=6 s)|
=|(x3−x0)|+|(x6−x3)|
=|(12)−(3)|+|(3−12)|
=|9|+|−9|
=18 m