Given the function $F(x)= \int_0^x \ln(1+t)dt$, using MacLaurin expansion find an approximation to $F(1)= \int_0^1 \ln(1+t)dt$ with an error that is no more than $\varepsilon=10^{-1}$
I am having a hard time for this topic , I will try to type what I know and tried
- we know that the $\ln(1+t)$ expansion is $\ln (1+t) = t - \frac{t^2} 2 + \frac{t^3} 3 - \frac{t^4}4 + \cdots$
- I dont know if this is needed but $F(x)= \int_0^x \ln(1+t)dt=(t+1) \cdot (\ln(t+1))-(t+1)=(t+1) \cdot (\ln(t+1)-1)$
- $F(1)= \int_0^1 \ln(1+t)dt=(2) \cdot (\ln(2)-1)$
- The error is calculated at $R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}\cdot (x-a)^{n+1}$
- since it is MacLaurin expansion then $R_n(x)=\frac{f^{(n+1)}(c)}{(n+1)!}\cdot (x)^{n+1}$
- According to the Fundamental theorem of calculus the function is continuous in $[0,x]$ so $F'(x)=\ln(1+x)=f(x)$
- we need to solve $|R_n(x)|< \varepsilon$
- I believe this should be calculated at $t=0$ because $\ln(1+t)=\ln(1) \to t=0 $ since we know the value of $\ln(1)$ maybe we can use it as an indicator to a point (I remember my friend used to do that to find that approximation point but I am not sure why or if it is even right)
I am not sure if all points are necessary but this is what I thought about and I really don't know how to continue from here or how to actually start solving
The final answer should be $T_3(1)= \frac{1}{2!}- \frac{1}{3!} =\frac{1}{3}$
The taylor polynomial of degreee $n$ of $F$ at $ a = 0$ is given by
$$ P_n(x)= \sum_{k = 0}^n \frac{F^{(k)}(0)}{k ! } x^k$$
Computing some derivatives :
$$ F'(x) = \ln(1+x)$$ $$ F''(x) = \frac{1}{1+x}$$ $$ F'''(x) = \frac{-1}{(1+x)^2}$$ $$F^{(4)}(x) = \frac{2(1+x)}{(1+x)^4}.$$
The second degree Taylor polynomial is
$$ 0 + 0x + \frac{1}{2}x^2$$ The error is given by $$ R_2(1) = \frac{F^{(3)}(c)}{3!} = \frac{1}{6} \times \frac{-1}{(1+c)^2}$$ for some $c \in (0,1)$. But there exists values of $c$ such that this error is larger than $\epsilon$ so we can't say for sure that $\vert R(1) \vert < \epsilon.$
We therefore look at the third degree Taylor polynomial
$$ \frac{1}{2}x^2 + \frac{-1}{3!}x^3.$$
The remainder is given by
$$ R(1) = \frac{1}{24}\frac{2(1+c)}{(1+c)^4} = \frac{1}{12(1+c)^3}$$
for some $c \in (0,1)$. As a function of $c$ this is clearly maximum when $c = 0$. Hence the error $R(1)$ is necessarily bounded above
$$ R(1) \leq \frac{1}{12} < \epsilon.$$
Hence the third degree Taylor polynomial works for our problem. Evaluating it at $x= 1$ gives the approximation
$$ \frac{1}{2!}- \frac{1}{3!} = \frac{1}{3}$$ of $F(1) = 2\ln(2)- 2$.
We can check numerically that $F(1) \approx 0.38629$ while the approximation is $0.33333 ...$
The error at $1$ contains a number $c$. The problem is that we don't know exactly what $c$ is. We only now that it is somewhere between $(0,1)$. So if you are lucky and the true value of $c$ is near $1$ then you get the error (in absolute value) is close to $1/24 < \epsilon$. Or you could be unlucky and $c$ is close to $0$ where to error (in absolute value) is close to $1/6 > \epsilon$. So you can't be a 100% sure that the error is less than $ \epsilon.$
For the third degree we again don't know exactly what value $c$ takes but we know that regardless of the value the error will be less than $1/12 < \epsilon.$