# Circular Functions...

Sine & Cosine
• Objective
• Level
• Prerequisites
• Platform
• Development & Instructor's Notes
• Credits
•  Objective: Show the development of the sine and cosine functions and their graphs by 'wrapping' around a circle.

Level: Precalculus or calculus.

Prerequisites: Right triangles, radian measure, functions.

Platform:  Any computer system with MATLAB.

(MATLAB) The MATLAB M-files, sincos.m and scplot.m generate a sequence of pictures an information that develops the sine and cosine functions graphically and in tabular form. See the development discussion given below. (MATLAB v 5.3 Release 11)

Note:  The codes are adaptable to other software systems for doing mathematics, such as, Maple, Mathematica or Mathcad.

Development & Instructor's Notes:

A function is a rule f that assigns to each input value t a unique output value f(t) called the value of function f at t. We use a circle of radius 1 centered at the origin (call such a circle a unit circle) as an aid in defining two functions known as circular functions. Imagine a clock hand that is free to pivot about the origin. At a every position of the clock hand there is an angle t measured in radians in the counter clockwise direction from the positive x-axis and the end of the clock hand indicates a point P(x,y) on the circumference of the unit circle. Thus we have a correspondence:

In order to use this correspondence we need to define a rule that associates a unique output, a single numerical value, with the input value (angle) t. We do this by splitting the correspondence into two pieces, each of which defines a function. It is standard practice to give these two functions the names listed below.

Function sine: ordered pairs (t, y)

Function cosine: ordered pairs (t, x)

Since the tip of the clock hand points to a unique point for each angle t, the output of each of these functions is unique. We use the following notation to indicate the output:

sin(t) is the output of the sine function.

cos(t) is the output of the cosine function.

These functions are closely associated with a right triangle as shown in the following diagram.

As the angle t changes not only do the coordinates of the point P(x,y) change, but also the horizontal and vertical sides of the triangle change in a corresponding manner. However the hypotenuse of the triangle stays fixed at 1 unit. We show this in the following figure which depicts several snapshots of the clock hand’s position as it moves around the circle. Also observe the right triangle and how it changes.

It is often helpful to describe a function f geometrically. The set of all pairs (t, f(t)) is called the graph of the function f. By changing the angle t we generate pairs (t, sin(t)) and (t, cos(t)) to build a graph of the sine function and the cosine function respectively. We can get a few pairs for each of these functions by observing positions of the tip of the clock hand for well known angles t as shown below.

 Angle t in Radians 0 pi/2 pi 3pi/2 2pi P(x,y) (1,0) (0,1) (-1,0) (0,-1) (1,0) x = cos(t) 1 0 -1 0 1 y = sin(t) 0 1 0 -1 0

We can sketch these few pairs for both the sine function and the cosine function as shown next, but this is very incomplete information.

To provide more complete information the sine and cosine functions we will use a MATLAB routine that

• animates the angle t changing,
• shows the right triangle changing the size of its legs,
• records a table of values for t, sin(t), and cos(t),
• shows the graphs started above filling in as we progress through angles ranging from 0 to 2 pi radians.
A snapshot of the screen generated in this routine is shown below. (Also see the animated GIF at the beginning of this document.)

(Comment: The unit circle was chosen for convenience. If a circle of radius r centered at the origin were used instead of the unit circle, then the sine and cosine function are defined as sin(t) = y/r and cos(t) = x/r where P(x,y) is the point at the tip of the clock hand.)

Notes: The routine that animates the development of the sine and cosine functions as shown above is called sincos.m. The built-in description of this routine appears below. Note that you can change the speed at which the clock hand moves around the circle. Hence you can use this demo for various presentations in a lecture or discussion format. At the end of a trip around the circle buttons appear on the screen to either stop or see the graphs on a larger scale and over more than one revolution around the circle. These graphs are generated by another MATLAB routine, scplot.m. Just follow the directions that appear on the screen.

Credits:  This demo and the MATLAB m-files were submitted by

Dr. David R. Hill
Department of Mathematics
Temple University

and is included in Demos with Positive Impact with his permission. DOWNLOAD Associated m-files for this demo: sincos.zip

DRH 12/14/99   Last updated
5/24/2006

Since 3/1/2002