Let $p_{n}(x)$ be the Taylor polynomial of degree $n$ of the function $$\boxed{\ f(x)=\log{(1-x)} \quad\text{about $a=0$.}\ }$$
(a) How large should $n$ be such that $\vert f(x) - p_{n}(x)\vert\le 10^{-4}$ for $-0.5\le x\le0.5$?
(b) Does this choice of $n$ change if $x$ lies between $[-1, 0.5]$?
Part a) From repeated differentiation we see that
$$ \frac{d^{n}}{dx^{n}}\log(1-x)=(-1)^{2n+1}\frac{(n-1)!}{(1-x)^{n}}$$
and, from
$$ \vert R_{n}\vert \le \frac{\vert(x-a)\vert^{n+1}}{(n+1)!}\max_{a<c<x} |f^{(n+1)}(c)|, $$ we obtain \begin{alignat*}{2} & &\vert R_{n} \vert &\le \frac{\vert{x}\vert^{n+1}}{(n+1)!}\max_{0<c<0.5} \left\lvert(-1)^{2n+1}\frac{n!}{(1-c)^{n+1}}\right\rvert \tag{1}\\ &\implies\quad & &\le \frac{\vert{x}^{n+1}\vert}{n+1}\max_{0<c<0.5} \left\lvert\frac{1}{(1-c)^{n+1}}\right\rvert \tag{2}\\ &\implies \quad& &\le \frac{\vert{2x}\vert^{n+1}}{n+1}.\tag{3}\\ &\implies \quad&\vert{R_{n}\vert} &\le \frac{1}{n+1}.\tag{4}\\ \end{alignat*} Now, $$ \frac{1}{n+1}<10^{-4}\implies R_{9999} <10^{-4}. $$
Part b) If we're allowed a value of $x=-1$, we may subsitute this in step $(3)$; however, this yields
$$ \frac{2^{n+1}}{n+1}<10^{-4} $$
giving $n=-1$, which doesn't make sense. What am I doing wrong, and can someone help me with part b?
There is no indication in the task that a Taylor remainder term has to be used. Thus explore the full Taylor series $$\ln(1-x)=-\sum_{k=0}^\infty\frac{x^k}k.$$ This power series has radius of convergence equal $1$.
For positive $x$ use the remainder estimate $$ 1>x\ge 0\implies |\ln(1-x)-p_n(x)|\le\sum_{k=n+1}^\infty\frac{x^k}k\le \frac{x^{n+1}}{n+1}\sum_{k=0}^\infty x^k=\frac{x^{n+1}}{(n+1)(1-x)}, $$ For negative $x$, the series is alternating. By the Leibniz test, the remainder of the series is smaller than the next term after the partial sum, thus $$ -1<x<0\implies |\ln(1-x)-p_n(x)|\le \frac{|x|^{n+1}}{n+1} $$ To get both error terms below $10^{-4}$ for $|x|\le 0.5$, the first bound is the worse one and gives $$ \frac{2^{-n}}{n+1}\le 10^{-4}. $$ Now remember $2^{10}=1024\sim 10^3$ to find $n=10$ sufficient to satisfy this inequality.
While the second bound guarantees convergence for $x\in[-1,0]$, the remainder in $x=-1$ has size $\frac1{n+1}$ so that much more terms are required.