# Section 7: Trigonometric Functions

For an interactive view on the basics of the sine and cosine functions, see the Trig FAQ by J. David Eisenberg (requires a Java-enabled browser).

## 7.1 May the Circle be Unbroken

### Review of Trigonometry Concepts

We have all heard that the earth is running out of room for all its new citizens, and how in every nation on earth the politicians have corrupted the economics to their own personal gain. And this is why the Society for New Age Future Understanding (SNAFU) was formed. At its most recent convention the delegates decided by acclaimation that SNAFU would seek to raise the undersea plateau on which once stood the proud land of Atlantis, and furthermore, that SNAFU would design and build there a utopian paradise called New Atlantis.

In the interest of accomplishing something toward this end while the nasty problem of raising an undersea plateau was being pondered, SNAFU gave its architectural subcommittee the job of designing the capital city of New Atlantis. They determined that at the center of town would be a great monument to Descarte. The streets and avenues would form a square grid, ten streets and ten avenues to the kilometer. Main Street and Main Avenue would intersect at the monument. Then First Street North would pass 0.1 km north of the monument, Second Street North would pass 0.2 km north of the monument, and so on. Likewise First Street South would pass 0.1 km south of the monument, Second Street South would pass 0.2 km south of the monument, and so on. The avenues would be the same except that First Avenue East would pass 0.1 km east of the monument, and so on.

But there was still the need for public transportation in the new metropolis. So the architects planned a circular subway line centered upon the monument. The radius of the circle was to be 10 blocks. So there would certainly be stations at 10th Street North and Main Avenue, at 10th Street South and Main Avenue, at Main Street and 10th Avenue East, and at Main Street and 10th Avenue West.

The subway train cruises around the track counterclockwise starting at the station at Main Street and 10th Avenue East. It travels at a steady 1 kilometer per minute. If you were riding in the train, you would be passing under the various streets and avenues. So what street and what avenue would you be under at, say, 6 seconds after the train leaves the station? How about at 12 seconds after, or one minute after? The SNAFU architects need to know these things so that they can design the automated announcement system that tells the passengers where they are.

And it is for problems like this that the world invented trigonometric functions. But as you will see, as your study of calculus continues, they will come to serve you in much broader ways. But let's begin by reviewing some basics about trig functions.

As the train moves around the circular track, you can measure the distance it has covered along the track. You know from your previous studies, once all the way around this track will put 2p kilometers on the train's odometer, where  p = 3.14159265378979  to 15 figures. You probably also learned that p is irrational as well, so there is an infinitude of seemingly random digits that follow (unfortunately the proof of that is long and difficult. Since p's irrationality is not of consequence to this discussion, I shall not present that proof here). For most practical work, carrying p out to six figures is perfectly adequate, and often just three figures will do just fine.

The trig functions, sin(x) and cos(x), allow us to predict how far the train is north of Main Street (in the case of sin), and how far the train is east of Main Avenue (in the case of cos), both as functions of how far the train has gone around the track. That distance along the track, starting at the station on Main Street and 10th Avenue East -- that is the x we stick into the sin and cos functions. And in this example, since the distance we put in is in kilometers, distance we get out is in kilometers as well.

But a much better way to think about it is in terms of radii of the circle. In the case of the track, the radius is 1 kilometer. In other problems you will deal with circles whose radii are something else. Hence it is useful think of the x that you stick into sin(x) or cos(x) as some number of radii of a circle. That concept is where we get the word radians, which you see used in most books on trigonometry.

So, for example, after p/6 minutes, the train has gone one twelfth of the way around the circle. This is because the train is moving at 1 kilometer per minute, and that is the same as 1 radius per minute (or 1 radian per minute, if you prefer). After p/6 minutes, it has moved p/6 radii.

If you draw a line segment from the center of the circle to where the train is after p/6 minutes, you will find that the segment forms an angle with Main Street of exactly 30 degrees. Why? Because 30 degrees is one twelfth of 360 degrees, which, as we all know, is all the way around the circle. Observe that the train is crossing 5th Street North at that moment. And it is somewhere near 9th Avenue East, heading for 8th Avenue East just then.

If you now draw a vertical line segment from where the train is Main Street, you can see that you have a right triangle. The radial line segment you drew is exactly 1 radius long. Call that side of the triangle, c. Using a little geometry (imagine the same right triangle reflected to the south of Main Street -- the two form an equalateral triangle), you can prove that the length of the vertical line segment is exactly 0.5 radii long. Call that side of the triangle, a. And using the Pythagorean formula you can find the length of the horizontal side of the triangle, b.

```   a2 + b2  =  c2                                                 eq. 7.1-1a
_______
b  =  Öc2 - a2                                                 eq. 7.1-1b

_________      _
b  =  Ö12 - 0.52  =  Ö3/2  =  0.866025403                      eq. 7.1-1c
```
And so we have shown that sin(p/6) = 0.5 and that
```             _
cos(p/6) = Ö3/2 = 0.866025403
```

We have already observed that there is an angle associated with p/6 kilometers around the track, and that in this case, that angle is 30 degrees. And you have probably heard it said before that "The sine of 30 degrees is 0.5." And you have even observed that your calculator has an option for computing sines and cosines of angles given in degrees. Right now, go set your calculator so that it computes sines and cosines of angles given in radians, and then leave it that way. Radians is the "natural" measure for angles, just as e was the "natural" base for logarithms. It is degree measure that is artificial -- invented by ancient astronomers to make the number of degrees in a circle approximately the number of days in a year and still have it be evenly divisible by a lot of small whole numbers (like 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, etc.). But in calculus texts it is almost universally understood that trigonometric functions operate on quantities that are in radians. Things work out much tidier that way. To convert an angle in radians to one in degrees, multiply by 180/p = 57.29577951. To convert an angle in degrees to one in radians, divide by the same constant.

You can draw a radius line segment and a vertical line segment back to Main Street for any position on the track that the train might ever be. And in every case, the length of the vertical segment will be the sine of the distance the train has gone. Of course you must observe that when the vertical line segment extends to the south of Main Street instead of north, the sine is negative. Likewise the length of the horizontal side of the triangle will be the cosine of the distance the train has gone. Again follow the convention that if the horizontal side extends west of Main Avenue instead of east, then the cosine is negative. And of course the hypotenuse of the triangle is always exactly 1 radius long. So the Pythagorean formula tells us that

 ``` sin2(x) + cos2(x) = 1 eq. 7.1-2 ```

That is, the sum of the square of the sine of any number, x, with the square of the cosine of that same x is always equal to 1, no matter what x is. This formula is extremely important, so if you've forgotten it, take a minute now to remember it again. And then, don't forget it, and don't forget the reason it's true.

Also observe that the sine and cosine of any distance around the circle corresponds to ratios of the inscribed right triangle that results. Do you remember the phrases you memorized in trig? Sine is opposite over hypotenuse. Cosine is adjacent over hypotenuse. But opposite and adjacent to what? To the angle of the triangle that is at the center of the circle. And the ratios are ratios of lengths of sides of the triangle.

We can parley the formula from eq. 7.1-1 along with some basic geometry to get ourselves a most useful formula for the cosine of the sum of two values. Look at figure 7-2a. Assume the radius of the circle to be 1. Let a be the radian measure of angle MOK. Let b be the radian measure of angle KOJ. Then a+b must be the measure of angle MOJ.

And what about the lengths of the various line segments in the diagram?

• The length of KM is sin(a).
• The length of OM is cos(a).
• The length of JL is sin(b).
• The length of OL is cos(b).
• The length of JN is sin(a+b).
• The length of ON is cos(a+b).
Look it over carefully and make sure you understand why each of these expressions applies. Refer back to the previous discussion in this section (or to a trigonometry text) if you have trouble with this, and review what is meant by sine and cosine. The phrases, opposite over hypotenuse and adjacent over hypotenuse might come in handy toward understanding why these lengths are what they are. And remember that the distance from the center of the circle to the outside is always 1.

To make this whole derivation easier, I'd like to appeal to your sense of symmetry. If we rotated the entire diagram clockwise about the origin by an amount equal to angle a, wouldn't all the relationships given above still be preserved? After all, the distance from Albany to Buffalo doesn't change just because the earth rotates, does it? Nor do the angles that make the Pyramids of Giza so pleasing to the eye change as the earth spins.

Now look at figure 7-2b. It shows the same diagram as in figure 7-2a except it's been rotated clockwise. In addition, I've added two new points, R and S, and two new line segments, RS (in green) and JS (in pink).

First observe that the length of the new line segment, RS, is the same as the length of KM, which we already determined to be sin(a). We know this because triangles ROS and KOM are congruent. From that same congruency, we know that the length of OR is cos(a).

The next thing is to determine the coordinates of points J and S as they appear in figure 7-2b. This is easy using the lengths of the line segments that we already know.

• J is at (cos(b), sin(b) ).
• S is at (cos(a), -sin(a) ).
Again make sure you understand why these are the coordinates for those points.

Now look at the triangle, JNS. It is a right triangle with JS as the hypotenuse. We already know the length of side JN is sin(a+b). We also know that the length of OS is 1, because that segment is a radius. We already know that the length of ON is cos(a+b). Hence

```   length of NS  =  length of OS - length of ON  =  1 - cos(a+b)  eq. 7.1-3
```
The length of side JS we can get using the Pythagorean distance formula. You remember, the one that says the distance between point (x1, y1) and point (x2, y2) is
```    _______________________
Ö(x1 - x2)2 + (y1 - y2)2
```

From there
```                    _______________________________________
length of JS  =  Ö(cos(b) - cos(a))2 + (sin(b) + sin(a))2  =

______________________________________________________________________
Öcos2(b) - 2cos(b)cos(a) + cos2(a) +  sin2(b) + 2sin(b)sin(a) + sin2(a)

eq. 7.1-4a
```
You should be able to see at once that we can apply equation 7.1-1 to this last expression in two places. And that gives:
```                     _________________________________
length of JS  =  Ö2 + 2sin(b)sin(a) - 2cos(b)cos(a)            eq. 7.1-4b
```
We're getting near the end of this now. Because triangle JNS is a right triangle, the Pythagorean formula applies to the lengths of its three sides. If u is the length of JN, v is the length of NS, and w is the length of JS, then
```   w2  =  u2 + v2                                                 eq. 7.1-5a
```
And we have expressions for u, v, and w. So we just have to substitute them in.
```   2 + 2sin(a)sin(b) - 2cos(a)cos(b)  =  sin2(a+b) + (1 - cos(a+b))2

eq. 7.1-5b
```
Multiplying out the (1 - cos(a+b))2 you get
```   2 + 2sin(a)sin(b) - 2cos(a)cos(b)  =  sin2(a+b) + 1 - 2cos(a+b) + cos2(a+b)

eq. 7.1-5c
```
Looks like we can apply equation 7.1-1 again:
```   2 + 2sin(a)sin(b) - 2cos(a)cos(b)  =  2 - 2cos(a+b)            eq. 7.1-5d
```
Once you do all the cancelling and simplifying to this, you are left with

 ``` cos(a+b) = cos(a)cos(b) - sin(a)sin(b) eq. 7.1-6 ```

This equation is true for all real a and b. Again, this identity is very important, and if you've forgotten it, it's time to remember it once more. Equations 7.1-1 and 7.1-6 are the mother and father of all other trig identities. You can click here to see a bunch of other useful trig identities. You should take time to review them. When the exam comes along, you will work quicker if you can apply trig identities without having to strain your brain.

Figure 7-3 shows plots, which are probably familiar to you, of sin(x) and cos(x). Look at them and get a feel for where they are increasing, decreasing, where they cross the x-axis, and where they have maxes and mins. Try to relate all these features of the plots to what happens as the train goes around the circular track. These functions will be much in the news as we proceed.

### The Law of Cosines

You undoubtably recall learning the Pythagorean rule back when you took geometry. Remember that it states that if you have a right triangle, and if a and b are the lengths of the two sides adjacent to the right angle, and c is the length of the side opposite the right angle (that is c is the length of the hypotenuse), then

```   a2 + b2  =  c2                                                 eq. 7.1-7
```
This, of course, is a very useful rule when it comes to dealing with right triangles. But not every triangle we encounter in life contains a right angle. What can we say about the sides of all those triangles that don't?

Figure 7-8a shows such a triangle. The three sides are of length a, b, and c. But the angle, q, that joins a and b is not a right angle. The red line intersects side a at right angles at the point O. The length of the red line is shown as h. That line divides the blue triangle into two right triangles, ABO and ACO. The length of the base of triangle ACO (that is the line segment, OC) is shown as k.

Our previous discussions of sines and cosines as applied to right triangles leads us to the conclusion that:

```

h  =  b sin(q)                                                 eq. 7.1-8a

k  =  b cos(q)                                                 eq. 7.1-8b
```
Now turn your attention to the right triangle on the left -- triangle ABO. Its sides have lengths of c, h, and a - k. These three lengths, being the sides of a right triangle, must obey the Pythagorean rule. So it must be true that
```   c2  =  h2 + (a - k)2                                           eq. 7.1-9a
```
or substituting for h and k
```   c2  =  b2 sin2(q) + (a - b cos(q) )2                           eq. 7.1-9b
```
And your curiosity, by now, has led you to multiply out the square term on the right and arrive at
```   c2  =  b2 sin2(q) + a2 - 2ab cos(q) + b2 cos2(q)               eq. 7.1-9c
```
But you can see that we have the sum of a sine squared and a cosine squared, each multiplied by a common factor of b2. And we just finished reviewing the fact that sine squared plus cosine squared of the same angle is always equal to one. So that leaves

 ``` c2 = a2 + b2 - 2ab cos(q) eq. 7.1-9d ```

This equation is called the law of cosines. It is a generalization of the Pythagorean rule. You can see this because if q is a right angle, then  cos(q) = 0, and the formula reverts, in that special case, to the Pythagorean rule.

### The Law of Sines

Out of sheer laziness I've decided to use the same diagram that I used to illustrate the law of cosines to illustrate the law of sines. Observe that the angle that I have inscribed the q into is also labeled with a C. So allow that C also represents the measure of that angle. Likewise with the angles marked A and B.

We have already seen in the derivation of the law of cosines how  h = b sin(q) = b sin(C). Likewise you can also see that  h = c sin(B). And since two things both equal to a third are equal to each other (that's called transitivity of equality), we have

```

b sin(C)  =  c sin(B)                                          eq. 7.1-10a
```
or equivalently
```   sin(B)     sin(C)
=                                                      eq. 7.1-10b
b          c
```
And if you were to construct another line from B that intersects the side b at right angles, you could do the same procedure and show that
```   a sin(C)  =  C sin(A)                                          eq. 7.1-10c
```
and consequently
```   sin(C)     sin(A)
=                                                      eq. 7.1-10d
c          a
```
By transitivity again, all three of those ratios must be equal for any triangle.

 ``` sin(A) sin(B) sin(C) = = eq. 7.1-10e a b c ```

In other words, the ratio of the sine of each angle of a triangle to its opposite side is equal for all three angles of any triangle. This is known as the law of sines.

### Inverse Trig Functions

Figure 7-3 (above) shows plots of sine and cosine. Since each of these comes back to any given y-value in its range infinitely many times, you can't just transpose their graphs to form their inverses. You would end up with something that is not a function. Why? Because a function can assign no more than one range-value to each domain-value.

But inverse trig functions come up frequently in calculus, and so we have to find a way to deal with this. And that way is simply to truncate the range of inverse sine to  -p/2 £ y £ p/2  and likewise to truncate the range of the inverse cosine to  0 £ y £ p. These inverse functions, restricted according to these rules, are frequently referred to as arcsine and arccosine (abreviated arcsin(x) and arccos(x)) respectively. Another way you will frequently see them written is sin-1(x) and cos-1(x). These mean precisely the same things as arcsin(x) and arccos(x). And what they do is this. The value,  y = arcsin(x) = sin-1(x)  solves the equation  x = sin(y). Note that y is not the only solution to that equation. But by fiat, the world has decided that it is the principal solution to that equation. Likewise  y = arccos(x) = cos-1(x)  is a solution to  x = cos(y) -- not the only solution but the principal one.

Figure 7-9 shows these two functions as I have just described them. Observe that the domain of these functions is  -1 £ x £ 1. When the magnitude of x is greater than one, neither arcsine nor arccosine are defined. This is because the domain of arcsine and arccosine must be identically the range of sine and cosine. And the range of sine and cosine goes from -1 to 1 only.

You can come up with several useful identities involving arcsine and arccosine simply by taking identities we already know about sine and cosine and standing them on their heads. So, for example, we can take  sin2(x) = 1 - cos2(x)  and turn it into

```           ______
sin-1( Ö1 - x2)  =  cos-1(x)                                   eq. 7.1-11
```
You can turn  sin(p/2 - x) = cos(x)  into
```   p/2 - sin-1(x)  =  cos-1(x)                                    eq. 7.1-12
```
As an example of how you can derive such identities, I will will start with  sin(a + b) = sin(a)cos(b) + sin(b)cos(a), and demonstrate where it leads. Let a and b both be in the range of the arcsine function. Let  u = sin(a)  and  v = sin(b). Then by identities we already know,
```    ______
Ö1 - u2 = cos(a)
______
Ö1 - v2 = cos(b)
```
So substituting we have
```                     ______      ______
sin(a + b)  =  u Ö1 - v2 + v Ö1 - u2                           eq. 7.1-13a
```
Now take the arcsine of both sides
```                      ______      ______
a + b  =  sin-1(u Ö1 - v2 + v Ö1 - u2 )                        eq. 7.1-13b
```
And since  u = sin(a), we know that  sin-1(u) = a. Likewise with b. So by making that substitution, we end up with the identity
```   sin-1(u) + sin-1(v)  =
______      ______
sin-1(u Ö1 - v2 + v Ö1 - u2 )                        eq. 7.1-13c
```
This is not quite right yet. The reason is because the sum,  sin-1(u) + sin-1(v)  might be outside of the range we have declared for arcsine. So we have to provide a caveat with 7.1-13c, and that is, if that sum is greater than p/2, then subtract p from it. If the sum is less than -p/2, then add p to it. If you do all that, you have a true identity.

Of course if you can have inverse sine and cosine, you can have an inverse tangent function as well. Figure 7-10 shows a plot of it. Like sine and cosine, tangent repeats each y-value periodically, so once again, for the purpose of forming its inverse, we restrict the range of the inverse tangent function to  -p/2 < y < p/2. Observe that the arctangent function never actually reaches p/2 or -p/2, although it gets as close as you like as x goes to infinity or to minus infinity. Observe also that, unlike with arcsine and arccosine, there is no restriction on the domain of arctangent. Any real number, x, will do in arctan(x).

As with arcsine and arccosine, the notation of tan-1(x) means precisely the same thing as arctan(x).

And from the identity we derived before for the tangent of a sum, we can come up with an identity for the sum of two arctangents:

 ``` arctan(a) + arctan(b) = arctan ``` ``` ``` ``` a + b 1 - ab ``` ``` ``` ``` eq. 7.1-14 ```
But once again we have to stipulate the same caveat we did before. If the sum on the left is greater than p/2, then subtract p from it. If it is less than -p/2, then add p to it.

You can write the arcsin and arccos functions using arctan as follows:

 ``` arcsin(x) = arctan ``` ``` ``` ``` x ______ Ö1 - x2 ``` ``` ``` ``` eq. 7.1-15a ``` ``` arccos(x) = arctan ``` ``` ``` ``` ______ Ö1 - x2 x ``` ``` ``` ``` eq. 7.1-15b ```
I'll let you apply the trig identities we have already discussed to see for yourself why equations 7.1-15a & b work.

Of course there are functions for arccotangent, arcsecant, and arccosecant as well, but we won't delve into them here.

And one more thing you should keep in mind about the inverse trig functions: They are useful if you know, say, the sine or cosine or tangent of an angle and need to know the angle itself. So when you find yourself in that situation, think of the word "arc."

### Exercises

```   tan(x) = A cos(x)
```
where A > 0 is a constant, solve for  -p/2 £ x £ p/2. Hint:  tan(x) = sin(x)/cos(x). Multiply out the denominator. Work it as far as you can, then click here to see if you got it right.