I'm wondering if there is a smart way of solving the system of equations
$$\frac{d\vec{n}}{dt} = \gamma (\vec{n} \times \vec{B}(t)),$$
where $\vec{n}(t) = \big(x(t),y(t),z(t) \big)$ is the Bloch vector and $\vec{B}(t) = (B_1\cos\omega t, B_1 \sin \omega t, B_2)$ is the external magnetic field.
By smart I mean faster than just writing it down in matrix form and using methods for solving a system of homogeneous linear equations with variable coefficients. I'm looking for some sort of reference where such a solution is shown.
I can suggest a simple way which is not without equations, but it is with very simple equations. It goes as follows:
You can rotate your system of axes by $\omega t$ around the axis $z$, then by an angle $\theta = arctg(B_1/B_2)$ so as to lay your vector $\vec {B(t)}$ over a new axis $z'$ ? You will get a vector constant in time, of length $B = \sqrt {B_1^2 + B_2^2}$.
In the new axes $x', y', z'$ the system of equations will become
$\frac {d\ n_{x'}}{dt} = \gamma B \ n_{y'}$
$\frac {d\ n_{y'}}{dt} = -\gamma B \ n_{x'}$
and the solution is immediate,
(1) $n_{x'} = cos(\gamma B t)$,$ \ \ \ n_{y'} = -sin(\gamma B t)$.
Whatever is left after this is to reverse the two rotations, i.e. first rotate back around the axis $y'$ by $-\theta$, then, as the axis $z'$ is laid back on $z$, rotate by $-\omega t$ around the axis $z$ for which you have the rotation matrices.