Processing math: 76%

Printed Page 634

CHAPTER 8 PROJECTHow Calculators Calculate

634

The sine function is used in many scientific applications, so a calculator/computer must be able to evaluate it with lightning-fast speed.

While we know how to find the exact value of the sine function for many numbers, such as 0, π6,π2, and so on, we have no methodology for finding the exact value of sin3 (which should be close to sinπ) or sin1.5 (which should be close to sinπ2). Since the sine function can be evaluated at any real number, we first use some of its properties to restrict its domain to something more manageable.

  1. Explain why we can evaluate sinx for any x using only the interval [π2,π2]. (We could restrict that domain further, but this will work for now. See Problem 6 below.)
  2. Use the Maclaurin expansion for sinx to find an approximation for sin12 correct to within 105. Compare your approximation to the one your calculator/computer provides. How many terms of the series do you need to obtain this accuracy?
  3. Find an approximation for sin32 correct to within 105. How many terms of the series do you need to obtain this accuracy?
  4. Explain why the approximation in Problem 3 requires more terms than that of Problem 2.
  5. Represent sinx as a Taylor expansion about π4.
  6. Explain why we can evaluate sinx for any x using only the interval [0,π2].
  7. Use the result of Problem 5 to find an approximation for sin12 correct to within 105. Compare the result with the values your calculator/computer supplies for sin12, as well as with the result from the Maclaurin approximation obtained in Problem 2. How many terms of the series do you need for the approximation?
  8. Use the Taylor expansion to find an approximation for sin32 correct to within 105. Compare the result with the value your calculator/computer supplies for sin32, as well as with the result from the Maclaurin approximation obtained in Problem 3. How many terms of the series do you need for the approximation?

    The answers to Problems 3 and 8 reveal why Maclaurin series or Taylor series are not used to approximate the value of most functions. But often the methods used are similar. For example, a Chebyshev polynomial approximation to the sine function on the interval [π2,π2] still has the form of a Maclaurin series, but it was designed to converge more uniformly than the Maclaurin series, so that it can be expected to give answers near π2 that are roughly as accurate as those near zero.

    Chebyshev polynomials are commonly found in mathematical libraries for calculators/computers. For example, the widely used Gnu Compiler Collection* uses Chebyshev polynomials to evaluate trigonometric functions. The Chebyshev polynomial approximation of degree 7 for the sine function is S7(x)=0.9999966013x0.1666482357x3+0.008306286146x50.1836274858×103x7

    635

    For more information on the Gnu Compiler Collection (GCC), go to https://www.gnu.org/software/gcc/

    The Chebyshev polynomials are designed to remain close to a function across an entire closed interval. They seek to keep the approximation within a specified distance of the function being approximated at every point of that interval. If Sn is a Chebyshev approximation of degree n to the sine function on [π2,π2], then the error estimate in using Sn(x) is given by max

    Like most error estimates of this type, it gives an upper bound to the error.

  9. Use the Chebyshev polynomial approximation in (1) for x=\dfrac{1}{2} and x=\dfrac{3}{2}. Compare the results with the values your calculator/computer supplies for \sin \dfrac{1}{2} and \sin \dfrac{3}{2}, as well as with the results from the Maclaurin approximations and the Taylor series approximations obtained in Problems 2, 3, 7, and 8.
  10. Define E_{7}(x) =\vert \sin x-S_{7}(x) \vert. Use graphing technology to graph E_{7} on \left[ -\dfrac{\pi }{2},\dfrac{\pi }{2}\right].
  11. Find the local maximum and local minimum values of E_{7} on \left[ -\dfrac{\pi }{2},\dfrac{\pi }{2}\right]. Compare these numbers with the error estimate in equation (2), and discuss the characteristics of the error.
  12. Which approximation for the sine function would be preferable: the Maclaurin approximation, the Taylor approximation, or the Chebyshev approximation? Why?