WAVE VELOCITY AND PARTICLE VELOCITY
Consider a pulse with a very small amplitude traveling in the positive x-direction along a stretched string. Due to the minimal amplitude, damping can be disregarded, and it is assumed that all particles exhibit simple harmonic motion (SHM) with identical amplitude and time period. In the absence of damping, the pulse maintains its shape while moving to the right without any contraction. Consequently, the velocity of each point on the pulse in the positive x-direction remains constant, indicating that the wave velocity c is uniform throughout the pulse.
The pulse shape at time t (dotted) and at time t+dt is illustrated. As the pulse shifts to the right, every "point" on the pulse moves by a distance of $\partial x$. Each "particle on the pulse" experiences a small oscillation in the y direction. The displacement of the particle at point P on the pulse from time t to t+dt is $\partial y$. In this example, both $\partial x$ and $\partial y$ are positive.
The particle velocity v at P and wave velocity c are given by $v=\frac{\partial y}{\partial t}$ and $c=\frac{\partial x}{\partial t}$
It is important to note that in the shown case :
(a)$\frac{\partial y}{\partial t}$implies ratio of small change in y with small change in t at constant x. That is $\partial y=PQ$and positive
(b)$\frac{\partial x}{\partial t}$implies ratio of small change in x with small change in t at constant y. That is $\partial x=PS$ and positive
(c) $\frac{\partial y}{\partial x}$implies ratio of small change in y with small change in x at constant t. That is $\frac{\partial y}{\partial x}$= slope of segment SP which is negative.
Now we have a strange scenario that $\frac{\frac{\partial y}{\partial t}}{\frac{\partial x}{\partial t}}=-\frac{\partial y}{\partial x}$ or $v=-c\frac{\partial y}{\partial x}$. Can we write like that? Let us take a legal route to prove the relation $v=-c\frac{\partial y}{\partial x}$.
The initial shape of the pulse is represented by the equation $y=f(x)$ at time $t=0$. As time progresses, specifically at time $t$, the pulse shifts to the right by a distance of $ct$. Therefore, the equation describing the shape of the curve at any time $t$ can be expressed as
$$y(x,t)=f(x-ct)$$
Note $y(x,t)$ gives the displacement of any particle (whose mean position is given by x- coordinate) along the y-axis. Let $u=x-ct$. We can get $\frac{\partial u}{\partial x}=1$ and $\frac{\partial u}{\partial t}=-c$
From Chain rule $\frac{\partial y}{\partial x}=\frac{\partial y}{\partial u}\frac{\partial u}{\partial x}$ and $\frac{\partial y}{\partial t}=\frac{\partial y}{\partial u}\frac{\partial u}{\partial t}$. Or $\frac{\partial y}{\partial x}=\frac{\partial y}{\partial u}1$ and $\frac{\partial y}{\partial t}=\frac{\partial y}{\partial u}(-c)$.
From both equations we get an important relation
$$\frac{\partial y}{\partial t}=-c\frac{\partial y}{\partial x} \tag{1}$$
The above relation can be used to find particle velocity. Wave velocity c is taken positive for wave moving in positive x-direction, and negative for wave moving in negative x-direction. The positive sign of$\frac{\partial y}{\partial t}$ implies particle velocity is in positive y-direction and negative sign of $\frac{\partial y}{\partial t}$ implies particle velocity is in negative x-direction.
WAVE EQUATION
From Equation 1 we can write
$\frac{\partial }{\partial t}\left( \frac{\partial y}{\partial t} \right)=\frac{\partial }{\partial t}\left( -c\frac{\partial y}{\partial x} \right)$ or $\frac{{{\partial }^{2}}y}{\partial {{t}^{2}}}=-c\frac{\partial }{\partial t}\left( \frac{\partial y}{\partial x} \right)=-c\frac{\partial }{\partial x}\left( \frac{\partial y}{\partial t} \right)={{c}^{2}}\frac{{{\partial }^{2}}y}{\partial {{x}^{2}}}$
Hence get the wave equation expression as
$$\frac{{{\partial }^{2}}y}{\partial {{t}^{2}}}={{c}^{2}}\frac{{{\partial }^{2}}y}{\partial {{x}^{2}}} \tag{2}$$