Why This Matters
A power series is an infinite polynomial: c(0) + c(1)*x + c(2)*x^2 + c(3)*x^3 + ... . Unlike a regular polynomial that has finitely many terms, a power series can represent functions that polynomials cannot -- including exponentials, trigonometric functions, and logarithms. Every time your computer evaluates sin(0.5) or e^(-3), it is using a truncated power series under the hood.
The critical question for any power series is: for which values of x does it converge? The answer is determined by the radius of convergence R. The series converges for all x with |x| less than R and diverges for |x| greater than R. Finding R typically involves the ratio test applied to the coefficients. The full interval of convergence also requires checking the endpoints x = -R and x = R separately, since behavior at the boundary can go either way.
Power series are the bridge between algebra and analysis. They let you do calculus on functions by doing calculus on polynomials: you can differentiate and integrate a power series term by term within its interval of convergence. This makes them indispensable in differential equations, numerical methods, and theoretical mathematics.
Define Terms
Visual Model
The full process at a glance. Click Start tour to walk through each step.
The radius of convergence R determines where a power series is valid. Inside the radius it converges, outside it diverges, and the endpoints require separate analysis.
Code Example
// Power Series: Radius of Convergence
// Evaluate a power series at a point
function evaluatePowerSeries(coefficients, x, nTerms) {
let sum = 0;
let xPow = 1; // x^0 = 1
for (let n = 0; n < nTerms; n++) {
sum += coefficients(n) * xPow;
xPow *= x;
}
return sum;
}
// Example 1: e^x = sum of x^n / n!
// c(n) = 1/n!, radius R = infinity
function factorial(n) { let r = 1; for (let i = 2; i <= n; i++) r *= i; return r; }
const expCoeffs = (n) => 1 / factorial(n);
console.log("e^1 via power series (20 terms):", evaluatePowerSeries(expCoeffs, 1, 20).toFixed(6));
console.log("e^1 exact:", Math.E.toFixed(6));
console.log("e^(-3) via power series:", evaluatePowerSeries(expCoeffs, -3, 30).toFixed(6));
console.log("e^(-3) exact:", Math.exp(-3).toFixed(6));
// Example 2: 1/(1-x) = sum of x^n, R = 1
const geoCoeffs = (n) => 1;
console.log("\n1/(1-0.5) via series:", evaluatePowerSeries(geoCoeffs, 0.5, 30).toFixed(6));
console.log("1/(1-0.5) exact:", (1 / 0.5).toFixed(6));
console.log("1/(1-0.99) via series (50 terms):", evaluatePowerSeries(geoCoeffs, 0.99, 50).toFixed(2));
// Find radius of convergence using ratio test
function findRadius(coeffFn, N) {
let lastRatio = 0;
for (let n = 1; n <= N; n++) {
const cn = Math.abs(coeffFn(n));
const cn1 = Math.abs(coeffFn(n - 1));
if (cn1 !== 0) {
lastRatio = cn / cn1;
}
}
return lastRatio === 0 ? Infinity : 1 / lastRatio;
}
console.log("\nRadius for e^x series:", findRadius(expCoeffs, 20));
// ln(1+x) = sum of (-1)^(n+1) * x^n / n, R = 1
const lnCoeffs = (n) => n === 0 ? 0 : Math.pow(-1, n + 1) / n;
console.log("Radius for ln(1+x) series:", findRadius(lnCoeffs, 50).toFixed(2));
console.log("ln(1.5) via series:", evaluatePowerSeries(lnCoeffs, 0.5, 50).toFixed(6));
console.log("ln(1.5) exact:", Math.log(1.5).toFixed(6));Interactive Experiment
Try these exercises:
- Evaluate the geometric power series (c(n) = 1) at x = 0.5, 0.9, 0.99, and 1.0. Notice how convergence slows as x approaches the radius R = 1, and fails at x = 1.
- Compute the power series for e^x at x = 1, 5, and 10. How many terms do you need for 6-digit accuracy at each value?
- Try evaluating the ln(1+x) series at x = 0.5 (inside R=1), x = 1 (on the boundary), and x = 1.5 (outside). What happens?
- For the series sum(x^n / n^2), use the ratio test to find R. Then check the endpoints x = 1 and x = -1 separately.
- Compare the speed of convergence for e^x at x = 0.1 versus x = 5. How does distance from the center affect the number of terms needed?
Quick Quiz
Coding Challenge
Write a function called `findR` that takes an integer k and computes the radius of convergence for the power series sum(n^k * x^n / 3^n, n=1..inf). The coefficients are c(n) = n^k / 3^n. Use the ratio test: compute |c(n+1)/c(n)| for n = 1000 and return R = 1/ratio, rounded to 1 decimal place, as a string like '3.0'.
Real-World Usage
Power series are foundational to modern computation and science:
- Function evaluation: CPUs use polynomial approximations (truncated power series) to compute transcendental functions like sin, cos, exp, and log.
- Differential equations: Many differential equations are solved by assuming a power series solution and finding the coefficients recursively.
- Numerical methods: Finite difference methods and Runge-Kutta methods are derived using power series expansions of the solution.
- Physics: Perturbation theory in quantum mechanics and general relativity expresses solutions as power series in a small parameter.
- Computer graphics: Bezier curves and splines are related to power series representations of smooth curves.