$\def \b {\mathbf}$
Start with the Position vector $~\b P$
\begin{align*}
&\b P=\b S\,\b R\tag 1
\end{align*}
where $~\b S=\b S_z(\psi)\,\b S_y(\theta)\,\,\b S_x(\phi)~$ is the rotation matrix and $~\psi,\theta,\phi~$ are the
yaw, pitch , roll angles
the acceleration
\begin{align*}
&\b{\ddot{P}}=\b{\ddot{ S}}\,\b R\quad\text{with}\quad
\b{\dot{S}}=\left[ \begin {array}{ccc} 0&-\omega_{{z}}&\omega_{{y}}
\\ \omega_{{z}}&0&-\omega_{{x}}\\
-\omega_{{y}}&\omega_{{x}}&0\end {array} \right]
\b S
\end{align*}
\begin{align*}
&\b{\ddot{P}}=\left[ \begin {array}{ccc} 0&-\omega_{{z}}&\omega_{{y}}
\\ \omega_{{z}}&0&-\omega_{{x}}\\
-\omega_{{y}}&\omega_{{x}}&0\end {array} \right]
\,\left[ \begin {array}{ccc} 0&-\omega_{{z}}&\omega_{{y}}
\\ \omega_{{z}}&0&-\omega_{{x}}\\
-\omega_{{y}}&\omega_{{x}}&0\end {array} \right]
\b S(\psi,\theta,\phi)\,\b R\tag 2
\end{align*}
to solve equation (2) you need additional equation which is:
\begin{align*}
\begin{bmatrix}
\dot{\psi} \\
\dot{\theta} \\
\dot{\phi} \\
\end{bmatrix}= \left[ \begin {array}{ccc} {\frac {\cos \left( \psi \right) \sin
\left( \theta \right) }{\cos \left( \theta \right) }}&{\frac {\sin
\left( \psi \right) \sin \left( \theta \right) }{\cos \left( \theta
\right) }}&1\\ -\sin \left( \psi \right) &\cos
\left( \psi \right) &0\\ {\frac {\cos \left( \psi
\right) }{\cos \left( \theta \right) }}&{\frac {\sin \left( \psi
\right) }{\cos \left( \theta \right) }}&0\end {array} \right]
\,\begin{bmatrix}
\omega_x \\
\omega_y \\
\omega_z \\
\end{bmatrix}
\end{align*}
for small angles
\begin{align*}
\b S&\mapsto \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}
+\begin{bmatrix}
0 & -\psi & \theta \\
\psi & 0 & -\phi \\
-\theta & \phi &0 \\
\end{bmatrix}\quad,
\begin{bmatrix}
\dot{\phi} \\
\dot{\theta} \\
\dot{\psi} \\
\end{bmatrix}\mapsto\begin{bmatrix}
\omega_x \\
\omega_y \\
\omega_z \\
\end{bmatrix} \quad\Rightarrow\\
& \begin{bmatrix}
{\phi} \\
{\theta} \\
{\psi} \\
\end{bmatrix} = \begin{bmatrix}
\omega_x \\
\omega_y \\
\omega_z \\
\end{bmatrix} \,t+\begin{bmatrix}
{\phi_0} \\
{\theta_0} \\
{\psi_0} \\
\end{bmatrix}
\end{align*}
thus you obtain analytical solution for equation (2)