Function Approximation

One of the most important applications of power series is approximating functions. Taylor series allow us to represent complicated functions as polynomials, which are much easier to work with.

Function Approximation Using Taylor Polynomials

If \(f(x)\) has derivatives of all orders at \(x = a\), then the \(n\)th-degree Taylor polynomial:

\(P_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k\)

provides an approximation of \(f(x)\) near \(x = a\). The error in this approximation is given by the remainder term:

\(R_n(x) = f(x) - P_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}\)

where \(c\) is some point between \(a\) and \(x\).

Example 1: Approximating \(\sin(x)\)

Approximate \(\sin(0.3)\) using the 3rd-degree Taylor polynomial centered at \(a = 0\).

Solution:

The 3rd-degree Taylor polynomial for \(\sin(x)\) centered at \(a = 0\) is:

\(P_3(x) = x - \frac{x^3}{3!} = x - \frac{x^3}{6}\)

Evaluating at \(x = 0.3\):

\begin{align} P_3(0.3) &= 0.3 - \frac{(0.3)^3}{6} \\ &= 0.3 - \frac{0.027}{6} \\ &= 0.3 - 0.0045 \\ &= 0.2955 \end{align}

The actual value of \(\sin(0.3) \approx 0.29552\), so our approximation is very accurate.

The error can be estimated using Taylor's Remainder Theorem:

\(|R_3(0.3)| \leq \frac{|f^{(4)}(c)|}{4!}|0.3|^4 \leq \frac{1}{24} \cdot (0.3)^4 \approx 3.38 \times 10^{-4}\)

where we used the fact that \(|f^{(4)}(c)| = |\sin(c)| \leq 1\).

Applications in Calculators and Computers

Modern calculators and computers use Taylor series to compute values of transcendental functions like \(\sin(x)\), \(\cos(x)\), \(e^x\), and \(\ln(x)\). Instead of storing all possible values, they use polynomial approximations derived from Taylor series.

Evaluating Integrals

Power series can be used to evaluate integrals that cannot be computed using elementary techniques.

Integration Using Power Series

If a function \(f(x)\) can be represented as a power series:

\(f(x) = \sum_{n=0}^{\infty} a_n x^n\)

Then its indefinite integral is:

\(\int f(x) \, dx = C + \sum_{n=0}^{\infty} \frac{a_n}{n+1} x^{n+1}\)

where \(C\) is a constant of integration.

Example 2: Evaluating a Non-Elementary Integral

Evaluate the integral \(\int_0^{0.5} e^{-x^2} \, dx\).

Solution:

The function \(e^{-x^2}\) doesn't have an elementary antiderivative. We can use the Maclaurin series for \(e^x\) and substitute \(-x^2\) for \(x\):

\begin{align} e^{-x^2} &= \sum_{n=0}^{\infty} \frac{(-x^2)^n}{n!} \\ &= \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{n!} \\ &= 1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \frac{x^8}{4!} - \ldots \end{align}

Integrating term by term:

\begin{align} \int e^{-x^2} \, dx &= \int \left(1 - x^2 + \frac{x^4}{2!} - \frac{x^6}{3!} + \frac{x^8}{4!} - \ldots\right) \, dx \\ &= x - \frac{x^3}{3} + \frac{x^5}{5 \cdot 2!} - \frac{x^7}{7 \cdot 3!} + \frac{x^9}{9 \cdot 4!} - \ldots + C \end{align}

Evaluating the definite integral:

\begin{align} \int_0^{0.5} e^{-x^2} \, dx &= \left[x - \frac{x^3}{3} + \frac{x^5}{5 \cdot 2!} - \frac{x^7}{7 \cdot 3!} + \frac{x^9}{9 \cdot 4!} - \ldots\right]_0^{0.5} \\ &= \left(0.5 - \frac{(0.5)^3}{3} + \frac{(0.5)^5}{5 \cdot 2!} - \frac{(0.5)^7}{7 \cdot 3!} + \frac{(0.5)^9}{9 \cdot 4!} - \ldots\right) - 0 \\ &\approx 0.5 - 0.0417 + 0.0026 - 0.0001 + \ldots \\ &\approx 0.4608 \end{align}

Therefore, \(\int_0^{0.5} e^{-x^2} \, dx \approx 0.4608\).

Note: This integral is related to the error function \(\text{erf}(x)\), which is important in probability theory and statistics.

Solving Differential Equations

Power series methods provide a powerful technique for solving differential equations, especially when other methods fail.

Power Series Method for Differential Equations

To solve a differential equation of the form \(y''+ P(x)y'+ Q(x)y = 0\) using the power series method:

  1. Assume a solution of the form \(y(x) = \sum_{n=0}^{\infty} a_n x^n\)
  2. Substitute this series into the differential equation
  3. Collect like terms and set the coefficient of each power of \(x\) equal to zero
  4. Solve for the coefficients \(a_n\) recursively

Example 3: Solving a Differential Equation

Find a power series solution for the differential equation \(y' - y = 0\) with initial condition \(y(0) = 1\).

Solution:

Let's assume a solution of the form:

\(y(x) = \sum_{n=0}^{\infty} a_n x^n = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + \ldots\)

Taking the derivative:

\(y'(x) = \sum_{n=1}^{\infty} n a_n x^{n-1} = a_1 + 2a_2 x + 3a_3 x^2 + 4a_4 x^3 + \ldots\)

Substituting into the differential equation \(y' - y = 0\):

\begin{align} y' - y &= 0 \\ (a_1 + 2a_2 x + 3a_3 x^2 + 4a_4 x^3 + \ldots) - (a_0 + a_1 x + a_2 x^2 + a_3 x^3 + \ldots) &= 0 \\ (a_1 - a_0) + (2a_2 - a_1)x + (3a_3 - a_2)x^2 + (4a_4 - a_3)x^3 + \ldots &= 0 \end{align}

For this equation to be satisfied for all \(x\), the coefficient of each power of \(x\) must be zero:

\begin{align} a_1 - a_0 &= 0 \implies a_1 = a_0 \\ 2a_2 - a_1 &= 0 \implies a_2 = \frac{a_1}{2} = \frac{a_0}{2} \\ 3a_3 - a_2 &= 0 \implies a_3 = \frac{a_2}{3} = \frac{a_0}{2 \cdot 3} = \frac{a_0}{3!} \\ 4a_4 - a_3 &= 0 \implies a_4 = \frac{a_3}{4} = \frac{a_0}{3! \cdot 4} = \frac{a_0}{4!} \end{align}

We can see a pattern: \(a_n = \frac{a_0}{n!}\) for \(n \geq 0\).

Using the initial condition \(y(0) = 1\), we have \(a_0 = 1\).

Therefore, \(a_n = \frac{1}{n!}\) for \(n \geq 0\), and the solution is:

\begin{align} y(x) &= \sum_{n=0}^{\infty} \frac{x^n}{n!} \\ &= 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \ldots \\ &= e^x \end{align}

This makes sense because \(e^x\) is indeed the solution to \(y' - y = 0\) with \(y(0) = 1\).

Important Differential Equations

Many important differential equations in physics and engineering can be solved using power series methods, including:

  • Bessel's equation: \(x^2y'' + xy' + (x^2 - n^2)y = 0\)
  • Legendre's equation: \((1-x^2)y'' - 2xy' + n(n+1)y = 0\)
  • Airy's equation: \(y'' - xy = 0\)

The solutions to these equations (Bessel functions, Legendre polynomials, and Airy functions) are widely used in physics and engineering applications.

Applications in Physics

Power series and Taylor series have numerous applications in physics, helping to solve complex problems and model physical phenomena.

Quantum Mechanics

In quantum mechanics, power series are used to:

  • Solve the Schrödinger equation for various potentials
  • Develop perturbation theory for approximating solutions to complex problems
  • Express wave functions for quantum systems

Example 4: Quantum Harmonic Oscillator

The quantum harmonic oscillator is described by the differential equation:

\(\frac{d^2\psi}{dx^2} + (2E - x^2)\psi = 0\)

This equation can be solved using power series methods, leading to the Hermite polynomials that describe the wave functions of the oscillator.

Electromagnetism

In electromagnetism, power series are used to:

  • Expand electromagnetic potentials in multipole expansions
  • Solve Maxwell's equations in complex geometries
  • Analyze wave propagation in various media

Statistical Mechanics

In statistical mechanics, power series are used to:

  • Develop virial expansions for non-ideal gases
  • Calculate partition functions and thermodynamic properties
  • Analyze phase transitions and critical phenomena

Applications in Engineering

Power series methods are widely used in various engineering disciplines to model and analyze complex systems.

Control Systems

In control systems engineering, power series are used to:

  • Analyze system stability through transfer functions
  • Design controllers for linear and nonlinear systems
  • Model time-delay systems using Padé approximations

Signal Processing

In signal processing, power series are used to:

  • Develop Fourier series representations of periodic signals
  • Design digital filters
  • Analyze frequency responses of systems

Example 5: Fourier Series

The Fourier series represents a periodic function as a sum of sines and cosines:

\(f(x) = \frac{a_0}{2} + \sum_{n=1}^{\infty} \left[a_n \cos(nx) + b_n \sin(nx)\right]\)

This is a type of power series that is particularly useful in signal processing and communications engineering.

Structural Analysis

In structural engineering, power series are used to:

  • Analyze beam deflections under various loading conditions
  • Model vibrations in structures
  • Solve complex boundary value problems

Computational Applications

Power series methods are fundamental in computational mathematics and numerical analysis.

Numerical Integration

Power series can be used to develop numerical integration techniques, such as:

  • Gaussian quadrature methods
  • Romberg integration
  • Adaptive integration algorithms

Approximation Theory

In approximation theory, power series are used to:

  • Develop Chebyshev approximations for functions
  • Create Padé approximants for rational function approximations
  • Design interpolation schemes

Example 6: Padé Approximation

A Padé approximant is a rational function approximation of a function. For example, a [2,2] Padé approximant for \(e^x\) is:

\(e^x \approx \frac{1 + \frac{x}{2} + \frac{x^2}{12}}{1 - \frac{x}{2} + \frac{x^2}{12}}\)

This approximation is more accurate than a Taylor polynomial of the same degree over a larger range of \(x\) values.

Computer Algebra Systems

Power series methods are implemented in computer algebra systems to:

  • Solve differential equations symbolically
  • Compute limits and asymptotic expansions
  • Perform symbolic integration

Examples

Example 7: Approximating \(\pi\) Using Power Series

We can use the power series for \(\arctan(x)\) to approximate \(\pi\):

\(\arctan(x) = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{2n+1} = x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7} + \ldots\)

Since \(\arctan(1) = \frac{\pi}{4}\), we have:

\(\frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \ldots\)

Therefore:

\(\pi = 4\left(1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \ldots\right)\)

This is known as the Leibniz formula for \(\pi\). However, it converges very slowly. A faster-converging formula uses \(\arctan\) identities:

\(\pi = 16\arctan\left(\frac{1}{5}\right) - 4\arctan\left(\frac{1}{239}\right)\)

Using the power series for \(\arctan\), this formula converges much more quickly.

Example 8: Analyzing a Pendulum

The period of a simple pendulum of length \(L\) with maximum angle \(\theta_0\) is given by:

\(T = 2\pi\sqrt{\frac{L}{g}}\left(1 + \frac{1}{4}\sin^2\left(\frac{\theta_0}{2}\right) + \frac{9}{64}\sin^4\left(\frac{\theta_0}{2}\right) + \ldots\right)\)

This is a power series expansion of the complete elliptic integral of the first kind. For small angles, we can approximate:

\(T \approx 2\pi\sqrt{\frac{L}{g}}\left(1 + \frac{\theta_0^2}{16} + \ldots\right)\)

For \(\theta_0 = 30°\) (or \(\frac{\pi}{6}\) radians), the first-order approximation gives:

\begin{align} T &\approx 2\pi\sqrt{\frac{L}{g}}\left(1 + \frac{(\pi/6)^2}{16}\right) \\ &\approx 2\pi\sqrt{\frac{L}{g}} \cdot 1.0103 \\ &\approx 1.0103 \cdot T_0 \end{align}

where \(T_0 = 2\pi\sqrt{\frac{L}{g}}\) is the period for small oscillations. This shows that the period increases by about 1% for a maximum angle of 30°.

Interactive Visualizations

Explore Applications of Power Series

Use the controls below to explore different applications of power series and see how they work in practice.

3
0.5

Application Information

Function Approximation: Using Taylor polynomials to approximate functions

Formula: f(x) ≈ P₃(x) = 1 + x + x²/2 + x³/6

Error: |f(x) - P₃(x)| ≤ 0.0041 for |x| ≤ 0.5

Practice Exercises

Exercise 1

Use a Taylor series to approximate \(\int_0^{0.4} \sin(x^2) \, dx\) with an error of less than \(10^{-4}\).

Exercise 2

Use power series to solve the differential equation \(y'' + xy = 0\) with initial conditions \(y(0) = 1\) and \(y'(0) = 0\).

Exercise 3

A rocket is launched vertically with an initial velocity of 100 m/s. The acceleration due to gravity is \(g = 9.8\) m/s², and air resistance is proportional to the square of the velocity with a coefficient of \(k = 0.002\) s²/m². Use a Taylor series to approximate the maximum height reached by the rocket.