4. Graphs of tan, cot, sec and csc

by M. Bourne

The graphs of `tan x`, `cot x`, `sec x` and `csc x` are not as common as the sine and cosine curves that we met earlier in this chapter. However, they do occur in engineering and science problems.

They are interesting curves because they have discontinuities. For certain values of x, the tangent, cotangent, secant and cosecant curves are not defined, and so there is a gap in the curve.

[For more on continuous functions, go to Continuous and Discontinuous Functions in an earlier chapter.]

Recall from Trigonometric Functions, that `tan x` is defined as:

`tan x=(text(sin)\ x)/(text(cos)\ x)`

For some values of x, the function `cos x` has value `0`. For example, when `cos {:π/2:}=0` and `cos{:(3π)/2:}=0`.

When this happens, we have `0` in the denominator of the fraction and this means the fraction is undefined. So there will be a "gap" in the function at that point. This gap is called a discontinuity.

The same thing happens with `cot x`, `sec x` and `csc x`. For each one, the denominator has value `0` for certain values of x.

The Graph of y = tan x

Sketch y = tan x.


As we saw above,

`tan x=(sin x)/(cos x)`

This means the function will have a discontinuity where cos x = 0. That is, when x takes any of the values:

`x = ..., -(5π)/2, -(3π)/2, -π/2, π/2, (3π)/2, (5π)/2, ...`

It is very important to keep these values in mind when sketching this graph.

Graph of y = tan x:

Graph of tan x

Note that there are vertical asymptotes (the gray dotted lines) where the denominator of `tan x` has value zero.

(An asymptote is a straight line that the curve gets closer and closer to, without actually touching it. You can see more examples of asymptotes in a later chapter, Curve Sketching Using Differentiation.)

Note also that the graph of `y = tan x` is periodic with period π. This means it repeats itself after each π as we go left to right on the graph.

Flash Interactive - Tangent Curve

You can see an animation of the tangent function in this interactive.

You can change the amount of energy in the wave by changing the radius of the circle with the slider. The units on the horizontal axis are radians (in decimal form). Recall that:

π radians = 3.14 radians = 180°.

So the graph shown is from `0` to 2π. The vertical lines that appear are the asymptotes.

Loading Flash movie.

(For more on periodic functions and to see `y = tan x` using degrees, rather than radians, see Trigonometric Functions of Any Angle.)

The Graph of y = cot x

Recall from Trigonometric Functions that:

`cot x=(cos x)/(sin x)`

We now have to consider when `sin x` has value zero, because this will determine where our asymptotes should go.

The function will have a discontinuity where `sin x = 0`, that is, when

` x = ..., -3π, -2π, -π, 0, π, 2π, 3π, 4π, 5π, ...`

Considering the values of cos x and sin x for different values of x we can sketch the graph of `y = cot x` as follows.

Graph of cot x

Flash Interactive - Cotangent curve

You can getter a better understanding of the cotangent curve using this interactive.

Run the animation and observe the features of the graph. Then change the radius of the circle (and run the animation again) to see the effect of different energy levels. The asymptotes are a key feature of this graph.

Note that the cotangent curve, like all trigonometric graphs, is periodic.

Loading Flash movie.

The Graph of y = sec x

We could laboriously draw up a table with millions of values, or we could work smart and recall that

`sec x=1/(cos x)`

We know the sketch for y = cos x and we can easily derive the sketch for y = sec x, by finding the reciprocal of each y value. (That is, finding `1/y` for each value of y on the curve `y = cos x`.)

For example (angles are in radians):

x 0 1 1.55 2 3 4
`y = cos x` 1 0.54 0.02 -0.42 -0.99 -0.65
`1/y = sec x` 1 1.85 48.09 -2.4 -1.01 -1.53

I included a value just less than `π/2=1.57` so that we could get an idea of what goes on there. When `cos x` is very small, `sec x` will be very large.

After applying this concept throughout the range of x-values, we can proceed to sketch the graph of `y = sec x`.

First, we graph `y = cos x` and then `y = sec x` immediately below it. Compare the y-values in each of the 2 graphs and assure yourself they are the reciprocal of each other.

y = cos x

Graph of cos x

y = sec x

Graph of sec x

We draw vertical asymptotes at the values where `y = sec x` is not defined. That is, when `x = ..., -(5π)/2, -(3π)/2, -π/2, π/2, (3π)/2, (5π)/2, ...`

You will notice that these are the same asymptotes that we drew for `y = tan x`, which is not surprising, because they both have `cos x` on the bottom of the fraction.

Flash Interactive - Secant curve

As before, run the animation and observe the features of the graph. Then change the radius of the circle (and run the animation again) to see the effect of different energy levels.

Loading Flash movie.


Need Graph Paper?

rectangular grid
Download graph paper


y = csc x


Try to sketch it before checking your answer with this cosecant graph interactive.

Loading Flash movie.

You may also be interested in:

The next section in this chapter shows some Applications of Trigonometric Graphs.

Didn't find what you are looking for on this page? Try search:

Online Algebra Solver

This algebra solver can solve a wide range of math problems. (Please be patient while it loads.)

Ready for a break?


Play a math game.

(Well, not really a math game, but each game was made using math...)

The IntMath Newsletter

Sign up for the free IntMath Newsletter. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!

Given name: * required

Family name:

email: * required

See the Interactive Mathematics spam guarantee.

Share IntMath!

Trigonometry Lessons on DVD


Easy to understand trigonometry lessons on DVD. See samples before you commit.

More info: Trigonometry videos