Simple oscillator displacement, speed, and acceleration diagram I'm currently studying the textbook Fundamentals of Acoustics (2000) by Kinsler et al. Chapter 1.2 The Simple Oscillator says the following:

$$\dfrac{d^2 x}{dt^2} + \omega_0^2 x = 0 \tag{1.2.5}$$
This is an important linear differential equation whose general solution is well known and may be obtained by several methods.
One method is to assume a trial solution of the form
$$x = A_1 \cos(\gamma t) \tag{1.2.6}$$
Differentiation and substitution into (1.2.5) shows that this is a solution if $\gamma = \omega_0$. It may similarly be shown that
$$x = A_2 \sin(\omega_0 t) \tag{1.2.7}$$
is also a solution. The complete general solution is the sum of these two,
$$x = A_1 \cos(\omega_0 t) + A_2 \sin(\omega_0 t) \tag{1.2.8}$$
where $A_1$ and $A_2$ are arbitrary constants and the parameter $\omega_0$ is the natural angular frequency in radians per second (rad/s).

Chapter 1.3 Initial Conditions says the following:

If at time $t = 0$ the mass has an initial displacement $x_0$ and an initial speed $u_0$, then the arbitrary constants $A_1$ and $A_2$ are fixed by these initial conditions and the subsequent motion of the mass is completely determined. Direct substitution into (1.2.8) of $x = x_0$ at $t = 0$ will show that $A_1$ equals the initial displacement $x_0$.  Differentiation of (1.2.8) and substitution of the initial speed at $t = 0$ gives $u_0 = \omega_0 A_2$, and (1.2.8) becomes
$$x = x_0 \cos(\omega_0 t) + (u_0/\omega_0) \sin(\omega_0 t) \tag{1.3.1}$$
Another form of (1.2.8) may be obtained by letting $A_1 = A\cos(\phi)$ and $A_2 = -A\sin(\phi)$, where $A$ and $\phi$ are two new arbitrary constants. Substitution and simplification then gives
$$x = A\cos(\omega_0 t + \phi) \tag{1.3.2}$$
where $A$ is the amplitude of the motion and $\phi$ is the initial phase angle of the motion. The values of $A$ and $\phi$ are determined by the initial conditions and are
$$A = [x_0^2 + (u_0/\omega_0)^2]^{1/2} \ \ \ \ \ \ \text{and} \ \ \ \ \ \ \phi = \tan^{-1}(-u_0/\omega_0 x_0) \tag{1.3.3}$$
Successive differentiation of (1.3.2) shows that the speed of the mass is
$$u = -U \sin(\omega_0 t + \phi) \tag{1.3.4}$$
where $U = \omega_0 A$ is the speed amplitude, and the acceleration of the mass is
$$a = - \omega_0 U \cos(\omega_0 t + \phi) \tag{1.3.5}$$
In these forms it is seen that the displacement lags $90^\circ$ ($\pi/2$ rad) behind the speed and that the acceleration is $180^\circ$ ($\pi$ rad) out of phase with the displacement, as shown in Fig. 1.3.1.


(Arrows in figure 1.3.1 are mine.)
We can see from figure 1.3.1 that the displacement is out of phase with the acceleration by $\pi$ radians (green arrow), as stated, but it seems to me that, according to figure 1.3.1, displacement is actually $3\pi/2$ radians out of phase with speed (blue arrow), rather than the stated $\pi/2$ radians (red arrow). Is this an error, or am I misunderstanding this?
 A: Note that in the diagram below the velocity leads the displacement by $\dfrac \pi 2$ which is the same as the velocity lagging the displacement by $\dfrac{3\pi}{2}$.

So when mentioning phase it is important to state which two quantities are being compared, eg $A$ and $B$, and then whether there is a lead or lag between them, eg $A$ leads/lags $B$.
$A$ leading $B$ by $\phi$ is the same as $A$ lagging $B$ by $2\pi -\phi$.
A: Express displacement $x$, speed $u$, and acceleration $a$ via the same trigonometric function with positive amplitude:
$$x(t) = A \cos (\omega_0 t + \phi) = A \sin (\omega_0 t + \phi + \frac{\pi}{2})$$
$$u(t) = - \omega_0 A \sin(\omega_0 t + \phi) = \omega_0 A \sin(\omega_0 t + \phi + \pi)$$
$$a(t) = -\omega_0^2 A \cos(\omega_0 t + \phi) = \omega_0^2 A \sin(\omega_0 t + \phi - \frac{\pi}{2})$$
Note that if we used $\cos$ instead of $\sin$, the final result would have been the same.
From the three equations above, the phase difference of:

*

*acceleration to displacement is $-\frac{\pi}{2} - \frac{\pi}{2} = -\pi = \pi$

*acceleration to speed is $-\frac{\pi}{2} - \pi = -\frac{3\pi}{2} = \frac{\pi}{2}$

*displacement to speed is $\frac{\pi}{2} - \pi = -\frac{\pi}{2} = \frac{3\pi}{2}$
From the graph, by looking at positive to negative transition points, the phase difference of:

*

*acceleration to displacement is $\frac{3\pi}{2} - \frac{\pi}{2} = \pi = -\pi$

*acceleration to speed is $\frac{3\pi}{2} - 2\pi = -\frac{\pi}{2} = \frac{3\pi}{2}$

*displacement to speed is $\frac{\pi}{2} - 2\pi = -\frac{3\pi}{2} = \frac{\pi}{2}$
You can see that acceleration-speed phase difference for the two methods above is off by a factor $\pi$. (The same applies to the displacement-speed phase difference.) Note that I did this on purpose! The catch is in the convention you use, i.e. which angle comes first in the angle difference. It does not matter which convention you use as long as you stick to one convention! This means acceleration-speed phase difference of $\frac{\pi}{2}$ is valid only if displacement-speed phase difference is $-\frac{\pi}{2}$, which is also clear from the acceleration-displacement phase difference.
You can read the above results as follows:

*

*acceleration leads speed by $\frac{\pi}{2}$, or acceleration lags speed by $\frac{3\pi}{2} = -\frac{\pi}{2}$

*displacement leads speed by $\frac{3\pi}{2} = -\frac{\pi}{2}$, or displacement lags speed by $\frac{\pi}{2}$
To see this side-by-side, acceleration and displacement

*

*lead speed by $\frac{\pi}{2}$ and $-\frac{\pi}{2}$, respectively;

*lag speed by $-\frac{\pi}{2}$ and $\frac{\pi}{2}$, respectively.

