In Spivak, it says, for $x\ge 0,\log(1+x)=\sum_{i=1}^{n}\frac{(-1)^{n+1}}{i}x^{i}+\frac{(-1)^n}{n+1}z^{n+1}$ for some $z\lt x$.
My attempt: I agree with the first part of the sum, since it is the n-th degree Taylor polynomial at $0$. But why is the remainder term of the form $\frac{(-1)^n}{n+1}z^{n+1}$? I thought the lagrange remainder term was of the form $\frac{f^{(n+1)}(t)}{(n+1)!}(x-a)^{n+1}$. So then since $f(x)=\log(1+x)$, then the n+1 derivative is $f^{(n+1)}(x)=(-1)^{n}n!(1+x)^{-(n+1)}$, so the lagrange remainder term should be $f^{(n+1)}(t)=\frac{(-1)^{n}}{n+1}(1+t)^{-(n+1)}$, but this takes us nowhere.
Alternatively, I know $\log(1+x)=\int_{0}^{x}\frac{1}{1+t}\,dt$ and also $\frac{1}{1+t}=\frac{t^{n+1}(-1)^{n+1}}{1+t}+\sum_{i=0}^{n}t^{i}(-1)^i$, so we can get an alternative formula for $\log(1+x)$, namely $$\log(1+x)=\sum_{i=0}^{n}(-1)^i \,\frac{x^{i+1}}{i+1} \, +(-1)^{n+1}\int_{0}^{x}\frac{t^{n+1}}{1+t}dt$$ which is almost in the desired form, I just need to show the final integral part can be written as $\frac{(-1)^n}{n+1}z^{n+1}$ for some $z$. I sense I am close but I am unable to explain why $x\ge 0,\log(1+x)=\sum_{i=1}^{n}\frac{(-1)^{n+1}}{i}x^{i}+\frac{(-1)^n}{n+1}z^{n+1}$ for some $z$