Tutorial on Taylor Series. Made by anonymous.
\(\style{text-shadow: 0px 0px 3px ;padding:5pt ; } {\Huge \mathbb{{Taylor~Series}}}\) Welcome to the fascinating subject of Taylor Series! Before we delve into this topic, let us do a quick check. Are you comfortable with manipulating (taking derivatives and integrals of) functions, especially special functions like \(e^x, \sin x, \ln x?\) If yes, then read on! Next, are you comfortable with what series are and how we can evaluate sums? If so, read on! To get started, let us consider the function \(y = \frac {1}{1-x}.\) If you have practiced a lot with geometric series, you might recall and/or notice that this is the sum of a geometric series with first term 1 and common ratio x; namely \(1 + x + x^2 + \cdots\) Believe it or not, you just witnessed a Taylor Series! Okay, that doesn't help much. So, first off, what's our motivation for write a nice-looking function such as \(y = \frac {1}{1-x}\) as a series that looks much longer (in fact, of infinite length)? Well, it's not immediately with a function such as this one since the series and function are so simple. Let's take a more interesting, namely \(y = e^x\). Now, let us say we wanted to find \(e^0.1\). Surely, we can say \(e^{0.1} \approx e^0 = 1,\) but we can do better than that. Usually, we like to know things. Most of the time, we like to be exact as we can, especially in math. Indeed, we can use the linear approximation. Then, we get that, if we set \(f(x) = e^x,\) we get \(f'(x) = e^x,\) so \(\begin {align*} f(0.1) &\approx f(0) + 0.1 \cdot f'(0) \\&= e^0 + 0.1 \cdot e^0 \\&= 1 + 0.1 = 1.1. \end {align*}\) It turns out, unsurprisingly, that this is much closer the exact value of \(e^{0.1}\). Do we just have to stop at the linear approximation and pretend to be satisfied with it? No! We can go one step further and use a quadratic approximation. We know that \(f''(x) = e^x\) and we get \(\begin {align*} f(0.1) &\approx f(0) + f'(0) \cdot 0.1 + \frac {f''(0)}{2} \cdot 0.1^2 \\&= 1 + 0.1 + \frac {0.1^2}{2} \\&= 1.105. \end {align*}\) Lo and behold, this is even closer. A natural question ask is -- if we get closer at each step, can we ever hit the exact value? It turns out we can continue to use higher-order approximations: the cubic, the quartic, etc. However, we never get the exact value until we use an infinite number of terms. However, we can get remarkably close. Now, let's look back at what we just did. We wrote a two-term sum for the linear approximation, a three-term sum for the quadratic approximation, and in general, we can write an n-term sum for the (n+1)-th approximation. And, of course, we can write an infinite series that includes all the terms possible, so that, if we want the k-th order approximation, we just take the first k+1 terms and, boom, we have it! We call this infinite series a **Taylor series**. *Fun fact.* A Taylor series centered at x = 0 is called a **Maclaurin series**. By now, you should have been able to guess the general form of the series for \(f(x) = e^x,\) since we conveniently have that \(f^{(n)}(e^x) = e^x,\) for all x. (Recall that \(f^{(n)}(x)\) is the n-th derivative of the function f(x).) Centered around x = 0, \(e^x = \displaystyle\sum_{n=0}^{\infty} \frac {1}{n!} x^n = 1 + x + \frac {1}{2} x^2 + \frac {1}{6} x^3 + \frac {1}{24} x^4 + \cdots\) *Exercise for the reader.* Try to figure out why this is the case. A natural question we might and should ask, at this point, is, can we write a Maclaurin series for any function f(x). The answer is yes, and we leave it as an exercise for the reader to try to see why this is the correct formula: \(f(x) = \displaystyle\sum_{n=0}^{\infty} \frac {f^{(n)}(0)}{n!} \cdot x^n = f(0) + \frac {f'(0)}{1!} \cdot x + \frac {f''(0)}{2!} \cdot x^2 + \cdots\) Now, let us say we do not want to center it at x = 0. Instead, we want to compute something like f(1.1) and f(1) is very trivial. Then, we might want to center it at \(x_0 = 1\) for example. So, for a general "root" \(x_0\), we can say the Taylor series defining the function is \(f(x) = \displaystyle\sum_{n=0}^{\infty} \frac {f^{(n)}(x_0)}{n!} \cdot \left(x-x_0\right)^n = f(x_0) + \frac {f'(0)}{1!} \cdot \left( x - x_0 \right) + \frac {f''(0)}{2!} \cdot \left( x - x_0 \right)^2 + \cdots\)
Join our real-time social learning platform and learn together with your friends!