Why Derivative Bounds Certify Trigonometric Approximations
Sine and cosine are often approximated by polynomials when a calculation needs a numerical value. A polynomial gives a convenient finite computation, but a useful approximation also needs a guarantee: how far can the polynomial value be from the function value?
Taylor's theorem answers this question when a suitable derivative is bounded on the interval between the center and the argument. For sine and cosine, the key advantage is that every derivative is again a sine or cosine function, up to sign. Their derivatives are therefore bounded by \(1\) on the entire real line, giving simple error estimates at any real argument.
Throughout this tutorial, angles are measured in radians, so that the derivative identities for sine and cosine have their usual form.
The Lagrange Bound for Sine and Cosine
For a function \(f\) with \(n+1\) continuous derivatives on an interval containing \(0\) and \(x\), its Taylor polynomial of degree \(n\) about \(0\) is
The Lagrange form of the remainder states that, for some point \(\xi\) between \(0\) and \(x\),
Consequently, if \(\lvert f^{(n+1)}(t)\rvert\le M\) throughout that interval, then
The derivative bound must hold over the whole interval between the center and the argument, not just at the argument itself. For sine and cosine, a single bound works everywhere.
Why Every Derivative Is Bounded by One
The derivative identities are \((\sin x)'=\cos x\) and \((\cos x)'=-\sin x\). Differentiating repeatedly cycles through sine and cosine with alternating signs:
Thus every derivative of either function is one of \(\sin x\), \(\cos x\), \(-\sin x\), or \(-\cos x\). The unit-circle identity \(\sin^2 x+\cos^2 x=1\) implies \(\lvert\sin x\rvert\le 1\) and \(\lvert\cos x\rvert\le 1\). Therefore every derivative has absolute value at most \(1\) at every real input.
Choose \(n\) so that the Taylor polynomial of degree \(n\) is the polynomial being used.
For sine or cosine, the \((n+1)\)st derivative has absolute value at most \(1\) throughout the interval.
The error is at most \(\lvert x\rvert^{n+1}/(n+1)!\).
This justifies the theorem's bound: substituting \(M=1\) into the Lagrange estimate gives the stated expression. The hypotheses hold because sine and cosine have continuous derivatives of every order on the real line.
Zero Coefficients Can Improve the Bound
The Taylor polynomials have alternating zero coefficients because of the derivative values at zero. In the sine polynomial, only odd powers occur; in the cosine polynomial, only even powers occur. This lets us use a Taylor order one higher than the apparent polynomial degree without changing the polynomial.
For example, the Taylor polynomial for sine through degree \(2m+2\) has no term of degree \(2m+2\). It is the same polynomial as the one through degree \(2m+1\), but the Lagrange estimate at order \(2m+2\) gives a remainder power of \(2m+3\). Likewise, the cosine polynomials through degrees \(2m\) and \(2m+1\) are the same, and the latter order gives the higher remainder power.
These are Lagrange bounds, not claims about the sign of the error. They certify that the absolute error is no larger than the displayed quantity; they do not say that the error equals the bound.
Worked Examples
Worked Example: Approximate \(\sin(0.5)\) with a Cubic
Use the degree-three Maclaurin polynomial \(P_3(x)=x-x^3/6\). At \(x=0.5=1/2\), its value is
To bound the error, use Taylor's theorem through degree \(4\). The degree-four sine polynomial is still \(x-x^3/6\), since the coefficient of \(x^4\) is zero. The fifth derivative is bounded in absolute value by \(1\), so
The certificate is therefore \(\sin(0.5)=23/48+R\), where \(\lvert R\rvert\le 1/3840\). This checks the approximation against the Lagrange remainder formula.
Worked Example: Approximate \(\cos(0.4)\) with a Quartic
Use \(P_4(x)=1-x^2/2+x^4/24\). Since \(0.4=2/5\), evaluate each term exactly:
The degree-five cosine polynomial equals this same polynomial because the coefficient of \(x^5\) is zero. Applying the Lagrange bound through degree \(5\) gives
Thus the exact polynomial value is \(1727/1875\), and the absolute error is at most \(4/703125\). The derivative bound applies on the entire interval from \(0\) to \(2/5\), as required.
Worked Example: Choose a Sine Polynomial for Accuracy \(10^{-5}\) at \(x=1\)
For sine, use the polynomial through degree \(7\):
The degree-eight sine polynomial has the same value because its degree-eight coefficient is zero. The corresponding Lagrange estimate is
This certifies the requested accuracy. To see why a shorter familiar truncation does not suffice under this estimate, the sine polynomial through degree \(5\) is also the degree-six Taylor polynomial, and its bound at \(1\) is \(1/7!=1/5040\), which is greater than \(10^{-5}\). The degree-seven polynomial above has a certified bound below the tolerance.
Using the Bounds to Select a Degree
For a prescribed tolerance \(\varepsilon>0\) at an argument \(x\), the basic procedure is to choose a Taylor order \(n\) for which
For sine and cosine, the parity of the coefficients may let the same polynomial be treated as a Taylor polynomial of one degree higher. That produces the sharper parity-specific estimates given above. To choose a degree responsibly, identify the actual polynomial first, then choose the Taylor order that supports the bound you intend to use.
The bounds also show why approximations become easier to certify near zero: the numerator contains a high power of \(\lvert x\rvert\), while the denominator is a factorial. For fixed nonzero \(x\), if \(B_n=|x|^{n+1}/(n+1)!\), then
This recurrence is valid for all real \(x\). When \(x\ne 0\), both bounds are positive and it can also be written as \(B_{n+1}/B_n=|x|/(n+2)\). At \(x=0\), both bounds are zero, so that quotient is undefined; the recurrence remains valid.
A Common Pitfall
A common error is to bound the next derivative only at the target argument, or to use its value there as though it were the maximum on the interval. The Lagrange theorem requires a bound that holds throughout the interval between the center and the target. For sine and cosine, the global bound of \(1\) avoids this problem.
For instance, one might incorrectly reason that because \(\cos(\pi/2)=0\), the derivative bound for a sine approximation at \(\pi/2\) is \(M=0\), and hence the remainder is zero. That calculation uses the derivative value at one endpoint rather than a bound throughout the interval \([0,\pi/2]\). In fact, \(\cos(0)=1\), so the claimed bound \(M=0\) is false on that interval. The valid global choice is \(M=1\), giving the legitimate estimate \(\lvert R_n(\pi/2)\rvert\le(\pi/2)^{n+1}/(n+1)!\).
Check Your Understanding
Use the Lagrange remainder and the sine and cosine derivative bounds to answer these questions.
- What global bound applies to the absolute value of every derivative of sine and cosine?
- What Lagrange error bound applies to a degree-\(n\) Maclaurin polynomial for either function at a real argument \(x\)?
- Why can the sine polynomial through degree \(2m+1\) use the remainder power \(2m+3\) in its parity-specific bound?
- For fixed nonzero \(x\), what is \(B_{n+1}/B_n\) when \(B_n=|x|^{n+1}/(n+1)!\)? What recurrence holds for all real \(x\), including \(x=0\)?
- Why does evaluating the next derivative at the target argument alone not establish the hypothesis needed for a Lagrange error bound?