This Integral: $\int_\limits{0}^x\lvert{v(t)}\rvert dt$ I know this integral gives the following

Distance is equal to $\int_\limits{a}^b\lvert{v(t)}\rvert dt$

I was wondering what would the following mean:
$$\int_\limits{0}^x\lvert{v(t)}\rvert dt$$
My thought was that it would give the distance over an interval, but I graphed one and I was returned with negative values, any thoughts what it would mean?
 I assume then that it has to be for values greater than 0 right for it to represent distance right?
 A: It simply means the total distance traveled from time equals $0$ to time equals $x$ ($x$ should be a positive number or zero if the situation is to make any physical sense). But in general you can't get a closed-form expression for $\int_{0}^{x}|v(t)|\,dt$ because the intervals on which $v(t)$ is positive or negative totally depends on the nature of $v(t)$ which is going to be different for different expressions. That integral is exactly the same as the integral $\int_{a}^{b}|v(t)|\,dt$ with $0$ used for $a$ and $x$ for $b$.
Suppose our position function is given by this expression:
$$s(t)=-t^2+4t\ m,\ t\in[0,4]$$
Its velocity function is going to be this:
$$v(t)=\frac{ds}{dt}=-2t+4\ m/s$$
$|v(t)|$ over the entire time period $t\in[0,4]$ is equivalent to $v(t)=-2t+4\ m/s$ for $t\in[0,2]$ and $v(t)=-(-2t+4)=2t-4\ m/s$ for $t\in[2,4]$ because on $t\in[0,2]$ $v(t)$ is positive and on $t\in[2,4]$ it's negative. Therefore, the total distance traveled over the entire time period is going to be this:
$$
\int_{0}^{4}|v(t)|\,dt=
\int_{0}^{2}(-2t+4)\,dt+\int_{2}^{4}(2t-4)\,dt\ m
$$
If I were to choose a general time $x$, the way my integral looks would depend on which interval $x$ falls in. If $x$ is between $0$ and $2$, then the total distance traveled would be given by this integral:
$$\int_{0}^{x}|v(t)|\,dt=\int_{0}^{x}(-2t+4)\,dt=\left[-t^2+4t\right]_{0}^{x}=-x^2+4x\ m,\ x\in[0,2]$$
If $x$ is between $2$ and $4$:
$$\int_{2}^{x}|v(t)|\,dt=\int_{2}^{x}(2t-4)\,dt=\left[t^2-4t\right]_{2}^{x}=x^2-4x-4\ m,\ x\in[2,4]$$
If $x$ is between $0$ and $4$, then again I would end up with two integrals: one for the interval where the function is positive and the other one for the interval where the function is negative. And that's pretty much all you can do. I hope you get the idea.
A: Let $\Delta s$ denote the distance traveled in the time span $t_2-t_1$ regardless of the direction of movement.
$$\Delta s=\int_{t_1}^{t_2}|v(t)|dt$$
Negative time $t_1$ or $t_2$ is not allowed in this formula.
$$\Delta s_1=\int_{0}^{x}|v(t)|dt$$
$\Delta s_1$ is the distance traveled in the time span $t_2-t_1$ regardless of the direction of movement, with $t_2=x$ and $t_1=0$.
