Skip to main content
Graphing Calculator
English

Learn · 4 min read

How to Graph Secant, Cosecant and Cotangent on a Graphing Calculator

The direct answer: type the reciprocal

There are no sec, csc, or cot buttons on this calculator — and you don't need them. Secant is the reciprocal of cosine, cosecant the reciprocal of sine, and cotangent the reciprocal of tangent. So type the reciprocal directly into a y = box: 1/cos(x) for secant, 1/sin(x) for cosecant, and cos(x)/sin(x) for cotangent. The parser accepts all three exactly as written, and like all trig here they take their input in radians.

The moment you press enter you'll see the signature look of reciprocal trig: repeating U-shaped branches separated by gaps. Those gaps are not a bug — they are vertical asymptotes at the exact points where the denominator equals zero, and they are the whole story of these graphs. Everything below is about reading them correctly.

Where the graph breaks: asymptotes at the zeros

A reciprocal blows up wherever its denominator is zero. For y = 1/cos(x), that is wherever cos(x) = 0, namely x = π/2 + kπ (…, −π/2, π/2, 3π/2, …). For y = 1/sin(x) and y = cos(x)/sin(x), it is wherever sin(x) = 0, namely x = kπ (…, −π, 0, π, …). Memorize these two zero-sets and you can predict every break in all three graphs before you even plot them.

On the interval [0, 2π] this is concrete: secant breaks at π/2 and 3π/2, while cosecant and cotangent break at 0, π, and 2π. Set your window to span −2π to 2π and you will see two full periods of secant and cosecant laid out with their asymptotes evenly spaced — the single best view for learning these shapes.

Cotangent earns one extra feature: its zeros. Since cot(x) = cos(x)/sin(x), it equals zero wherever cos(x) = 0 — at x = π/2 + kπ, exactly where secant has its asymptotes. Plot tan(x) alongside cos(x)/sin(x) and watch them cross zero at the same points: the same relationship, viewed reciprocally.

Reading the branches: ranges and the parent curve

Compare each reciprocal with its parent and the shape explains itself. Where cos(x) = ±1, sec(x) = ±1; where cos(x) shrinks toward zero, |sec(x)| grows without bound. That forces the secant and cosecant branches to live entirely outside the strip between −1 and 1 — their range is (−∞, −1] ∪ [1, ∞), so you will never see a branch cross the x-axis. Cotangent has no such restriction: it passes through zero at every x = π/2 + kπ and its range is all real numbers.

Sign follows the parent too: secant is positive exactly where cosine is positive, so its upward-opening U's sit over cosine's humps and its downward U's hang below cosine's troughs. Plot sin(x) together with 1/sin(x) and watch the mechanism directly — each U of the cosecant curve cradles a hump of the sine wave, touching it exactly where sin(x) = ±1 and flying off toward the asymptotes where sin(x) = 0.

The periods carry over unchanged: secant and cosecant repeat every 2π, cotangent every π. If a branch looks stretched or compressed, check that you haven't confused cotangent's shorter period with the other two.

Try it: verify with the table of values

Don't take the picture on faith — check a few exact points. Open the table of values for y = 1/cos(x): at x = 0 you get 1, and at x = π/3 you get exactly 2, since cos(π/3) = 1/2. For y = cos(x)/sin(x), sample near x = π/2 and watch the values collapse toward zero, confirming the zero you predicted from the algebra.

The table is also the fastest way to confirm an asymptote. Sample y = 1/cos(x) just left and just right of x = π/2: the values explode in opposite directions, which is exactly what a vertical asymptote means. Then zoom in close to that asymptote on the graph — from far away the curve looks like it might touch the gap, but up close you can see it never does.

Troubleshooting: when the graph looks wrong

The most common surprise is a near-vertical line segment that seems to connect two branches across an asymptote. That segment is a drawing artifact: between two sampled points on opposite sides of the asymptote, the screen joins the dots across the gap. It does not mean the function is defined there — zoom in and the break becomes visible. If the whole screen looks like a tangle of steep lines, you are simply viewing too many periods at once; narrow the x-range.

A completely blank graph usually means a typo (cos without the (x), say) or a window containing no periods of the function. And remember the calculator works in radians: the asymptotes sit at multiples of π/2, not at 90°, so 1/cos(90) is a perfectly ordinary finite number, not a blow-up. Keep the window in multiples of π and the asymptotes will land where you expect.

Graphs of y = 1/cos(x), y = 1/sin(x) and y = cos(x)/sin(x) plotted together, with U-shaped branches separated by vertical asymptotes.
Secant (1/cos(x)), cosecant (1/sin(x)) and cotangent (cos(x)/sin(x)) plotted together. Every branch breaks at a vertical asymptote wherever the denominator equals zero.
Graph of y = 1/cos(x) alone, showing repeating U-shaped secant branches with vertical asymptotes at multiples of pi/2.
y = 1/cos(x) alone: the secant curve. Each U-shaped branch hugs the cosine wave where |cos(x)| is near 1 and shoots toward the asymptotes where cos(x) = 0.

Try it in the calculator

Type any of these into the graphing calculator to see the ideas above in action:

  • 1/cos(x)
  • 1/sin(x)
  • cos(x)/sin(x)

Key takeaways

  • Type 1/cos(x), 1/sin(x) and cos(x)/sin(x) — there are no built-in sec, csc or cot functions.
  • Every gap is a vertical asymptote at a zero of the denominator: x = π/2 + kπ for secant, x = kπ for cosecant and cotangent.
  • Secant and cosecant never enter (−1, 1); cotangent crosses zero wherever cos(x) = 0 and ranges over all reals.
  • Near-vertical connector segments across a gap are sampling artifacts — zoom in to see the true break.
  • Trig functions take radians, so asymptotes land on multiples of π/2; a window from −2π to 2π shows two full periods.

Frequently asked questions

Why does my secant graph have gaps in it?

Those gaps are the point. Secant is undefined wherever cos(x) = 0 — at x = π/2 + kπ — so the calculator correctly draws nothing there. The gaps are vertical asymptotes, not missing data.

Can I type 1/tan(x) for cotangent instead of cos(x)/sin(x)?

Yes. The two expressions are equal wherever both are defined, so their graphs coincide. Writing cos(x)/sin(x) just keeps everything in sines and cosines, which makes the zeros and asymptotes easier to read.

My cosecant graph shows steep lines joining the branches — is that right?

No — that is a sampling artifact. Between two plotted points on opposite sides of an asymptote, the screen joins the dots across the gap. Zoom in on the asymptote and you will see the branches genuinely break apart.

Related pages