Analytical expression of V(2,0) for rotating crystal in VAS and MAS NMR
The first-order quadrupole interaction is related to V(2,0):

In VAS (MAS) NMR experiments, V(2,0) is defined by:

with
The final expression of V(2,0) in VAS (MAS) is:

The analytical expressions of a0, an, and bn coefficients can be determined as follows:
(1) Select and copy the following green lines; then paste them into a cell of Mathematica, a software for numerical and symbolic calculations.
(2) Press "Ctrl-A" for select all; then
press "Shift-enter" for evaluate cells.
(Or in the menu bar, select Kernel > Evaluation > Evaluate Cells)
Using Mathematica-5 running with a 3-GHz processor, some spelling error messages followed by the analytical expression of coefficients involved in V(2,0) for VAS and MAS NMR are obtained in 15 seconds.
(* D2 is a reduced form (5 rows x 3 columns) of the 2-nd order
Wigner active rotation matrix *)
D2 = {
{ (1 + Cos[beta])^2*E^(-I*(2*alpha + 2*gamma))/4,
-(1 + Cos[beta])*Sin[beta]*E^(-I*(2*alpha + gamma))/2,
Sqrt[3/8]*Sin[beta]^2*E^(-2*I*alpha),
-(1 - Cos[beta])*Sin[beta]*E^(-I*(2*alpha - gamma))/2,
(1 - Cos[beta])^2*E^(-I*(2*alpha - 2*gamma))/4},
{ Sqrt[3/8]*Sin[beta]^2*E^(-2*I*gamma),
Sqrt[3/8]*Sin[2*beta]*E^(-I*gamma),
(-1 + 3*Cos[beta]^2)/2,
-Sqrt[3/8]*Sin[2*beta]*E^(I*gamma),
Sqrt[3/8]*Sin[beta]^2*E^(2*I*gamma)},
{ (1 - Cos[beta])^2*E^(I*(2*alpha - 2*gamma))/4,
(1 - Cos[beta])*Sin[beta]*E^(I*(2*alpha - gamma))/2,
Sqrt[3/8]*Sin[beta]^2*E^(2*I*alpha),
(1 + Cos[beta])*Sin[beta]*E^(I*(2*alpha + gamma))/2,
(1 + Cos[beta])^2*E^(I*(2*alpha + 2*gamma))/4}
};
MatrixForm[D2];
(* V2pas is a row-matrix with 3 columns
containing the 3 nonzero eigenvalues of the EFG
expressed as a 2-nd rang spherical tensor, in eq unit *)
V2pas = {{eta/2, Sqrt[3/2], eta/2}};
MatrixForm[V2pas];
(* V2k is a row-matrix with 5 columns *)
V2k = V2pas.ComplexExpand[D2];
(* D2VAS is a reduced form (5 rows x 1 column) of the 2-nd order
Wigner active rotation matrix *)
D2VAS = {
{Sqrt[3/8]*Sin[thetaVAS]^2*E^(-2*I*rot*t)},
{-Sqrt[3/8]*Sin[2*thetaVAS]*E^(-I*rot*t)},
{(-1 + 3*Cos[thetaVAS]^2)/2},
{Sqrt[3/8]*Sin[2*thetaVAS]*E^(I*rot*t)},
{Sqrt[3/8]*Sin[thetaVAS]^2*E^(2*I*rot*t)}
};
MatrixForm[D2VAS];
(* V20vas is an expression *)
V20vas = V2k.ComplexExpand[D2VAS];
m1 = Expand[V20vas] /. {Cos[a_ + b_] -> Cos[a] Cos[b] - Sin[a] Sin[b],
Sin[a_ + b_] -> Cos[b] Sin[a] + Cos[a] Sin[b]};
m2 = Collect[m1, {Cos[x_ *rot*t], Sin[y_ *rot*t],
Cos[rot*t], Sin[rot*t] }];
(* suppression of the double curve brackets {{}} of m2 *)
m22 =m2[[1,1]];
size = Length[m22];
(* a2VAS = amplitude of Cos[2*gamma]*Sin[2*rot*t] *)
a2VAS = FullSimplify[Coefficient[m22[[size - 3, 2]], Cos[2*gamma]]];
a2MAS = FullSimplify[a2VAS /. thetaVAS -> ArcCos[Sqrt[1/3]]];
(* b2VAS = amplitude of Sin[2*gamma]*Sin[2*rot*t] *)
b2VAS = FullSimplify[Coefficient[m22[[size - 3, 2]], Sin[2*gamma]]];
b2MAS = FullSimplify[b2VAS /. thetaVAS -> ArcCos[Sqrt[1/3]]];
(* a1VAS = amplitude of Cos[gamma]*Sin[rot*t] *)
a1VAS = FullSimplify[Coefficient[m22[[size - 1, 2]], Cos[gamma]]];
a1MAS = FullSimplify[a1VAS /. thetaVAS -> ArcCos[Sqrt[1/3]]];
(* b1VAS = amplitude of Sin[gamma]*Sin[rot*t] *)
b1VAS = FullSimplify[Coefficient[m22[[size - 1, 2]], Sin[gamma]]];
b1MAS = FullSimplify[b1VAS /. thetaVAS -> ArcCos[Sqrt[1/3]]];
(* c2VAS = amplitude of Cos[2*gamma]*Cos[2*rot*t] *)
(* c2VAS = -b2VAS *)
c2VAS = FullSimplify[Coefficient[m22[[size - 2, 2]], Cos[2*gamma]]];
(* d2VAS = amplitude of Sin[2*gamma]*Cos[2*rot*t] *)
(* d2VAS = a2VAS *)
d2VAS = FullSimply[Coefficient[m22[[size - 2, 2]], Sin[2*gamma]]];
(* c1VAS = amplitude of Cos[gamma]*Cos[rot*t] *)
(* c1VAS = -b1VAS *)
c1VAS = FullSimplify[Coefficient[m22[[size, 2]], Cos[gamma]]];
(* d1VAS = amplitude of Sin[gamma]*Cos[rot*t] *)
(* d1VAS = a1VAS *)
d1VAS = FullSimplify[Coefficient[m22[[size, 2]], Sin[gamma]]];
(* a0VAS *)
a0VAS = FullSimplify[Sum[m22[[i]], {i, 1, size - 4}]];
a0MAS = FullSimplify[a0VAS /. thetaVAS -> ArcCos[Sqrt[1/3]]];
(*--------------- Table of aiVAS and biVAS for VAS --------------*)
tableV20VAS = List[{"a0VAS", a0VAS},
{"a1VAS", a1VAS}, {"b1VAS", b1VAS},
{"a2VAS", a2VAS}, {"b2VAS", b2VAS}];
Print[TableForm[tableV20VAS,
TableHeadings ->
{None, {"VAS", "expression of aiVAS and biVAS in VAS"}}]];
Print["******************************************"];
(*--------------- Table of aiMAS and biMAS for MAS ---------------*)
tableV20MAS = List[{"a0MAS", a0MAS},
{"a1MAS", a1MAS}, {"b1MAS", b1MAS},
{"a2MAS", a2MAS}, {"b2MAS", b2MAS}];
Print[TableForm[tableV20MAS,
TableHeadings ->
{None, {"MAS", "expression of aiMAS and biMAS in MAS"}}]];
Remove[D2, alpha, beta, gamma, V2pas, eta, V2k, D2VAS, thetaVAS,
rot, t, V20vas, m1, m2, m22, size, a2VAS, a1VAS, a0VAS,
b2VAS, b1VAS, c2VAS, c1VAS, d2VAS, d1VAS, a2MAS,
a1MAS, a0MAS, b2MAS, b1MAS, c2MAS, c1MAS, d2MAS,
d1MAS, tableV20VAS, tableV20MAS];
