Taylor Series Expansion of a function I updated my work to show the steps of how I got my expansion.
I just want to know if what I have worked on so far is correct or if I messed something up along the way.
I have the function 
$$f(x) = \int_0^x \frac {\log(1+t)}{t}dt$$
I would like a confirmation for my Taylor expansion of $\log(1+t)$ about $x_0 = 0$.  I got the following,
$$\log(1+t) = \sum_{k=1}^{n} (-1)^{k+1} \;\frac {t^k}{k}+\; \frac {(-1)^n \; t^{n+1}}{(n+1)(1+\xi(t))^{n+1}}$$
Where $\xi$ is between 0 and t. (Below are my steps of how I got this)
First we have that the $n^{th}$ derivative of $log(1+t)$ is 
$$\frac{(-1)^{n+1} \; (n-1)!}{(1+t)^n}$$
and therefore for the $n+1$ derivative we have
$$\frac{(-1)^{n} \; n!}{(1+t)^{n+1}}$$
Taylors Theorem with Remainder states $f(x) = p_n(x) + R_n(x)$ for 
$$p_n(x)=\sum_{k=0}^{n} \frac {(x-x_0)^k}{k!} \; f^{(k)}(x_0)$$
and
$$R_n(x) = \frac {(x-x_0)^{n+1}}{(n+1)!} \; f^{(n+1)}(\xi_x)$$
for $\xi_x$ between $x_0$ and $x$.
This is what I used to derive the remainder term. (the pointwise version not the integral version).
So I have  
$$R_n(t) = \frac {t^{n+1}}{(n+1)!} \; \frac{(-1)^{n} \; n!}{(1+t)^{n+1}} = \frac {(-1)^n \; t^{n+1}}{(n+1)(1+\xi(t))^{n+1}}$$
If this is correct is it ok to just divide by $t$ to get a Taylor expansion for the integrand, and if so what do I have to do to ensure I am handling $t=0$ correctly?
Thank you!!!
 A: We know the power series expansion for $\dfrac{1}{1+s}$. The power series for $\log(1+t)$ can then be obtained efficiently by term by term integration. But the way that was used in the post was not much harder.
Then it is easy to find the power series expansion of $f(x)$ by division and term by term integration.
There are easier and better ways to approach the error term.  The Lagrange form of the remainder often gives thoroughly bad results, because it involves an unknown $\xi$ that one may end up having to be excessively pessimistic about.
For positive $x$, note that since for convergence we need $x \le 1$, our series for $f(x)$ is an alternating series.  Thus the error made by truncating anywhere has absolute value less than the first "neglected" term. That quickly gives us an error estimate that is more useful than the Lagrange expression.  For negative $x$, we don't have the nice alternating series feature, but a good error estimate can be found by looking at the tail and comparing it with a geometric series.
Added detail about error term:  We get that $f(x)$ has the power series expansion
$$x-\frac{x^2}{4}+\frac{x^3}{9}-\frac{x^4}{16}+ \cdots +(-1)^{n+1}\frac{x^n}{n^2}+\cdots.$$
By standard convergence tests, this diverges if $|x|>1$. There is somewhat reluctant convergence at $x=\pm 1$, and brisker convergence if $|x|<1$.
If $0<x\le 1$, we have an alternating series (the terms alternate in sign, and decrease steadily in absolute value, with limit $0$).  For alternating series, the error made by keeping everything up to the $m$-th term and throwing away the rest is of the same sign as the first "neglected" term, and has absolute value less than the absolute value of the first neglected term.  
For example, if we keep everything up to the term $-x^6/36$, and throw away the rest, then our estimate for $f(x)$ is an underestimate and the error is less than $x^7/49$. 
The situation is different if we use our series to evaluate $f(x)$ for negative $x$. For then the series is no longer an alternating series.  Suppose $x$ is negative (but $>-1$). Suppose also that, for example, we throw away all the terms from $x^7/49$ on.  To get rid of minus signs, let $w=-x$. Then our error has absolute value
$$\frac{w^7}{49}+\frac{w^8}{64}+\frac{w^9}{81}+\cdots.$$ 
This is less than
$$\frac{w^7}{49}+\frac{w^8}{49}+\frac{w^9}{49}+\cdots.$$ 
Take the common factor $\frac{w^7}{49}$ out. What's left is the good old $1+w+w^2+\cdots$. So the error has absolute value less than
$$\frac{w^7}{49}\cdot \frac{1}{1-w}.$$
This turns out to be a pretty good estimate. The performance of Lagrange Remainder estimates is very bad in this kind of situation.  
