Express this expression in terms of $x_1$ and $x_2$? We have the following definition:
$$
x_1=A \cos(\omega t_1 +\phi) \\
x_2= A \cos(\omega t_2 +\phi)
$$
The expression we want to simplify is:
$$
S=A^2\omega \left[\sin 2(\omega t_2+\phi)-\sin 2(\omega t_1+\phi)\right]
$$
How to eliminate $A$ and $\phi$ but to express the expression in terms of $x_1,t_1,x_2,t_2,\omega$ ?

Let: 
$$
x_1=A \cos(\omega t_1 +\phi)=A\cos\theta_1 \\
x_2= A \cos(\omega t_2 +\phi)=A\cos\theta_2
$$
Then:
\begin{align}
S&=A^2\omega (\sin 2\theta_2-\sin 2\theta_1)
\\
&=2A^2\omega\cos(\theta_2+\theta_1)\sin(\theta_2-\theta_1)
\\
&=2A^2\omega\frac{\cos(\theta_2+\theta_1)[(1-\cos^2(\theta_2-\theta_1)]}{\sin(\theta_2-\theta_1)}
\\
&=2A^2\omega\frac{\cos(\theta_2+\theta_1)-(\cos^2\theta_2\cos^2\theta_1-\sin^2\theta_2\sin^2\theta_1)\cos(\theta_2-\theta_1)} {\sin(\theta_2-\theta_1)}
\\
&=2A^2\omega\frac{\cos(\theta_2+\theta_1)+\cos(\theta_2-\theta_1)-(\cos^2\theta_2+\cos^2\theta_1)\cos(\theta_2-\theta_1)} {\sin(\theta_2-\theta_1)}
\\
&=2A^2\omega\frac{2\cos\theta_2\cos\theta_1-(\cos^2\theta_2+\cos^2\theta_1)\cos(\theta_2-\theta_1)} {\sin(\theta_2-\theta_1)}
\\
&=2\omega\frac{2x_2x_1-(x_2^2+x_1^2)\cos\omega(t_2-t_1)}{\sin\omega(t_2-t_1)}
\end{align}
