Very basic question.
Please show where I'm wrong in the following reasoning.
The movement of an object in function of time could be described as $$ x(t) = v t + x_{i} $$ if velocity is constant.
If velocity is not constant then $$ x(t) = v(t)\cdot t + x_{i} $$ where $$ v(t) = a t + v_{i} $$ with a being constant.
Now if I substitute $v(t)$ in $x(t)$ it results $$ x(t) = at^2 + v_it + x_i $$
But the general equation for an accelerated object is $$ x(t) = \frac{1}{2}at^2 + v_it + x_i $$
Where does the $\frac{1}{2}$ come from?