Tutorials › Calculus II › Sine And Cosine Errors From Derivative Bounds

Remainders and Error Estimates · Tutorial 855 of 998

Sine And Cosine Errors From Derivative Bounds

Use the global derivative bounds for sine and cosine to certify approximations and select a Taylor polynomial that meets a stated error tolerance.

Advanced 10 min read

What You'll Learn

  • State the Lagrange remainder bound for sine and cosine about zero.
  • Use the derivative cycle and the unit-circle identity to bound every derivative.
  • Account for zero Taylor coefficients when estimating sine and cosine errors.
  • Certify approximations at specified arguments with exact remainder bounds.
  • Select a Taylor polynomial degree that meets a requested accuracy.
  • Distinguish a valid error certificate from an estimate of the actual error.

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

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

The Lagrange form of the remainder states that, for some point \(\xi\) between \(0\) and \(x\),

$$ f(x)=P_n(x)+R_n(x), \qquad R_n(x)=\frac{f^{(n+1)}(\xi)}{(n+1)!}x^{n+1}. $$

Consequently, if \(\lvert f^{(n+1)}(t)\rvert\le M\) throughout that interval, then

$$ \lvert R_n(x)\rvert\le \frac{M\lvert x\rvert^{n+1}}{(n+1)!}. $$

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.

Theorem: For every real \(x\) and every nonnegative integer \(n\), the degree-\(n\) Maclaurin polynomial for sine or cosine has Lagrange remainder satisfying \(\lvert R_n(x)\rvert\le \lvert x\rvert^{n+1}/(n+1)!\).

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:

$$ \sin x,\quad \cos x,\quad -\sin x,\quad -\cos x,\quad \sin x,\quad \ldots $$

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.

1
Identify the Taylor order.
Choose \(n\) so that the Taylor polynomial of degree \(n\) is the polynomial being used.
2
Bound the next derivative.
For sine or cosine, the \((n+1)\)st derivative has absolute value at most \(1\) throughout the interval.
3
Apply the Lagrange estimate.
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.

$$ \left|\sin x-\sum_{j=0}^{m}\frac{(-1)^j x^{2j+1}}{(2j+1)!}\right| \le \frac{|x|^{2m+3}}{(2m+3)!}, $$
$$ \left|\cos x-\sum_{j=0}^{m}\frac{(-1)^j x^{2j}}{(2j)!}\right| \le \frac{|x|^{2m+2}}{(2m+2)!}. $$

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

$$ P_3\left(\frac12\right) =\frac12-\frac{(1/2)^3}{6} =\frac12-\frac{1}{48} =\frac{24}{48}-\frac{1}{48} =\frac{23}{48}. $$

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

$$ \left|\sin\left(\frac12\right)-\frac{23}{48}\right| \le \frac{(1/2)^5}{5!} =\frac{1/32}{120} =\frac{1}{3840} \approx 0.00026042. $$

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:

$$ P_4\left(\frac25\right) =1-\frac{(2/5)^2}{2}+\frac{(2/5)^4}{24} =1-\frac{2}{25}+\frac{2}{1875} =\frac{1875-150+2}{1875} =\frac{1727}{1875}. $$

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

$$ \left|\cos\left(\frac25\right)-\frac{1727}{1875}\right| \le \frac{(2/5)^6}{6!} =\frac{64}{15625\cdot720} =\frac{4}{703125} \approx 0.00000569. $$

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\):

$$ P_7(1) =1-\frac{1}{3!}+\frac{1}{5!}-\frac{1}{7!} =1-\frac16+\frac1{120}-\frac1{5040} =\frac{5040-840+42-1}{5040} =\frac{4241}{5040}. $$

The degree-eight sine polynomial has the same value because its degree-eight coefficient is zero. The corresponding Lagrange estimate is

$$ \left|\sin(1)-\frac{4241}{5040}\right| \le \frac{1^9}{9!} =\frac{1}{362880} \approx 0.00000276 <0.00001. $$

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

$$ \frac{|x|^{n+1}}{(n+1)!}\le \varepsilon. $$

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

$$ B_{n+1}=B_n\frac{|x|}{n+2}. $$

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)!\).

Key takeaway: A Lagrange error estimate is a certificate only when the derivative bound holds across the entire interval required by Taylor's theorem. For sine and cosine, every derivative is globally bounded in absolute value by \(1\).

Check Your Understanding

Use the Lagrange remainder and the sine and cosine derivative bounds to answer these questions.

  1. What global bound applies to the absolute value of every derivative of sine and cosine?
  2. What Lagrange error bound applies to a degree-\(n\) Maclaurin polynomial for either function at a real argument \(x\)?
  3. Why can the sine polynomial through degree \(2m+1\) use the remainder power \(2m+3\) in its parity-specific bound?
  4. 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\)?
  5. Why does evaluating the next derivative at the target argument alone not establish the hypothesis needed for a Lagrange error bound?