# What are the practical applications of the Taylor Series?

I started learning about the Taylor Series in my calculus class, and although I understand the material well enough, I'm not really sure what actual applications there are for the series.

Question: What are the practical applications of the Taylor Series? whether it's in a mathematical context, or in real world examples.

-
 Related: Motivating Infinite Series‌​. – Mike Spivey Dec 19 '12 at 17:40

One reason is that we can approximate solutions to differential equations this way: For example, if we have

$$y''-x^2y=e^x$$

To solve this for $y$ would be difficult, if at all possible. But by representing $y$ as a taylor series $\sum a_nx^n$, we can shuffle things around and determine the coefficients of this taylor series, allowing us to approximate the solution around a desired point.

It's also useful for determining various series. For example:

$$\frac 1 {1-x}=\sum_{n=0}^\infty x^n$$ $$\frac 1 {1+x}=\sum_{n=0}^\infty (-1)^nx^n$$ Integrate: $$\ln(1+x)=\sum_{n=0}^\infty \frac{(-1)^nx^{n+1}}{n+1}$$ Substituting $x=1$ gives

$$\ln 2=1-\frac12+\frac13-\frac14+\frac15-\frac16\cdots$$

There are also applications in physics. If a system under a conservative force (one with an energy function associated with it, like gravity or electrostatic force) is at a stable equilibrium point $x_0$, then there are no net forces and the energy function is concave upwards (the energy being higher on either side is essentially what makes it stable). In terms of taylor series, the energy function $U$ centred around this point is of the form

$$U(x)=U_0+k_1(x-x_0)^2+k_2(x-x_0)^3\cdots$$

Where $U_0$ is the energy at the minimum $x=x_0$. For small displacements the high order terms will be very small and can be ignored. So we can approximate this by only looking at the first two terms:

$$U(x)\approx U_0+k_1(x-x_0)^2\cdots$$

Now force is the negative derivative of energy (forces send you from high to low energy, proportionally to the energy drop). Applying this, we get that

$$F=ma=mx''=-2k_1(x-x_0)$$

Rephrasing in terms of $y=x-x_0$:

$$my''=-2k_1y$$

Which is the equation for a simple harmonic oscillator. Basically, for small displacements around any stable equilibrium the system behaves approximately like an oscillating spring, with sinusoidal behaviour. So under certain conditions you can replace a potentially complicated system by another one that's very well understood and well-studied. You can see this in a pendulum, for example.

As a final point, they're also useful in determining limits:

$$\lim_{x\to0}\frac{\sin x-x}{x^3}$$ $$\lim_{x\to0}\frac{x-\frac16x^3+\frac 1{120}x^5\cdots-x}{x^3}$$ $$\lim_{x\to0}-\frac16+\frac 1{120}x^2\cdots$$ $$-\frac16$$

which otherwise would have been relatively difficult to determine. Because polynomials behave so much more nicely than other functions, we can use taylor series to determine useful information that would be very difficult, if at all possible, to determine directly.

EDIT: I almost forgot to mention the granddaddy:

$$e^x=1+x+\frac12x^2+\frac16x^3+\frac1{24}x^4\cdots$$ $$e^{ix}=1+ix-\frac12x^2-i\frac16x^3+\frac1{24}x^4\cdots$$ $$=1-\frac12x^2+\frac1{24}x^4\cdots + ix-i\frac16x^3+i\frac1{120}x^5\cdots$$ $$=\cos x+i\sin x$$ $$e^{ix}=\cos x+i\sin x$$

Which is probably the most important equation in complex analysis. This one alone should be motivation enough, the others are really just icing on the cake.

-
Granddaddy is used to approximate $\exp$, $\sin$ and $\cos$, right? – krlmlr Oct 22 '12 at 11:37
@user946850 without the imaginary part, yes. Taylor series can also be used to approximate these functions in computers to pretty high accuracy. $\sin x\approx x-\frac16x^3$ has an error of at most $8\%$. Adding the next term reduces that to less than $0.5\%$ and using this in conjunction with $\sin(\pi/2-x)=\cos x$ and $\cos x\approx1-\frac12 x^2+\frac1{24}x^4$ can lower this even further. There are many other approximations that exist as well (the CORDIC algorithm, Chebyshev approximation, etc.) but this is sometimes used in practice. – Robert Mastragostino Oct 22 '12 at 15:43

In the calculator era, we often don't realize how deeply nontrivial it is to get an arbitrarily good approximation for a number like $e$, or better yet, $e^{\sin(\sqrt{2})}$. It turns out that in the grand scheme of things, $e^x$ is not a very nasty function at all. Since it's analytic, i.e. has a Taylor series, if we want to compute its values we just compute the first few terms of its Taylor expansion at some point.

This makes plenty of sense for computing, say, $e^{1/2}: 1+1/2+1/2!(1/2)^2+1/3!(1/2)^3+...$ is obviously going to converge very quickly: $1/4!2^4<1/100$ and $1/5!2^5<1/1000$, so we know for instance we can get $e^{1/2}$ to $2$ decimal places by summing the first $5$ terms of the Taylor expansion.

But why should this work for computing something like $e^{100}$? Now the expansion looks like $1+100+100^2/2+100^3/3!+...$, and initially it blows up incredibly fast. This is where analytic functions really show how special they are: the denominators $n!$ grow so fast that it doesn't matter what $x^n$ we have in the numerators, before too long the series will converge. That's the essence of the Taylor approximation: analytic functions are those that are unreasonably close to polynomials.

There are much faster methods for getting approximations like the one for $\sqrt{e}$, in theory: using Newton's method to solve $x^2-e=0$ will give you an approximation to $\sqrt{e}$ accurate to a number of places that goes like the square of the number of iterations you've done. But how do we apply Newton's method here? The first formula is $$x_1=x_0-\frac{2x_0}{x_0^2-e}$$ So, if we want a decimal expansion of $\sqrt{e}$, we'd better be able to get one of $x_0^2-e$. And how are we going to get that? The Taylor series.

-

Taylor Series are studied because polynomial functions are easy and if one could find a way to represent complicated functions as series (infinite polynomials) then one can easily study the properties of difficult functions.

1. Evaluating definite Integrals: Some functions have no antiderivative which can be expressed in terms of familiar functions. This makes evaluating definite integrals of these functions difficult because the Fundamental Theorem of Calculus cannot be used. If we have a polynomial representation of a function, we can oftentimes use that to evaluate a definite integral.

2. Understanding asymptotic behaviour: Sometimes, a Taylor series can tell us useful information about how a function behaves in an important part of its domain.

3. Understanding the growth of functions
4. Solving differential equations

I'm pretty sure this is not all but with a little research you can find as many as possible.

-

The applications of Taylor series is mainly to approximate ugly functions into nice ones(polynomials)!

Example: Take $f(x) = \sin(x^2) + e^{x^4}$. This is not a nice function, but it can be approximated to a polynomial using Taylor series.

-
 What do you mean an Ugly Function? – Link Oct 22 '12 at 1:39 edited the asnwer – Citizen Oct 22 '12 at 1:41

Taylor series provide the basic method for computing transcendental functions such as $e^x$, $\sin x$, and $\cos x$.

-

A good example of Taylor series and, in particular, Maclaurin series, is in special relativity to approximate the Lorrentz factor $\gamma$. Taking the first two terms of the series gives a very good approximation for low speeds. You can actually show that at low speeds, special relativity reduces to classical (Newtonian) physics. For example, in special relativity the momentum is $$\vec p = \gamma m\vec v$$ and at low speeds $$\gamma \approx 1$$ so $$\vec p \approx m\vec v$$ which is the (linear) momentum in classical mechanics.

Also, the most famous equation in physics $$E = m{c^2}$$ is actually an approximation for low velocities, again, using Taylor series approximation.

I hope this helps.

By the way, $$\gamma = \frac{1}{{\sqrt {1 - \frac{{{v^2}}}{{{c^2}}}}}}$$ where $v$ is the velocity and $c$ is the speed of light.

Another example is again from physics. If you ever took classical mechanics or studied pendulums you often start with an assumption $\sin (\theta ) \approx \theta$, which also comes from Taylor series.

Not to mentions, that any software that graphs various functions actually uses very good Taylor approximations.

-
 If you take any advanced math or physics class, you will most definitely use Taylor series. Taylor series and geometric series are probably the most famous series. – glebovg Oct 22 '12 at 2:17

We can also use Taylor series to approximate integrals that are impossible with the other integration techniques.

A classic example is $\int\sin(x^2)\,\mathrm{d}x$.

We can't actually integrate this, but using the taylor series for $sin(x)$ we can substitute $x^2$ in for $x$ at each term of the series, and then integrate each term individually. After doing so, we can write a new sum.

-

The Taylor Series is used in power flow analysis of electrical power systems (Newton-Raphson method).

http://en.wikipedia.org/wiki/Power_flow_study

-

Multivariate Taylor series is used in different optimization techniques; that is you approximate your function as a series of linear or quadratic forms, and then successively iterate on them to find the optimal value.

-

No one's mentioned the combinatorial side of things, so I'll be the first to say it: generating functions. We use generating functions to pass hard discrete counting problems to the continuous, where things are easy. Generating functions are a central tool in combinatorics (counting, graph theory, etc.) and probability (where we have moment generating functions). Taylor series is the fundamental idea behind all of these. Read: http://en.wikipedia.org/wiki/Generating_function for details, and take a combinatorics or mathematical probability class to learn more.

-

In physics you often approximate a complicated function by taking the first few terms in the Taylor series (the Taylor polynomial). For small values of the independent variable, you often assume linearity, which can allow you to get a closed form solution. For example, if you take an introductory physics class then you usually study the motion of the pendulum by approximating $\sin(\theta)$ by $\theta$ for small angles.

-

The Taylor Series is used to derive the most beautiful equation in Mathematics: The Euler's Identity!

How?

Start with defining $g(x)$ as follows: $$g(x) = e^x= 1 + x + {x^2 \over 2!} + {x^3 \over 3!} \cdots$$Thus,\begin{align} g(ix) = e^{ix} & = 1 + ix +{(ix)^2 \over 2!} + {(ix)^3 \over 3!}\cdots \\ \\ \\ &= 1 + ix + i^2{x^2 \over 2!} + i^3 {x^3 \over 3!}\cdots \\ \\ \\ &= 1 + ix - {x^2 \over 2!} - i{x^3 \over 3!}\cdots\end{align} Collect imaginary and real parts together.$$\overbrace{\left(1 - {x^2 \over 2! } + {x^4 \over 4!} - {x^6 \over 6!} \cdots\right)}^{(1)} + i\overbrace{\left(x - {x^3 \over 3!} + {x^5 \over 5!} - {x^7 \over 7!} \right)}^{(2)}$$ Recall that (1) is the Taylor Series for $\cos(x)$ and (2) is the Taylor Series for $\sin(x)$ which yields, $$e^{ix} = \cos(x) + i\sin(x)$$That's Euler's Formula. Now the next step for the Identity is easy. If $x = \pi$, then we have:$$e^{i\pi} = \cos(\pi) + i \sin(\pi) = -1 + 0i = -1$$So,$$e^{i\pi} = -1$$Let's make it a little better:$$e^{i \pi}+1 = 0$$

-
 You should mention that this sort of rearrangement trick is only allowed because the series is absolutely convergent. A lot of people forget that you can't just rearrange every series like that. – B0112358 Dec 19 '12 at 19:04