I have a confusion about the wave function of a travelling wave. Suppose we have a wave function of a travelling wave travelling towards the positive direction of x axis
$$ u(x,t)=A\cos\left(\omega(t-\frac{x}{v})+\phi_0\right) $$
where $v$ is the velocity of the wave, $\omega$ is the angular velocity, $\phi_0$ is the initial phase.
Consider $u$ as the displacement of a particle in $y$ direction perpendicular to the $x$ direction, that is, a longitudinal wave.
In the textbook, the above wave function is derived by first considering a particle oscillating at $x=0$ with an oscillation function:
$$ u(0,t)=A\cos(\omega t+\phi_0) $$
then when the oscillation spreads towards the positive $x$ direction, it takes the oscillation a time $x'/v$ to arrive at $x'$. then the oscillation at $x'$ is a time $x'/v$ behind that at $x=0$, so we have $\omega(t-x'/v)+\phi_0$ as the phase of the oscillation at $x'$ with respect to $x=0$.
My question is, for the oscillation of $x'$ at time $t=x'/v$ (just at the time the wave arrived at $x$), according to the wave function, the displacement should be:
$$ u(x',x'/v)=A\cos(\phi_0) $$
But since the wave has just been arrived, the starting point for the particle should be its equilibrium point, with $u(x',x'/v)=0$ in this case. So is there a contradiction? Would anyone please give me some instruction?