step-by-step
$$\frac{d}{dx}\left(\frac{\left(x^{4}-x^{2}-2x-1\right)}{\left(x^{2}-x-1\right)}\right)$$
ja