Find the general form of the $n$th derivative of $\ln^2(x+1)$ $f(x)=\ln^2(x+1)$.
I tried to write $f(x)=\ln (x+1)\cdot\ln (x+1)$ and then apply Leibniz but i think maybe i did something wrong.
Could you explain me the right method?
 A: Ok we talked a bit about it in the comments: we can start with the chain rule to find $f'$. Then we calculate a few more derivatives, and eventually we find a nice form that looks like a good guess. That guess can be proven by induction. I will leave the guessing and the proof by induction for you to do. Alright, here we go:
$$f(x) = \ln^2(x+1) $$
$$f'(x) = 2 \times\frac{\ln(x+1)}{x+1} $$
Now we can use $(\frac{u}{v})'=\frac{u'v-v'u}{v^2}$ and the fact that $(\ln(x+1))'=(x+1)^{-1}$ :
$$f''(x) = 2 \times \frac{(x+1)^{-1+1}-\ln(x+1)}{(x+1)^2}=2 \times \frac{1-\ln(x+1)}{(x+1)^2}$$
$$f'''(x) = 2 \times \frac{-(x+1)^{-1+2}-2(x+1)(1-\ln(x+1))}{(x+1)^4}=2 \times \frac{-1-2+2\ln(x+1)}{(x+1)^3}$$
$$f^{(4)}(x)=2\times\frac{2(x+1)^{-1+3}-3(x+1)^2(-1-2+2\ln(x+1))}{(x+1)^6}$$
$$ = 2 \times \frac{2+3\times1+3\times2-3\times2\ln(x+1)}{(x+1)^4}$$
Almost feeling like there's a pattern, right? Let's keep going:
$$f^{(5)}(x) = 2 \times \frac{-3\times2(x+1)^{-1+4}-4(x+1)^3(2+3\times1+3\times2-3\times2\ln(x+1))}{(x+1)^8} $$
$$= 2 \times \frac{-3\times2-4\times2-4\times3\times1-4 \times 3 \times 2 + 4\times3\times2 \ln(x+1)}{(x+1)^5} $$
Curious...let's organize:
$$f^{(5)}(x) = 2 \times \frac{-(4\times3\times2 + 4\times3\times1 + 4\times2\times1+3\times2\times1)+4\times3\times2\times1\times\ln(x+1)}{(x+1)^5} $$
$$= 2 \times \frac{-4!(\frac11+\frac12+\frac13+\frac14)+4!\times\ln(x+1)}{(x+1)^5} $$
Now the general form is evident. I still recommend that you do $f^{(6)}(x)$ yourself before moving on to writing the general form and proving by induction. If you find difficulties with induction, let us know and we will help you. Good luck!
