Navigation Menu

The Sine X Button

This is a handout for a talk that I first gave on 2024-03-27 at David and Mary Thomson Collegiate in Scarborough.

This talk revisits the topic of Infinite Limits in Python, but without Python. It addresses a question that really vexxed me in highschool: “What does the $\sin(x)$ button on a calculator really do?” I remember asking my teaching this question and getting the response: “Oh – You’ll learn all about that in university.” This workshop is an attempt to answer the question in terms that I would have understood back in grade twelve.

The handout for this workshop is available here.

Goals for This Workshop

  1. Explain how the $\sin(x)$ button on a calculator calculates sine of $x$.
  2. Create “designer” polynomials.
  3. Learn about univeristy mathematics.

What Does The Calculator Do?

Q1. Get out a calculator and calculate $\sin(1.2)$ where $1.2$ is measured in radians. (Note: If you get $\sin(1.2) \approx 0.0209$ then your calculator is in degrees mode.)

Q2. What do you think your calculator does when it calculates $\sin(x)$? How does it do it?

Designer Polynomials

Q3. Consider the polynomial $\displaystyle p(x) = 2 + \frac{2}{1 \cdot 2}x^2 + \frac{4}{1 \cdot 2 \cdot 3}x^3$. These fractions are left “uncancelled” and “unmultiplied” for a good reason: to help spot patterns. Evaluate the following:

  1. $p(0)$
  2. $p^{\prime}(0)$
  3. $p^{\prime\prime}(0)$
  4. $p^{(3)}(0) \longleftarrow$ This $p^{(3)}(x)$ is the third derivative of $p(x)$.

Q4. If you wanted a polynomial $p(x)$ so that $p^{(n)}(0) = C$ and $p^{(k)}(0) = 0$ for $k \neq n$. To put it another way: the $n$‘th derivative of $p(x)$ is $C$ and all other derivatives are zero. How would you build it? What is the formula for $p(x)$?

Suggestion: If this question is too abstract, pick your favourite numbers $n$ and $C$.

The Sine Function

Q5. Consider the function $f(x) = \sin(x)$. Calculate the first few derivatives $f^{(n)}(0)$.

  1. $f^{\prime}(x) = \quad \quad f^\prime(0) = \quad \quad$
  2. $f^{\prime\prime}(x) = \quad \quad f^{\prime\prime}(0) = \quad \quad$
  3. $f^{(3)}(x) = \quad \quad f^{(3)}(0) = \quad \quad$
  4. $f^{(4)}(x) = \quad \quad f^{(4)}(0) = \quad \quad$

Q6. Do you notice any pattern in the values of the $n$‘th derivative of $\sin(x)$ at $x=0$? Let $f(x) = \sin(x)$. If $n = 2k + 1$ is odd then $f^{(n)}(0) =$

And now we have all the pieces that we need for the Big Idea. Suppose that two functions $f(x)$ and $p(x)$ have same value at $x=0$. That is: $f(0) = p(0)$. Furthermore, suppose that their first derivatives agree at $x = 0$. As a formula: $f'(0) = p'(0)$. Let's go really wild and suppose that $f^{(n)}(0) = p^{(n)}(0)$ for all $n$. These functions will be very similar: $p(x)$ will approximate $f(x)$.

Q7. Let $f(x) = \sin(x)$ as above. Use Q4 and Q6 to design a polynomial $p(x)$ of degree seven so that: \[ f^{(n)}(0) = p^{(n)}(0) \textrm{ for all $n \leq 7$.} \] Q8. Use your polynomial from Q7 to estimate $\sin(1.2)$ and compare it with your answer from Q1.

Q9. What is the calculator doing when you hit $\sin(x)$?

Q10 (Further Exploration).

  1. Use Desmos to plot a polynomial of degree $N$ that approximates $\sin(x)$. You will want to type sum to get a summation sign $\displaystyle \sum_{n=0}$ and $n!$ for the factorial $n! = 1 \cdot 2 \cdot 3 \cdots (n-1)n$.
  2. Can you do this polynomial approximation method for other functions? How about $\cos(x)$? Or $e^x$?

Spoilers

Meta

Published: Mar 26, 2024

Last Modified: Apr 10, 2024

Tags
Backlinks

Navigation Menu

Thanks for reading! If you have any comments or questions about the content, please let me know. Anyone can contact me by email.