When is it acceptable to stop adding terms to a Taylor approximation if my goal it to find a limit?

746 Views Asked by At

I'm new to the concept of finding a limit using a Taylor polynomial. I am curious when is it ok to stop adding terms to the polynomial if I am trying to find a limit? I've seen examples where people stopped at the $x^2$ term and then added $O(x^3)$ to the expression, examples where people went as far as $x^7$ and then added $O(x^8)$ to the expression and everything in between. If what I want is to find a limit, how should I know when to stop? What would be acceptable in say, an exam situation?

EDIT

For example, say I am trying to find the limit

$$\lim_{x \to 0} \dfrac{\sin x}{x}$$

without using L'Hospital. So I am trying to use the Taylor Expansion. By "When is it acceptable to stop adding terms" I'm really asking about what is the difference between doing something like:

$$\lim_{x \to 0} \dfrac{x - \frac{x^3}{3!} + O(x^5)}{x}$$

or doing something like:

$$\lim_{x \to 0} \dfrac{x - \frac{x^3}{3!} + \frac{x^5}{5!}+ O(x^7)}{x}$$

or something like:

$$\lim_{x \to 0} \dfrac{x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + O(x^9)}{x}$$

and so on. Which one should I use? That's what I mean when I say "When is it acceptable to add terms".

3

There are 3 best solutions below

0
On BEST ANSWER

There is no hard and fast rule for the number of terms you need and it will depend on context and the properties of the function in the limit. I've tried to come up with a pathological example to demonstrate how the degree can be hard to pin down.

Consider the Taylor expansion $\displaystyle \ln\left(1-x\right)=-\sum_{n=1}^{\infty}\frac{x^{n}}{n}$, which is valid for all $x\in[-1,1)$. We should have $\displaystyle L=\lim_{x\to1^-}\frac{\ln (1-x)}{\ln (1-x)}=\lim_{x\to1^-}1=1$. However, if we try to evaluate the limit with Taylor polynomials, we would have

$$\displaystyle L\stackrel{?}{=}\lim_{x\to1^-}\frac{-\sum\limits_{n=1}^{N_{1}}\frac{x^{n}}{n}}{-\sum\limits_{n=1}^{N_{2}}\frac{x^{n}}{n}}=\lim\frac{x+\frac{x^2}{2}+\ldots+\frac{x^{N_1}}{N_1}}{x+\frac{x^2}{2}+\ldots+\frac{x^{N_2}}{N_2}}$$

for respective upper bounds $N_1, N_2$. The two sums are finite and continuous at $1$ so we can substitute $x=1$. We can then use a property of the Harmonic numbers and Euler's constant, $\gamma=0.577$, to approximate the expression as

$$\displaystyle L\stackrel{?}{=}\frac{\sum\limits_{n=1}^{N_1}\frac{1}{n}}{\sum\limits_{n=1}^{N_{2}}\frac{1}{n}}\approx \frac{\gamma+\ln N_1}{\gamma+\ln N_{2}}$$

so in fact, despite knowing that $L=1$, we can make this expression as large or as small as we want by choosing the right $N_1, N_2$. We also see that we can have arbitrarily large $N_1,N_2$ that give us the wrong answer. The take-home message is that naively evaluating limits by substituting a Taylor polynomial can lead to incorrect results, even if you use one with a high degree.

In the figure below, we have $\ln (1-x)$ in dotted black, which is well approximated over $[-1,1)$ by the Taylor polynomials up to $N_1=10$ (red curve) and $N_2=5$ (blue). However, the true value of $\displaystyle \frac{\ln (1-x)}{\ln (1-x)}$ is the purple horizontal line equal to $1$. This does not have the same limit at $1$ as the ratio of Taylor polynomials (green), which is approximately $\displaystyle \frac{\gamma+\ln 10}{\gamma+\ln 5}=1.317$ (red point). You can try this for yourself with this (Desmos graph).

enter image description here

2
On

In this example, you would use the order of the denominator as a reference, which is $x$. Then, you stop the expansion at the order $x$ and express the rest with $O(x^3)$, i.e.

$$\lim_{x \to 0} \dfrac{x+O(x^3)}{x} = \lim_{x \to 0} (1+ O(x^2)) = 1$$

Furthermore, if you would like to find the limit

$$\lim_{x\to 0} \frac {x-\sin x}{x^3}$$

Again, use the order of the denominator as a reference, which is $x^3$. Then, you stop the expansion at the order $x^3$, i.e.

$$\lim_{x\to 0} \frac {x-\sin x}{x^3} = \lim_{x\to 0} \frac {x-(x-\frac16x^3+O(x^5))}{x^3} =\lim_{x\to 0} \frac {\frac16x^3+O(x^5)}{x^3} =\frac16$$

In the case where the limit involves the product of functions, such as the one below,

$$\lim_{x\to 0} \frac {\sin x(\cos x - 1)}{x^3}$$

You would like the combined function to be of order $x^3$. But, considering that the leading order of $\sin x $ is $x$, you stop at order $x^2$ when expanding $\cos x -1$; likewise, considering that the leading order of $\cos x -1 = -2\sin^2 \frac x2$ is $x^2$, you stop at $x$ when expanding $\sin x$. That is, $$ \lim_{x\to 0} \frac {\sin x(\cos x-1)}{x^3} = \lim_{x\to 0} \frac {(x+O(x^3))(1-\frac12 x^2 +O(x^4) - 1)}{x^3}$$ $$=\lim_{x\to 0} \frac {-\frac12x^3+O(x^5)}{x^3} =-\frac12$$

0
On

The general answer, I think, is that it's OK to use a truncated Taylor series (plus an error term) when you can prove that it's OK.

The idea is to make the proof so easy that you don't have to write it out. To take your example, $$ \lim_{x\to 0} \frac{\sin x}{x}, $$

knowing that $\sin x = x - \frac16 x^3 + O(x^5),$ you know that $$ \lim_{x\to 0} \frac{\sin x}{x} = \lim_{x\to 0} \frac{x - \frac16 x^3 + O(x^5)}{x} $$ provided that the limit on the right-hand side exists. Then in turn, from a theorem about the limit of a sum you know that \begin{align} \lim_{x\to 0} \frac{x - \frac16 x^3 + O(x^5)}{x} &= \lim_{x\to 0} \left(\frac xx + \frac{-\frac16 x^3}{x} + \frac{O(x^5)}{x}\right) \\ &= \lim_{x\to 0} \frac xx + \lim_{x\to 0}\frac{-\frac16 x^3}{x} + \lim_{x\to 0}\frac{O(x^5)}{x} \\ \end{align} provided that all three of the limits on the RHS of the last equation exist, and keeping in mind that we're using $O(x^5)$ as shorthand for "$f(x)$ where $f(x)$ is some function of $x$ in the class of $O(x^5)$ functions."

But taking these individually, \begin{gather} lim_{x\to 0} \frac xx = lim_{x\to 0} 1 = 1, \\ \lim_{x\to 0}\frac{-\frac16 x^3}{x} = \lim_{x\to 0}\left(-\frac16 x^2\right) = 0, \\ \lim_{x\to 0}\frac{O(x^5)}{x} = \lim_{x\to 0}O(x^4) = 0, \end{gather} so all three limits do exist, and therefore \begin{align} \lim_{x\to 0} \frac{x - \frac16 x^3 + O(x^5)}{x} &= \lim_{x\to 0} \frac xx + \lim_{x\to 0}\frac{-\frac16 x^3}{x} + \lim_{x\to 0}\frac{O(x^5)}{x} \\ &= 1 + 0 + 0 \\ &= 1, \end{align} and therefore, since $x - \frac16 x^3 + O(x^5) = \sin x,$ $$ \lim_{x\to 0} \frac{\sin x}{x} = 1. $$

Now you might notice that if we had just written $\sin x = x + O(x^3)$ (which is true), that when we expressed the limit as a sum of simpler limits we would have found that \begin{align} \lim_{x\to 0} \frac{\sin x}{x} &= \lim_{x\to 0} \frac xx + \lim_{x\to 0}\frac{O(x^3)}{x} \\ &= \lim_{x\to 0} 1 + \lim_{x\to 0}O(x^2) \\ &= 1 + 0, \end{align} so really by going out to $O(x^5)$ you're already doing more than you need to. As a rule, if the denominator is just $x$, then as soon as you the exact terms of orders lower than $O(x^2)$ in the numerator, you have enough. But if the denominator is something more complicated than just $x$ you might need higher terms in the numerator (and altogether the procedure starts to require more algebra, though it should still be possible in many cases).