The task is to estimate $\ln(x)$ using Taylor Polynomial expansion accurate to specified precision. After computing is done, the value compared to the number that WolframAlpha provides to check if the error estimation was made right. for $x \ge 0.5$ every series I try behave as expected, but for $x\le0.5$ there are problems
Expanding around $a=1$ gives below series valid for $x\in(0;2]$ $$\ln(x)=\sum_{n=1}^\infty \frac{(-1)^{n+1}(x-1)^n}{n}$$
Let's say I need to estimate $\ln(0.25)$ so that the absolute error would be $\le0.00005$ (correct to 4 decimal places). WolframAlpha says $\ln(0.25)=-1.38629436...$
I tried this iterative algorithm: https://www.mathworks.com/matlabcentral/answers/uploaded_files/38169/Part%20B.pdf which uses next polynomial term as error bound. Sadly this is not good enough and stops too early so the actual error is bigger than $0.00005$.
I also tried using Lagrange Error Bound as it represented here: http://math.feld.cvut.cz/mt/txte/3/txe4ea3c.htm at the end of the document it says that "on $(0,1/2)$, the Lagrange estimate is too generous." so for my value of $0.25$ taking as many terms as Lagrange Error Bound says, still does no good (I did check that).
So I decided to try this approach: http://math.colorado.edu/~nowi9933/Math2300F17/2300TPRemainderEstimateSol.pdf [page 4, section (d)]
using $\ln(1+x)$ series valid for $|x|\le1$ $$\ln(1+x)=\sum_{n=1}^\infty \frac{(-1)^{n+1}(x)^n}{n}$$
with Lagrange Error Bound $$\frac{(0.25)^{n+1}}{n+1} \le 0.00005$$
Solving it gives $n\ge5$ terms. And this is also not enough as adding 5 terms gives $ln(x)\approx-1.2984375$ last term being $-0.0474609375$
Above calculations were made with a program in python and though IEEE754 floating point format has its flaws its not the problem in the program but in the math part. I'm quiet surprised that there is almost no information regarding that issue on the internet. I understand that one way wolfram must be getting the value is just adding terms as much as it can, but I need some trustworthy error bounding method. Is there some key point I am missing about this?
I would be using instead the expansion $$\log \left(\frac{1-x}{1+x}\right)=-2 \sum_{i=0}^\infty \frac{x^{2n+1}}{2n+1}$$ and make $x=\frac 35$. $$S_p=-2\sum_{i=0}^p \frac{\left(\frac{3}{5}\right)^{2 n+1}}{2 n+1}$$ and compute $$\left( \begin{array}{ccc} p & S_p &\log \left(\frac{1}{4}\right) -S_p \\ 0 & -1.200000000 & -0.186294361 \\ 1 & -1.344000000 & -0.042294361 \\ 2 & -1.375104000 & -0.011190361 \\ 3 & -1.383102171 & -0.003192190 \\ 4 & -1.385341659 & -0.000952702 \\ 5 & -1.386001290 & -0.000293071 \\ 6 & -1.386202224 & -0.000092137 \\ 7 & -1.386264916 & -0.000029446 \\ 8 & -1.386284829 & -0.000009532 \end{array} \right)$$