According to my physics textbook, the formula of kinetic energy is:
$$ W = \frac{1}{2}mv^2 $$
Where $m$ is is mass of the object and $v$ is the velocity of the object. The equation is calculated from this (according to that book as well): ($a$ is acceleration, $s$ is displacement, $t$ is time and $F$ is force whose value is $ma$)
$$ \begin{align} W &= Fs \\ &= mas \\ &= ma \cdot \frac{1}{2}at^2 \end{align} $$
Here comes the problem. According to that book: ($u$ is initial velocity)
$$ s = ut+\frac{1}{2}at^2 $$
But in the equation of kinetic energy, $s$ is replaced by $\frac{1}{2}at^2$, which is only possible when the initial velocity ($u$) is zero ($s = ut+\frac{1}{2}at^2 = 0t+\frac{1}{2}at^2 = \frac{1}{2}at^2$). Why the initial velocity is assumed to be zero here? What if the object has a non-zero initial velocity?