$$\frac{x\ \cos\ \theta-\theta\ \cos\ x}{x-6}$$
$\frac{x\cos(\theta )-\theta \cos(x)}{x-6}$
$\frac{x\theta \sin(x)+\theta \cos(x)-6\theta \sin(x)-6\cos(\theta )}{\left(x-6\right)^{2}}$