7 Taylor Series
The tangent line \(f(a) + f'(a)(x-a)\) captures the local linearity of \(f\) near \(a\): the error is \(o(x-a)\). But if \(f\) is twice differentiable, the tangent line is discarding information. The second derivative records whether \(f\) is curving up or down; the third records how that curvature is changing. Each derivative of \(f\) at \(a\) is a datum about the local shape of \(f\), and there is a natural way to incorporate all of them into an approximation: find the unique polynomial of degree at most \(n\) that matches \(f\) and all its derivatives at \(a\) up to order \(n\).
For \(f(x) = e^x\) at \(a = 0\), the tangent line gives \(f(1) \approx 2\), while the actual value is \(e \approx 2.718\). Adding the quadratic term \(x^2/2\) gives \(1 + 1 + 1/2 = 2.5\). Adding \(x^3/6\) gives \(\approx 2.667\). Each term improves the approximation, and the question is whether — and how fast — the approximations converge to \(f\) as we include more terms.

Two things turn out to be true, and they pull in opposite directions. For most functions one encounters — exponentials, trigonometric functions, rational functions away from their poles — the Taylor polynomials do converge to \(f\) on some interval around \(a\), and the function is genuinely recovered from its local differential data. But there exist smooth functions for which this fails completely: all derivatives at \(a\) are zero, yet the function is not zero. The Taylor series converges, but to the wrong function. Understanding why this happens — and what structural property separates the well-behaved case from the pathological one — is the point of the last section.
7.1 Polynomial Spaces
Polynomials of degree at most \(n\) form a vector space \(\mathcal{P}_n\) of dimension \(n+1\). Recall from Section 6.1 that we can add polynomials and scale them by constants. A basis for \(\mathcal{P}_n\) adapted to the point \(a\) is \[ \{1,\; (x-a),\; (x-a)^2,\; \ldots,\; (x-a)^n\}. \] These \(n+1\) functions are linearly independent — no nontrivial linear combination produces the zero polynomial — and every \(P \in \mathcal{P}_n\) is written uniquely as \[ P(x) = c_0 + c_1(x-a) + c_2(x-a)^2 + \cdots + c_n(x-a)^n. \] The numbers \(c_0, \ldots, c_n\) are the coordinates of \(P\) in this basis. This is the same structure as in ?sec-linear-intro: a finite-dimensional vector space with a specific basis, and coordinates determined by that basis.
The choice of basis is adapted to \(a\) for a concrete reason: the basis function \((x-a)^k\) vanishes at \(a\) for every \(k \geq 1\), so the behaviour of \(P\) and its derivatives at \(a\) is easy to read off. Evaluating \(P\) at \(a\) gives \(c_0\). Differentiating once and evaluating gives \(c_1\). The basis is designed so that differentiation at \(a\) isolates one coordinate at a time.
Given \(f\), the natural approximation problem in \(\mathcal{P}_n\) is: find the polynomial that agrees with \(f\) to highest possible order at \(a\), meaning match as many derivatives as possible there. We can match exactly \(n+1\) conditions — \(P(a) = f(a)\), \(P'(a) = f'(a)\), , \(P^{(n)}(a) = f^{(n)}(a)\) — and there is a unique element of \(\mathcal{P}_n\) doing so, since the conditions determine all \(n+1\) coefficients.
7.2 Derivatives and Coefficients
The matching conditions force the coefficients explicitly. Starting from \(P(x) = \sum_{k=0}^n c_k(x-a)^k\):
Evaluate at \(x = a\): every term with \(k \geq 1\) vanishes, leaving \(P(a) = c_0\). So \(c_0 = f(a)\).
Differentiate once: \(P'(x) = c_1 + 2c_2(x-a) + \cdots + nc_n(x-a)^{n-1}\). Evaluate at \(a\): \(P'(a) = c_1\). So \(c_1 = f'(a)\).
Differentiate again: \(P''(x) = 2c_2 + 6c_3(x-a) + \cdots\). Evaluate at \(a\): \(P''(a) = 2c_2\). So \(c_2 = f''(a)/2\).
The pattern is clear. Differentiating \(j\) times and evaluating at \(a\) isolates \(c_j\) because: the \(k < j\) terms have been differentiated to zero, and the \(k > j\) terms still carry a factor of \((x-a)\) that vanishes at \(a\). What remains is \[ P^{(j)}(a) = j!\, c_j. \] Requiring \(P^{(j)}(a) = f^{(j)}(a)\) therefore forces \[ c_j = \frac{f^{(j)}(a)}{j!}. \] The coordinates are the derivatives, scaled by factorials. The factor \(1/j!\) is not a convention — it is the exact correction needed to undo the factorial that differentiation introduces.
7.3 The Normalized Basis
The coordinates \(f^{(k)}(a)/k!\) are clean enough, but the factorial in the denominator is a symptom of a mismatch between the basis and the operation of differentiation. There is a better basis that removes it.
Definition 7.1 (Normalized basis) The normalized basis for \(\mathcal{P}_n\) centered at \(a\) is \[ \mathcal{B} = \left\{1,\; (x-a),\; \frac{(x-a)^2}{2!},\; \frac{(x-a)^3}{3!},\; \ldots,\; \frac{(x-a)^n}{n!}\right\}. \]
This is a valid basis — it is just a rescaling of the standard basis, so it spans \(\mathcal{P}_n\) and its elements are linearly independent. But in \(\mathcal{B}\)-coordinates, the Taylor polynomial takes the form \[ T_n(x) = f(a) \cdot 1 + f'(a) \cdot (x-a) + f''(a) \cdot \frac{(x-a)^2}{2!} + \cdots + f^{(n)}(a) \cdot \frac{(x-a)^n}{n!}, \] so the \(k\)th coordinate is simply \(f^{(k)}(a)\) — the \(k\)th derivative, with no factorial. The basis functions absorb the factorials, and the coordinates become the raw derivatives.
The reason this is the right basis is that differentiation acts on \(\mathcal{B}\)-coordinates as a left shift. Differentiating the \(k\)th basis element: \[ \frac{d}{dx}\,\frac{(x-a)^k}{k!} = \frac{(x-a)^{k-1}}{(k-1)!}, \] which is the \((k-1)\)th basis element. So if a polynomial \(P\) has \(\mathcal{B}\)-coordinates \((c_0, c_1, c_2, \ldots, c_n)\), then \(P'\) has \(\mathcal{B}\)-coordinates \((c_1, c_2, c_3, \ldots, c_n, 0)\): differentiation is a left shift, dropping \(c_0\) and moving everything else one step to the left. Integration is a right shift, appending a free constant on the left.
This is the cleanest possible description of differentiation as a linear operator on polynomial spaces, and it is not an accident. It persists when we pass from polynomials to power series: there the coordinate vector becomes an infinite sequence \((c_0, c_1, c_2, \ldots)\), and differentiation is still a left shift on that sequence. The spaces of square-summable sequences, the Hardy spaces of analytic functions on the disk, and the Fock spaces of quantum field theory all carry versions of this same shift structure. The normalized basis is the choice that makes this algebraic picture visible already at the polynomial level.
In multivariable calculus the second-order Taylor expansion of \(f : \mathbb{R}^n \to \mathbb{R}\) at \(a\) is \[ f(a+h) = f(a) + Df_a(h) + \tfrac{1}{2}D^2f_a(h,h) + o(\|h\|^2), \] where \(D^2f_a\) is the Hessian bilinear form. The factor \(1/2!\) there is the same normalization: the second-order term is \(\frac{1}{2!}\) times the second derivative applied to \(h\) twice. The normalized basis in one variable is the one-dimensional shadow of this general pattern, and the Taylor expansion in \(\mathbb{R}^n\) in multi-index notation \(\sum_{|\alpha| \leq k} \frac{\partial^\alpha f(a)}{\alpha!} h^\alpha\) is exactly the multivariable version of the coordinate formula in \(\mathcal{B}\).
7.4 The Taylor Polynomial
Definition 7.2 (Taylor polynomial) Let \(f\) be \(n\) times differentiable at \(a\). The \(n\)th Taylor polynomial of \(f\) at \(a\) is \[ T_n(x) = \sum_{k=0}^{n} \frac{f^{(k)}(a)}{k!}(x-a)^k. \] It is the unique element of \(\mathcal{P}_n\) satisfying \(T_n^{(j)}(a) = f^{(j)}(a)\) for \(j = 0, \ldots, n\).
The map \(f \mapsto T_n[f]\) is a linear operator from the space of \(n\)-times differentiable functions to \(\mathcal{P}_n\). It is idempotent: \(T_n[T_n[f]] = T_n[f]\), since \(T_n[f]\) is already a polynomial of degree \(\leq n\) whose derivatives at \(a\) already match those of \(T_n[f]\). So \(T_n\) is a projection — a linear retraction onto \(\mathcal{P}_n\) — defined by the \(n+1\) evaluation-at-\(a\) conditions \(P^{(j)}(a) = f^{(j)}(a)\).
The residual of this projection is \(R_n(x) = f(x) - T_n(x)\). By construction it satisfies \(R_n^{(j)}(a) = 0\) for \(j = 0, \ldots, n\): the residual has a zero of order \(n+1\) at \(a\). This is what “matching to order \(n\)” means: \(f\) and \(T_n[f]\) agree, along with all their derivatives up to order \(n\), at the single point \(a\).
It is worth being precise about what kind of projection \(T_n\) is. It is not an orthogonal projection in a Hilbert space sense — it does not minimise \(\|f - P\|\) in any \(L^2\) norm over an interval. The projection is defined by point evaluation functionals \(f \mapsto f^{(j)}(a)\), not by an inner product. The residual \(R_n\) is “orthogonal” to \(\mathcal{P}_n\) only in the sense that it vanishes to order \(n+1\) at \(a\), not in the sense that \(\langle R_n, P \rangle = 0\) for all \(P \in \mathcal{P}_n\). This distinction matters: a function can have a zero Taylor series at \(a\) — zero projection — while being nowhere near zero elsewhere. The function \(e^{-1/x^2}\) in the last section is exactly this.

Examples. For \(f(x) = e^x\) at \(a = 0\), every derivative is \(1\) at \(0\), so the \(\mathcal{B}\)-coordinates are all \(1\): \[ T_n(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots + \frac{x^n}{n!}. \] The coordinate sequence \((1,1,1,\ldots)\) is fixed by the left shift — differentiating \(e^x\) leaves it unchanged, as expected.
For \(f(x) = \sin x\) at \(a = 0\), the \(\mathcal{B}\)-coordinates cycle as \((0, 1, 0, -1, 0, 1, \ldots)\) — the derivative sequence at \(0\). Only odd terms survive: \[ T_{2m+1}(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots + \frac{(-1)^m x^{2m+1}}{(2m+1)!}. \] Applying the left shift gives the coordinate sequence of \(\cos x\), which is \((1, 0, -1, 0, 1, \ldots)\), and \(T_{2m}(x) = 1 - x^2/2! + \cdots + (-1)^m x^{2m}/(2m)!\). Differentiation is a left shift, confirmed.
For \(f(x) = 1/(1-x)\) at \(a = 0\), the \(n\)th derivative is \(n!/(1-x)^{n+1}\), so \(f^{(n)}(0) = n!\) and \(c_n = f^{(n)}(0)/n! = 1\). Every coordinate in \(\mathcal{B}\) is \(1\), and \(T_n(x) = 1 + x + x^2 + \cdots + x^n\) — the partial sums of the geometric series.
7.5 Taylor Series
If \(f\) is \(C^\infty\) at \(a\), the Taylor polynomial \(T_n\) is defined for every \(n\). As \(n\) increases, each \(T_n\) matches one more derivative of \(f\) at \(a\), and the sequence \(T_0, T_1, T_2, \ldots\) is a sequence of increasingly refined polynomial approximations. The Taylor series is the limit of this sequence — formally, the infinite linear combination obtained by letting \(n \to \infty\).
Definition 7.3 (Taylor series) Let \(f \in C^\infty\) at \(a\). The Taylor series of \(f\) centered at \(a\) is \[ \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n. \] When \(a = 0\) this is the Maclaurin series.
In \(\mathcal{B}\)-coordinates, the Taylor series is the infinite coordinate vector \((f(a), f'(a), f''(a), \ldots)\) expanded in the infinite normalized basis \(\{(x-a)^k/k!\}_{k=0}^\infty\). The function \(f\) is being expressed as an element of an infinite-dimensional function space — the space of formal power series — with coordinates given by its derivatives at \(a\).
In the power series chapter, we established that if \(f(x) = \sum c_n(x-a)^n\) converges on some interval, then the coefficients are uniquely \(c_n = f^{(n)}(a)/n!\). Taylor series are the converse construction: given \(f \in C^\infty\), build the power series from derivatives. The two chapters are asking the same question from opposite ends — one starts with coefficients and asks what function they define; the other starts with a function and asks what coefficients represent it.
The Taylor series always exists as a formal object when \(f \in C^\infty\). Whether it converges, and if so whether it converges to \(f\), are separate questions — and the second can fail even when the first holds, as the last section makes clear.
7.6 Taylor’s Theorem
For the Taylor series to represent \(f\) at \(x\), the residuals \(R_n(x) = f(x) - T_n(x)\) must go to zero. Taylor’s theorem gives an explicit formula for the residual.
Theorem 7.1 (Taylor’s theorem (Lagrange remainder)) Let \(f\) be \((n+1)\) times differentiable on an open interval containing \(a\) and \(x\). Then there exists \(c\) strictly between \(a\) and \(x\) such that \[ R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}. \]
The residual has the form of the \((n+1)\)th term in the Taylor expansion, but with \(f^{(n+1)}\) evaluated at an unknown intermediate point \(c\) rather than at \(a\). This is the mean value theorem at higher order: the \(n=0\) case is exactly \(f(x) - f(a) = f'(c)(x-a)\). In both cases, one bounds the relevant derivative rather than trying to locate \(c\) explicitly.
The residual is also the projection error of \(T_n\) as a projection onto \(\mathcal{P}_n\). But as noted above, this projection is not orthogonal in a Hilbert space sense — it is defined by derivative-matching at \(a\), not by minimising a norm. What Taylor’s theorem gives is a formula for the residual in terms of higher derivatives, which is exactly what is needed to prove convergence.
Define \[ \phi(t) = f(x) - \sum_{k=0}^{n} \frac{f^{(k)}(t)}{k!}(x-t)^k - K(x-t)^{n+1}, \] choosing \(K\) so that \(\phi(a) = 0\). This forces \(K = R_n(x)/(x-a)^{n+1}\). By construction \(\phi(x) = 0\) as well. Since \(\phi(a) = \phi(x) = 0\) and \(\phi\) is differentiable, Rolle’s theorem provides \(c\) strictly between \(a\) and \(x\) with \(\phi'(c) = 0\).
Differentiating \(\phi\) with respect to \(t\) — the sum telescopes by the product rule, with consecutive terms cancelling: \[ \phi'(t) = -\frac{f^{(n+1)}(t)}{n!}(x-t)^n + K(n+1)(x-t)^n. \] Setting \(\phi'(c) = 0\) and solving gives \(K = f^{(n+1)}(c)/(n+1)!\), and therefore \[ R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}. \qquad \square \]
Corollary 7.1 (Error bound) If \(|f^{(n+1)}(t)| \leq M\) for all \(t\) between \(a\) and \(x\), then \[ |R_n(x)| \leq \frac{M}{(n+1)!}|x-a|^{n+1}. \]
The bound depends on \(x\) and \(M\) but not on the location of \(c\) — the unknown intermediate point drops out. To prove \(R_n(x) \to 0\) it is enough to bound the \((n+1)\)th derivative and observe that \(r^{n+1}/(n+1)! \to 0\) for any fixed \(r\).
Example. For \(f(x) = \cos x\) at \(a=0\), every derivative is bounded by \(1\), so \(|R_n(x)| \leq |x|^{n+1}/(n+1)!\) for every \(n\). At \(x = 0.2\) and \(n = 4\): the residual is at most \((0.2)^5/5! \approx 2.7 \times 10^{-6}\). The approximation \(T_4(0.2) = 1 - 0.02 + 0.0016/24 \approx 0.980067\) agrees with \(\cos(0.2)\) to six decimal places, consistent with the bound.
7.7 Convergence of Taylor Series
The strategy for proving that the Taylor series of \(f\) converges to \(f\) at \(x\) is: bound \(|f^{(n+1)}(t)|\) on the interval between \(a\) and \(x\), then show the error bound \(M|x-a|^{n+1}/(n+1)!\) goes to zero. Since \(r^n/n! \to 0\) for any fixed \(r\), it suffices to find a bound \(M\) that is independent of \(n\).
\(e^x\). Every derivative of \(e^x\) is \(e^x\), so \(|f^{(n+1)}(t)| \leq e^{|x|}\) for all \(t\) between \(0\) and \(x\). The error bound is \[ |R_n(x)| \leq \frac{e^{|x|}\cdot|x|^{n+1}}{(n+1)!} \to 0 \] for every fixed \(x\). Therefore \[ e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!}, \qquad x \in \mathbb{R}, \] and the radius of convergence is \(\infty\). In \(\mathcal{B}\)-coordinates the statement is: the coordinate sequence \((1,1,1,\ldots)\) defines a convergent series for every \(x\), and its sum is \(e^x\).
\(\sin x\) and \(\cos x\). All derivatives of \(\sin\) and \(\cos\) are bounded by \(1\), so the same estimate gives \(|R_n(x)| \leq |x|^{n+1}/(n+1)! \to 0\) for every \(x\), and both series converge on all of \(\mathbb{R}\): \[ \sin x = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}, \qquad \cos x = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!}. \] The cosine series can also be obtained from the sine series by differentiating term by term — differentiating a power series is a left shift on coefficients, exactly as on polynomials.

\(\ln(1+x)\). The \(n\)th derivative of \(\ln(1+x)\) is \((-1)^{n-1}(n-1)!/(1+x)^n\), so \(f^{(n)}(0) = (-1)^{n-1}(n-1)!\) and the Taylor series at \(0\) is \[ \ln(1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \cdots = \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}x^n. \] For \(x \in (0,1)\), the \((n+1)\)th derivative satisfies \(|f^{(n+1)}(c)| = n!/(1+c)^{n+1} \leq n!\), so \[ |R_n(x)| \leq \frac{n! \cdot x^{n+1}}{(n+1)!} = \frac{x^{n+1}}{n+1} \to 0. \] The series converges to \(\ln(1+x)\) on \((0,1)\).
\(1/(1-x)\). Every \(\mathcal{B}\)-coordinate is \(1\), so the Taylor series is \(\sum x^n\). For \(|x| < 1\) the remainder \(|R_n(x)| = |x|^{n+1}/|1-c| \to 0\); for \(|x| \geq 1\) the series diverges. The radius of convergence is exactly \(1\).
This last example raises a natural question: why does the Taylor series of \(1/(1-x)\) at \(0\) fail for \(x \leq -1\), even though the function is perfectly smooth there? The function is defined and smooth on all of \((-\infty, 1)\), so the radius of convergence cannot be explained by a real singularity to the left of \(0\). The answer requires viewing \(f\) as a function of a complex variable: in \(\mathbb{C}\), the function \(1/(1-z)\) has a pole at \(z = 1\), which lies at distance \(1\) from \(a = 0\). The radius of convergence of the Taylor series at \(a\) is the distance from \(a\) to the nearest singularity of \(f\) in the complex plane, regardless of where that singularity lies relative to the real axis. For \(e^x\), \(\sin x\), \(\cos x\) there are no singularities anywhere in \(\mathbb{C}\), so the radius is infinite. This fact — that the radius of convergence is a complex-analytic quantity — is proved properly in complex analysis, but it explains behaviour that would otherwise seem mysterious on the real line.
The Taylor series perspective and the power series perspective of the previous chapter are complementary. Power series asks: given coefficients \(c_n\), when does \(\sum c_n(x-a)^n\) converge, and what function does it define? Taylor series asks: given \(f \in C^\infty\), which coefficients represent it — are they \(c_n = f^{(n)}(a)/n!\), and does the resulting series converge back to \(f\)? Power series theory locates the radius of convergence from the coefficients; Taylor series theory identifies the coefficients from the function and asks whether the round trip \(f \mapsto \{c_n\} \mapsto \sum c_n(x-a)^n\) returns to \(f\).
7.8 Limitations of Taylor Series
For \(e^x\), \(\sin x\), \(\cos x\), and \(1/(1-x)\) on \(|x| < 1\), the Taylor series converges to the function. One might expect this for any \(C^\infty\) function, since all derivatives exist. It does not hold in general.
Consider \[ f(x) = \begin{cases} e^{-1/x^2} & x \neq 0, \\ 0 & x = 0. \end{cases} \] This function is \(C^\infty\) everywhere. One verifies by induction that for \(x \neq 0\), \(f^{(n)}(x) = P_n(1/x)\,e^{-1/x^2}\) for some polynomial \(P_n\). Since \(e^{-1/x^2}\) decays faster than any power of \(x\) as \(x \to 0\), each derivative approaches \(0\) as \(x \to 0\), confirming that \(f^{(n)}(0) = 0\) for every \(n \geq 0\). The \(\mathcal{B}\)-coordinates of \(f\) at \(0\) are therefore all zero, and the Taylor series at \(0\) is the zero series: \[ \sum_{n=0}^{\infty} \frac{0}{n!}\, x^n = 0. \] This series converges everywhere — but to the zero function, not to \(f\). Since \(f(x) = e^{-1/x^2} > 0\) for all \(x \neq 0\), the Taylor series fails to represent \(f\) at every nonzero point.
This failure has a precise interpretation in terms of the projection \(T_n\). The map \(f \mapsto T_n[f]\) projects onto \(\mathcal{P}_n\) by matching derivatives at \(0\). For this particular \(f\), every projection is the zero polynomial: \(T_n[f] = 0\) for every \(n\). The residuals \(R_n = f - T_n[f] = f\) do not go to zero — they stay equal to \(f\) regardless of \(n\). No matter how many terms we include, the Taylor approximation at \(0\) says nothing about \(f\) away from \(0\).
The geometric picture is this: \(f\) has zero projection onto every \(\mathcal{P}_n\), and the closure of \(\bigcup_n \mathcal{P}_n\) in the relevant function space does not contain \(f\). If the projection were orthogonal in a Hilbert space sense — minimising \(\|f - P\|_{L^2}\) over some interval — the approximations would improve as \(n\) grew, and \(f\) would be captured in the limit if and only if \(f\) belonged to the Hilbert space closure of the polynomials. The Weierstrass theorem ensures that \(C^\infty\) functions are in the \(L^\infty\) closure of polynomials on any compact interval, so an \(L^2\)-optimal projection would converge. The Taylor projection is not that: it is a different projection, defined by point evaluations at \(a\), and it captures only the local data at \(a\). A function that hides all its mass away from \(a\) — like \(e^{-1/x^2}\), which is essentially zero near \(0\) and only nontrivial further away — is invisible to it.
This is the boundary between two classes of smooth functions. A \(C^\infty\) function is real analytic at \(a\) (written \(C^\omega\)) if its Taylor series converges to it in some neighbourhood of \(a\). The containment \(C^\omega \subsetneq C^\infty\) is strict: \(e^{-1/x^2}\) is \(C^\infty\) but not \(C^\omega\) at \(0\). For real analytic functions, the germ at \(a\) — the values of all derivatives at the single point \(a\) — determines \(f\) completely on a neighbourhood. For merely smooth functions, it does not: the local data at \(a\) and the global behaviour away from \(a\) can be completely decoupled.
The smooth non-analytic functions are not pathologies. They are indispensable. Bump functions — \(C^\infty\) functions that are \(1\) on a compact set and \(0\) outside a slightly larger one — cannot be real analytic, because an analytic function that vanishes on an open set vanishes identically on its connected component. Every partition of unity, every cutoff argument in PDE theory, every mollification construction uses functions in \(C^\infty \setminus C^\omega\). The space \(C^\infty \setminus C^\omega\) is not a gap to be filled but a resource to be used.
7.9 Summary
Taylor series are coordinate representations of functions in the normalized basis \(\{(x-a)^k/k!\}_{k \geq 0}\), with the \(k\)th coordinate being \(f^{(k)}(a)\): \[ f(x) = \sum_{k=0}^{\infty} \underbrace{f^{(k)}(a)}_{\text{coordinate}} \cdot \underbrace{\frac{(x-a)^k}{k!}}_{\text{basis element}}. \] The map \(f \mapsto T_n[f]\) is a projection onto \(\mathcal{P}_n\) defined by derivative-matching at \(a\); it is linear and idempotent but not orthogonal in an \(L^2\) sense. The residual \(R_n = f - T_n[f]\) vanishes to order \(n+1\) at \(a\). Taylor’s theorem gives \(R_n(x) = f^{(n+1)}(c)(x-a)^{n+1}/(n+1)!\) for some intermediate \(c\), and the series represents \(f\) at \(x\) if and only if \(R_n(x) \to 0\).
Differentiation acts as a left shift on \(\mathcal{B}\)-coordinates: if \(f\) has coordinate sequence \((c_0, c_1, c_2, \ldots)\) then \(f'\) has coordinate sequence \((c_1, c_2, c_3, \ldots)\). When the Taylor series converges to \(f\), the function is completely determined by its local differential data at \(a\) — the sequence \((f(a), f'(a), f''(a), \ldots)\) encodes everything. When it does not, as for \(e^{-1/x^2}\), the local data and the global behaviour are decoupled. The class of functions for which the Taylor series works — real analytic functions — is a proper subclass of \(C^\infty\), and both classes are important.
Computing Taylor polynomials and analyzing approximation quality.
For \(f(x) = \cos(x)\), compute the Taylor polynomial \(T_4(x)\) centered at \(a = 0\) by finding the first four derivatives and applying Definition 7.2.
Use your result from part (a) to approximate \(\cos(0.2)\) using \(T_4(0.2)\).
Apply Corollary 7.1 to estimate the error \(|R_4(0.2)|\) in your approximation. Specifically, find a bound \(M\) such that \(|f^{(5)}(t)| \leq M\) for all \(t \in [0, 0.2]\), then compute \(\frac{M \cdot (0.2)^5}{5!}\).
The actual value is \(\cos(0.2) \approx 0.980067\). Compare this to your approximation from part (b) and verify that the actual error is less than your bound from part (c).
Convergence of Taylor series via remainder analysis.
For \(f(x) = \ln(1+x)\), compute the first four derivatives at \(a = 0\) and write the Taylor polynomial \(T_3(x)\).
The remainder for this function is \(R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}x^{n+1}\) for some \(c\) between \(0\) and \(x\). For \(x \in (0,1)\), show that \(|f^{(n+1)}(c)| = \frac{n!}{(1+c)^{n+1}} < n!\) by using the fact that \(1+c > 1\).
Use part (b) to show that for \(x \in (0,1)\), the remainder satisfies \[ |R_n(x)| < \frac{n! \cdot x^{n+1}}{(n+1)!} = \frac{x^{n+1}}{n+1}. \]
Prove that \(\lim_{n \to \infty} R_n(x) = 0\) for \(x \in (0,1)\) by showing \(\lim_{n \to \infty} \frac{x^{n+1}}{n+1} = 0\). Conclude that the Taylor series for \(\ln(1+x)\) converges to \(\ln(1+x)\) on \((0,1)\).
Taylor series in the normalized basis.
Write the Taylor polynomial \(T_3(x)\) for \(f(x) = e^x\) centered at \(a = 0\) using the standard form \(\sum_{k=0}^{3} \frac{f^{(k)}(0)}{k!}x^k\). Compute each derivative and simplify.
Rewrite your answer from part (a) as a linear combination in the normalized basis \(\mathcal{B} = \left\{1, x, \frac{x^2}{2!}, \frac{x^3}{3!}\right\}\) introduced in Section 7.3. That is, express \[ T_3(x) = c_0 \cdot 1 + c_1 \cdot x + c_2 \cdot \frac{x^2}{2!} + c_3 \cdot \frac{x^3}{3!} \] and identify the coordinates \((c_0, c_1, c_2, c_3)\).
Compare the coordinates you found in part (b) to the derivatives \(f^{(k)}(0)\) for \(k = 0, 1, 2, 3\). Explain why the normalized basis makes the coordinates directly equal to the derivatives, and why the standard basis does not.
For a general \(C^\infty\) function \(g\) with Taylor series \(\sum_{k=0}^{\infty} g^{(k)}(0) \cdot \frac{x^k}{k!}\), explain why the \(\mathcal{B}\)-coordinate vector is \((g(0), g'(0), g''(0), \ldots)\) and describe how differentiation acts on this coordinate vector.
Taylor polynomials and error bounds for \(\cos(x)\).
Computing \(T_4(x)\). For \(f(x) = \cos(x)\) centered at \(a = 0\): \[ \begin{align*} f(x) &= \cos(x), & f(0) &= 1 \\ f'(x) &= -\sin(x), & f'(0) &= 0 \\ f''(x) &= -\cos(x), & f''(0) &= -1 \\ f'''(x) &= \sin(x), & f'''(0) &= 0 \\ f^{(4)}(x) &= \cos(x), & f^{(4)}(0) &= 1 \end{align*} \] By Definition 7.2: \[ T_4(x) = 1 + 0 \cdot x + \frac{-1}{2!}x^2 + 0 \cdot x^3 + \frac{1}{4!}x^4 = 1 - \frac{x^2}{2} + \frac{x^4}{24}. \quad \square \]
Approximating \(\cos(0.2)\). \[ T_4(0.2) = 1 - \frac{(0.2)^2}{2} + \frac{(0.2)^4}{24} = 1 - 0.02 + \frac{0.0016}{24} \approx 0.980067. \quad \square \]
Estimating the residual. Since \(f^{(5)}(x) = -\sin(x)\), we have \(|f^{(5)}(t)| \leq 1\) for all \(t\). Taking \(M = 1\): \[ |R_4(0.2)| \leq \frac{(0.2)^5}{5!} = \frac{0.00032}{120} \approx 2.7 \times 10^{-6}. \quad \square \]
Verification. The actual error \(|\cos(0.2) - T_4(0.2)| \approx 0\) is well within the bound \(2.7 \times 10^{-6}\). \(\square\)
Convergence of Taylor series for \(\ln(1+x)\).
Computing \(T_3(x)\). \[ \begin{align*} f(x) &= \ln(1+x), & f(0) &= 0 \\ f'(x) &= \frac{1}{1+x}, & f'(0) &= 1 \\ f''(x) &= -\frac{1}{(1+x)^2}, & f''(0) &= -1 \\ f'''(x) &= \frac{2}{(1+x)^3}, & f'''(0) &= 2 \end{align*} \] \[ T_3(x) = x - \frac{x^2}{2} + \frac{x^3}{3}. \quad \square \]
Bounding the derivative. For \(x \in (0,1)\) and \(c\) between \(0\) and \(x\): \[ |f^{(n+1)}(c)| = \frac{n!}{(1+c)^{n+1}} < \frac{n!}{1} = n!, \quad \text{since } 1+c > 1. \quad \square \]
Remainder bound. \[ |R_n(x)| = \frac{|f^{(n+1)}(c)|}{(n+1)!}x^{n+1} < \frac{n!}{(n+1)!}x^{n+1} = \frac{x^{n+1}}{n+1}. \quad \square \]
Convergence. For \(x \in (0,1)\), \(x^{n+1} \to 0\) geometrically while \(n+1\) grows only linearly, so \(x^{n+1}/(n+1) \to 0\). By the squeeze theorem \(R_n(x) \to 0\), and the Taylor series converges to \(\ln(1+x)\) on \((0,1)\). \(\square\)
Taylor series and the normalized basis.
Computing \(T_3(x)\). All derivatives of \(e^x\) equal \(e^x\), so \(f^{(k)}(0) = 1\) for all \(k\): \[ T_3(x) = 1 + x + \frac{x^2}{2} + \frac{x^3}{6}. \quad \square \]
Normalized basis coordinates. Since \(x^2/2 = x^2/2!\) and \(x^3/6 = x^3/3!\): \[ T_3(x) = 1 \cdot 1 + 1 \cdot x + 1 \cdot \frac{x^2}{2!} + 1 \cdot \frac{x^3}{3!}, \] so \((c_0, c_1, c_2, c_3) = (1,1,1,1)\). \(\square\)
Coordinates equal derivatives. The coordinates \((1,1,1,1)\) equal the derivatives \((f(0), f'(0), f''(0), f'''(0)) = (1,1,1,1)\). In the standard basis the \(k\)th coordinate is \(f^{(k)}(0)/k!\); in \(\mathcal{B}\) the basis elements absorb the \(1/k!\), so the coordinates become \(f^{(k)}(0)\) directly. \(\square\)
General case. For any \(C^\infty\) function \(g\), the Taylor series \(\sum g^{(k)}(0)\cdot x^k/k!\) expresses \(g\) in \(\mathcal{B}\) with coordinate vector \((g(0), g'(0), g''(0), \ldots)\). Differentiating shifts this vector left: \(g'\) has coordinate vector \((g'(0), g''(0), g'''(0), \ldots)\), one step to the left. The \(k\)th coordinate of \(g'\) is the \((k+1)\)th coordinate of \(g\), consistent with the left-shift action of \(D\) on the normalized basis. \(\square\)