Calculate $\sqrt{5}$ using taylor series to the accuracy of 3 digit after the point $(0.5*10^{-3})$.
Matthew Martinez
I need to calculate $\sqrt{5}$ using taylor series to the accuracy of 3 digit after the point $(0.5*10^{-3})$.
I defined : $$f(x)=\sqrt{x}$$
Therefore :
$$f'(x)=\frac{1}{2\sqrt{x}}$$ $$f''(x)=-\frac{1}{4\sqrt{x^3}}$$ $$f'''(x)=\frac{3}{8\sqrt{x^5}}$$
for $x=5$ :
$$|R_2(5)|=\left|\frac{f^{(3)}(c)}{3!}\right|=\left|\frac{\frac{1}{8\sqrt{c^5}}}{3!}\right|\left|\frac{1}{3!*8\sqrt{c^5}}\right|$$
I got stuck now, how can I evaluate: $$???\geq|{3!*8\sqrt{c^5}}|$$
Also, I wonder how many derivatives I need to calculate inorder to reach to the required accuracy, is there a way to find out?
I just took an arbitrary guess to the third derivative.
Any help will be appreciated.
$\endgroup$3 Answers
$\begingroup$Some comments:
- To make an approximation using Taylor series, you're going to want to choose a point for your expansion. I would suggest take the Taylor expansion around $x = 4$, since the square roots will be easy to take. This means you have to evaluate the Taylor coefficients directly in the expansion $f(4) + f'(4)(x-4) + \frac{f''(4)}{2}(x-4)^2 + \dots$, before you can plug in $x=5$ to get your estimate.
Your formula for the third derivative is wrong. It might be easier to see why if you write $f''(x)$ in the form $(-1/4)x^{-3/2}$.
When you bound the error, remember that taking reciprocals of positive quantities reverses inequalities. Thus $|1/\sqrt{c^5}| \le 1/A$ is equivalent to $|\sqrt{c^5}| \ge A$.
You need to find out which $n$ is large enough such that the $n$-th error is suitably small.One way to find out how many terms are needed for a specified accuracy is to find an expression for a reasonable upper bound on the error as a function of $n$, but guess and check is also feasible as an approach. $n$-th remainder term as a function of $n$.
It looks like you're using the Lagrange remainder formula for the error, but without the usual $(x-a)^3$ term.
The Taylor series of $x\mapsto\sqrt{1+x}$ is given by $$\sqrt{1+x}=1+{x\over2}-{x^2\over8}+{x^3\over16}+\ldots\qquad\bigl(|x|<1\bigr),$$ and is alternating when $0<x<1$. Therefore the error after truncating is between $0$ and the first neglected term. Our aim now is to use this with a suitable small $x>0$. We write $$\sqrt{5}=\sqrt{4.84+0.16}=\sqrt{4.84}\>\sqrt{1+{0.16\over 4.84}}\ .$$ This gives $$\sqrt{5}=2.2\sqrt{1+x}=2.2\>\left(1+{x\over2}-{x^2\over8}+R\right)$$ whereby $$0<x:={0.16\over4.84}<0.04$$ and $$0<R<{0.04^3\over16}=0.000004\ .$$ It follows that $$\sqrt{5}=2.2\>\left(1+{x\over2}-{x^2\over8}\right)=2.236063110\ldots$$ with an error $<0.00001$. The first decimal places of $\sqrt{5}$ are $2.236067977$.
$\endgroup$ 1 $\begingroup$the Taylor series of $y=\sqrt{x+4}$ is $$y=2+\frac{x}4{}-\frac{x^2}{64}+\frac{x^3}{512}-\frac{5x^4}{16384}+....$$ to get $\sqrt{5}$ put $x=1$
$\endgroup$