The Wayback Machine - https://web.archive.org/web/20250111044016/https://www.geeksforgeeks.org/taylor-series/
Open In App

Taylor Series

Last Updated : 13 Aug, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Taylor Series is the series which is used to find the value of a function. It is the series of polynomials or any function and it contains the sum of infinite terms. Each successive term in the Taylor series expansion has a larger exponent or a higher degree term than the preceding term. We take the sum of the initial four, and five terms to find the approximate value of the function but we can always take more terms to get the precise value of the function.

In this article, we will learn about the Taylor Series its expansion, formula, Maclaurin Series, and others.

What is Taylor’s Series?

Taylor series is a powerful mathematical tool used to approximate complex functions with an infinite sum of terms derived from the function’s derivatives at a single point. Named after the mathematician Brook Taylor, the Taylor series is fundamental in calculus and has wide-ranging applications in engineering, physics, and computer science.

A Taylor series represents a function as an infinite sum of terms, calculated from the values of its derivatives at a single point

Taylor Series Expansion

Taylor series expansion of the real and composite function f(x) whose differentiation exists in a close neighborhood is,

[Tex]f(x) = f(a) + [f'(a)’/1!](x-a) + [f”(a)/2!](x-a)2 + [f”'(a)/3!](x-a)3 +…[/Tex]

Taylor Series in terms of sigma notation is,

Taylor Series Sigma Notation

Taylor Series Formula

Taylor’s series formula is used to find the value of any function around the particular value. Suppose we have to find the value of the real and composite function f(x) at point a, such that the differentiation of the function is defined in the closed neighborhood of the function then the function is represented by the formula,

f(x) = f(a) + [f'(a)’/1!](x-a) + [f”(a)/2!](x-a)2 + [f”'(a)/3!](x-a)3 +…+ f(n)/n!(x-a)n

where,
f(x) is the real or complex value function that is infinitely differentiable
n is the number of times the function is differentiated
f(n) is the n derivative of the function f(x)

Taylor Series Theorem

The statement for the Taylor Series Theorem is

For a real or complex-valued function f(x) which is differentiable on the neighbourhood of a number the Taylor series is,

f(x) = f(a) + [f'(a)’/1!](x-a) + [f”(a)/2!](x-a)2 + [f”'(a)/3!](x-a)3 +…+ f(n)(x)/n!(x-a)n

Taylor Theorem Proof

We know that power series is defined as,

[Tex]f(x) = ∑ a_nx^n = a0 + a_1x + a_2x^2 + a_3x^3 + … [/Tex]          (i)

where, 0≤n<∞

for x = 0

f(x) = ao

The differentiation of the function f(x) from eq (i) is,

[Tex]f'(x) = a_1 + 2a_2x + 3a_3x^2 + 4a_4x^3 …   [/Tex]          (ii)

substituting x = 0 in f'(x)

f'(0) = a1

Differentiating eq (ii) again,

[Tex]f”(x) = 2a_2 + 6a_3x + 12a_4x^2 + …[/Tex]

substituting x = 0 in f”(x)

f”(0) = 2a2

f”(0)/2! = 2a2/2 = a2

similarly, f(n)(0)/n! = an

Now substituting all these values in eq(i)

[Tex]f(x) = f(0) + f'(0)x + f”(0)/2!(x)^2 + f”'(0)/3!x^3 + …[/Tex]

Generalizing the function f(x) we get,

[Tex]f(x) = b + b1(x-a) + b2(x-a)^2 + b3(x-a)^3 + …[/Tex]

Now taking x =a,

[Tex]b_n = f^{(n)}(a)/n![/Tex]

Substituting the value of bn in a generalized form of f(x)

[Tex]f(x) = f(a) + [f'(a)/1!](x-a) + [f”(a)/2!](x-a)^2 +…[/Tex]

This proves the Taylor Series

Taylor Series of Sin x

Let’s take the function f(x) = sin x

f’(x) = cos x
f’’(x) = -sin x
f’’’(x) = -cos x
f’’’’(x) = sin x

Taylor series for sin x at x = 0 is,

Taylor Exapnsion of Sin X

Taylor Series of Cos x

Let’s take the function f(x) = cos x

f’(x) = -sin x
f’’(x) = -cos x
f’’’(x) = sin x
f’’’’(x) = -cos x

Taylor series for cos x at x = 0 is,

Taylor Expansion of Cos X

Taylor Series of ex

The Taylor series for ex around a = 0 (Maclaurin series):

ex = 1 + x + [Tex]\frac{x^2}{2!} [/Tex]+ [Tex]\frac{x^3}{3!} [/Tex]+ …

ex = [Tex]e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} [/Tex]

Taylor Series in Several Variables

Taylor series can also be represented for the function of several variables. The general form of the Taylor series in several variables is,

Taylor Series in Several Variables

Maclaurin Series

We know that the Taylor series is,

[Tex]f(x) = f(a) + [f'(a)’/1!](x-a) + [f”(a)/2!](x-a)^2 + [f”'(a)/3!](x-a)^3 +…+ f^{(n)}(x)/n!(x-a)^n[/Tex]

If the Taylor series is centred at x = 0, i.e. the value of f(x) is found at x = 0 then this series is called the Maclaurin Series.

Then the Maclaurin Series is,

[Tex]f(x) = f(0) + [f'(0)’/1!](x-0) + [f”(0)/2!](x)^2 + [f”'(0)/3!](x)^3 +…+ f^{(n)}(0)/n!(x)^n[/Tex]

This above series is known as the Maclaurin series.

Example: Maclaurin series of ex is,

Solution:

We know that the Maclaurin series expansion is,

f(x) = f(0) + [f'(0)’/1!](x) + [f”(0)/2!](x)2 + [f”'(0)/3!](x)3 +…+ f(n)(0)/n!(x)n

The Maclaurin series of ex is,

ex = 1 + x + x2/2! + x3/3! + x4/4! + . . .

Applications of Taylor Series in Engineering

Taylor series has wide applications and it is used in various engineering aspects. Some of the applications of the Taylor series are:

1. Numerical Analysis

In numerical analysis, the Taylor series is used to approximate functions and solve differential equations. It provides a way to estimate values of functions using polynomial approximations.

2. Signal Processing

In signal processing, the Taylor series helps in the analysis and synthesis of signals. It is used to approximate and filter signals, reducing computational complexity.

3. Control Systems

In control systems engineering, the Taylor series is used to linearize nonlinear systems around an operating point, simplifying the design and analysis of controllers.

4. Computational Physics

In computational physics, the Taylor series is used to solve complex physical models by approximating functions that describe physical phenomena, making simulations more efficient.

5. Machine Learning

In machine learning, the Taylor series is used in optimization algorithms to approximate gradient and Hessian matrices, aiding in the training of models.

People Also View:

Examples Using Taylor Series

Example 1: Find the expansion for the function, f(x) = x3 centred at a = 2 using the Taylor Series Formula.

Solution:

We know that Taylor Series Formula is

f(x) = f(a) + [f'(a)’/1!](x-a) + [f”(a)/2!](x-a)2 + [f”'(a)/3!](x-a)3 +…+ f(n)(x)/n!(x-a)n

Given function, f(x) = x3

Centered at a = 2

f'(x) = 3x2

f”(x) = 6x

f”'(x) = 6

f””(x) = 0

Now the Taylor Series expansion of f(x) = x3 is,

f(x) = f(2) + [f'(2)’/1!](x-2) + [f”(2)/2!](x-2)2 + [f”'(2)/3!](x-2)3 + f””(a)/4!(x-2)4

f(x) = 8 + 12(x-2) + 6(x-2)2 + (x-2)3 + 0

f(x) = (x-2)3 + 6(x-2)2 + 12x – 16

Example 2: Find the expansion for the function, f(x) = 4x centred at a = 1 using the Taylor Series Formula.

Solution:

We know that Taylor Series Formula is

f(x) = f(a) + [f'(a)’/1!](x-a) + [f”(a)/2!](x-a)2 + [f”'(a)/3!](x-a)3 +…+ f(n)(x)/n!(x-a)n

Given function, f(x) = 4x

Centered at a = 1

f'(x) = 4

f”(x) = 0

Now the Taylor Series expansion of f(x) = 4x is,

f(x) = f(1) + [f'(1)’/1!](x-1) + [f”(1)/2!](x-1)2

f(x) = 4 + 4(x-1) + 0

f(x) = 4x

Example 3: Find the Taylor series expansion for function, f(x) = sin x, centred at x = 0.

Solution:

f(x) = sin x

Using Taylor series formula,

f(x) = f(a) + f′(a)(x − a) + f′′(a)/2! × (x − a)2+ f′′′(a)/3! × (x − a)3+ f(4)(a)/4! × (x − a)4+ … + f(n)(a)/n! × (x − a)n

Derivatives of the six x are,

f(x) = sin (x)
f'(x) = cos (x)
f”(x) = -sin (x)
f”'(x) = -cos (x)

Now,

sin(x) = sin(a)+cos(a)/1! (x – a)−sin(a)/2! (x – a)2-cos(a)/3! (x – a)3+ …

Putting a = 0

sin(x) = 0+1/1! (x – 0)−0/2! (x- 0)2– 1/3! (x – 0)3+ …

sin(x) = 1/x – 1/6x3 + …

Example 4: Taylor Series for e^x around x = 0

Solution:

The Taylor Series for e^x around x = 0 is:

e^x = 1 + x + (x^2/2!) + (x^3/3!) + (x^4/4!) + …

Let’s use this to approximate e^0.5 up to the 4th term:

e^0.5 ≈ 1 + 0.5 + (0.5^2/2!) + (0.5^3/3!) + (0.5^4/4!)

≈ 1 + 0.5 + 0.125 + 0.0208333 + 0.0026042

≈ 1.6484375

The actual value of e^0.5 is approximately 1.6487212, so our approximation is quite close.

Example 5: Taylor Series for sin(x) around x = 0

Solution:

The Taylor Series for sin(x) around x = 0 is:

sin(x) = x – (x^3/3!) + (x^5/5!) – (x^7/7!) + …

Let’s use this to approximate sin(π/6) up to the 4th term:

sin(π/6) ≈ (π/6) – ((π/6)^3/3!) + ((π/6)^5/5!) – ((π/6)^7/7!)

≈ 0.5236 – 0.0023 + 0.0000 – 0.0000

≈ 0.5213

The actual value of sin(π/6) is 0.5, so our approximation is quite good.

Practice Questions on Taylor Series

1. Write the first four terms of the Taylor Series for cos(x) around x = 0.

2. Use the Taylor Series for ex to approximate e0.3 up to the third term.

3. What is the Taylor Series for ln(1+x) around x = 0? Write the first three terms.

4. Approximate √(1+x) near x = 0 using the first three terms of its Taylor Series.

5. Find the Taylor Series for 1/(1-x) around x = 0 and write the first four terms.

6. Use the Taylor Series for sin(x) to approximate sin(π/4) up to the third term.

7. Write the first three terms of the Taylor Series for tan(x) around x = 0.

8. Approximate cos(0.1) using the first four terms of its Taylor Series.

9. Find the Taylor Series for arctan(x) around x = 0 and write the first three terms.

10. Use the Taylor Series for ex to estimate the value of e to three decimal places.

Conclusion

The Taylor series is a fundamental tool in mathematics, providing powerful methods for approximating and analyzing functions. Its wide range of applications in engineering, physics, computer science, and beyond highlights its importance. Understanding and utilizing the Taylor series can significantly enhance problem-solving and analytical capabilities in various fields.

Taylor’s Series – FAQs

What are Taylor Series?

Taylor series is the expansion of any real or complex valued function. It is used to define the value of a function when the value of its derivatives at a particular point is defined.

It is widely used in Computer Science, Calculus, and other branches of science.

What is Taylor Series Formula?

The Taylor series formula for the expansion of a function f(x) is,

f(x) = f(a) + f′(a)(x − a) + f′′(a)/2! × (x − a)2+ f′′′(a)/3! × (x − a)3+ f(4)(a)/4! × (x − a)4+ … + f(n)(a)/n! × (x − a)n

Who Invented Taylor Series Formula?

Scottish mathematician James Gregory was the first to give an idea about the Taylor series and it was finally perfected by English mathematician Brook Taylor in 1715.

Who Invented Taylor Series Formula?

Scottish mathematician James Gregory was the first to explain the concept of the Taylor series and it was later fully developed by  English mathematician Brook Taylor in the year 1715.

What is difference between Taylor Series and Maclaurin Series?

Taylor series is a series which is used to represent the value of a function with respect to the infinite sum of the derivative of the polynomial or other function with respect to a fixed point.

While the Maclaurian series is a special case of the Taylor series and it is the expansion of the function with respect to zero as the single point.



Next Article

Similar Reads

three90RightbarBannerImg