Find the n -th derivative of f(x) = (x²-x-1) ln (1-x)
Find the $n$-th derivative of $f(x) = \bigl(x^{2}-x-1\bigr)\ln\bigl(1-x\bigr)$.
Explanation of Method
Three Leibniz terms, collected over a single denominator.
Step 1: The two factors
Take $u = x^{2}-x-1$ and $v = \ln\bigl(1-x\bigr)$. Then
\[ u' = 2x-1, \qquad u'' = 2, \qquad u^{(k)} = 0 \ \ \bigl(k\ge3\bigr), \]
\[ v' = -\frac{1}{1-x} \;\Longrightarrow\; v^{(j)} = -\frac{\bigl(j-1\bigr)!}{\bigl(1-x\bigr)^{j}}, \qquad j\ge1. \]
Note that differentiating $1-x$ produces $-1$, which cancels against the sign coming from the power rule — so unlike $\ln(1+x)$, all these derivatives are negative.
Step 2: The Leibniz sum has three terms
Since $u^{(k)} = 0$ for $k\ge3$, for $n\ge3$: $f^{(n)} = u\,v^{(n)}+n\,u'\,v^{(n-1)}+\frac{n\bigl(n-1\bigr)}{2}\,u''\,v^{(n-2)}$.
Substituting the three derivatives of $v$: \[f^{(n)} = -\frac{\bigl(n-1\bigr)!\bigl(x^{2}-x-1\bigr)}{\bigl(1-x\bigr)^{n}}-\frac{n\bigl(n-2\bigr)!\bigl(2x-1\bigr)}{\bigl(1-x\bigr)^{n-1}}-\frac{n\bigl(n-1\bigr)\bigl(n-3\bigr)!}{\bigl(1-x\bigr)^{n-2}}. \tag{1}\]
Step 3: Put everything over $\bigl(1-x\bigr)^{n}$
Using $\bigl(n-1\bigr)! = \bigl(n-1\bigr)\bigl(n-2\bigr)\bigl(n-3\bigr)!$ and $\bigl(n-2\bigr)! = \bigl(n-2\bigr)\bigl(n-3\bigr)!$, the common factor $-\dfrac{\bigl(n-3\bigr)!}{\bigl(1-x\bigr)^{n}}$ comes out of all three terms:
\[ f^{(n)} = -\frac{\bigl(n-3\bigr)!}{\bigl(1-x\bigr)^{n}}\,B(x), \]
\[ B(x) = \bigl(n-1\bigr)\bigl(n-2\bigr)\bigl(x^{2}-x-1\bigr)+n\bigl(n-2\bigr)\bigl(2x-1\bigr)\bigl(1-x\bigr)+n\bigl(n-1\bigr)\bigl(1-x\bigr)^{2}. \]
Step 4: Expand the bracket
Collect the three powers of $x$ separately. Coefficient of $x^{2}$:
\[ \bigl(n-1\bigr)\bigl(n-2\bigr)-2n\bigl(n-2\bigr)+n\bigl(n-1\bigr) = \bigl(n^{2}-3n+2\bigr)-\bigl(2n^{2}-4n\bigr)+\bigl(n^{2}-n\bigr) = 2. \]
Coefficient of $x$:
\[ -\bigl(n-1\bigr)\bigl(n-2\bigr)+3n\bigl(n-2\bigr)-2n\bigl(n-1\bigr) = -\bigl(n^{2}-3n+2\bigr)+\bigl(3n^{2}-6n\bigr)-\bigl(2n^{2}-2n\bigr) = -\bigl(n+2\bigr). \]
Constant term:
\[ -\bigl(n-1\bigr)\bigl(n-2\bigr)-n\bigl(n-2\bigr)+n\bigl(n-1\bigr) = -\bigl(n^{2}-4n+2\bigr). \]
So $B(x) = 2x^{2}-\bigl(n+2\bigr)x-\bigl(n^{2}-4n+2\bigr)$.
Step 5: Verification
\[n = 3:\ B(x) = 2x^{2}-5x+1, \qquad f'''(x) = \frac{-2x^{2}+5x-1}{\bigl(1-x\bigr)^{3}}\]
\[\text{Check at } x = 0 \text{ from (1): } -2!\bigl(-1\bigr)-3\cdot1!\bigl(-1\bigr)-3\cdot2\cdot0! = 2+3-6 = -1 \;\;\checkmark\]
\[n = 4:\ B(x) = 2x^{2}-6x-2, \quad f^{\mathrm{IV}}(0) = \frac{-\bigl(-2\bigr)}{1} = 2; \text{ from (1): } 6+8-12 = 2 \;\;\checkmark\]
Result
Final answer:
\[\boxed{\,f^{(n)}(x) = -\dfrac{\bigl(n-3\bigr)!\Bigl[2x^{2}-\bigl(n+2\bigr)x-\bigl(n^{2}-4n+2\bigr)\Bigr]}{\bigl(1-x\bigr)^{n}}, \qquad n\ge3\,}\]
Remark
Remark. The quadratic $B(x)$ keeps its leading coefficient $2$ at every order — that is $u''$, which no amount of differentiation can change — while the other two coefficients grow with $n$, the constant term quadratically. Only the numerator's shape is fixed; the denominator's power rises, so the singularity at $x = 1$ sharpens with each differentiation, as it must for a logarithm.