0
$\begingroup$

So, I've calculated the absolute errors on python for the taylor series approximation to the error function.

$P_N(z)=\frac{2}{\pi} \sum_{n=0}^{N} \frac{(-1)^n z^{2n+1}}{n! (2n+1)}$

I've plotted a graph comparing the error for N=4 and N=5, and for lower values of z (the point the function is evaluated at), the error is smaller for N=5, which is what I would expect, but for higher values of z (roughly z>1) the error is smaller for N=4, why is this? It's probably really simple and I'm being thick, but I can't really explain why.

Thanks in advance!

$\endgroup$
1
$\begingroup$

The original function is bounded, the Taylor polynomials are not (they are non-constant polynomials after all). The fourth degree approximation grows $\sim z^4$, the fifth degree approximation $\sim z^5$ as $z\to \infty$. Clearly, the $z^5$ term is larger than the $z^4$ for $z$ large enough

$\endgroup$
1
$\begingroup$

In general, a convergent sequence need not behave nicely for the first 5 terms, nor even for the first $1,000,000,000,000$ terms. For example, here is a sequence that converges to $0$: $$x_1 = 10, x_2=10^{10}, x_3=10^{10^{10}}, x_4=10^{10^{10^{10}}}, $$ and more generally $x_n = 10^{x_{n-1}}$ for $n \le 1,000,000,000,000$, and then $$x_n = \frac{1}{n} \quad\text{for all}\quad n > 1,000,000,000,000 $$ You might say this was a somewhat artificial example, and I agree that it was concocted to make a point, however this kind of "not nice behavior" is nonetheless quite common in more natural sequences.

In particular, and speaking generally although not quite universally, in a convergent Taylor series, the further $z$ is from the center of the Taylor series (in your case, the further $z$ is from $0$), the higher $N$ will have to be before the sequence begins to exhibit "nice" convergence behavior.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.