Graphing Trigonometric Functions — Sin, Cos, Tan Guide

Graph sine, cosine, and tangent functions online. Learn amplitude, period, phase shift, vertical shift, and transformations with interactive examples.

← All Guides
Intermediate8 min read

Trigonometric functions — sine, cosine, and tangent — describe waves, oscillations, rotations, and many natural phenomena. Graphing them visually reveals their periodic nature and makes transformations intuitive. Open the graphing calculator and follow along.

The Basic Functions

Enter each of these in the calculator and observe their shapes:

  • y = sin(x) — smooth wave, starts at 0, peaks at 1, troughs at −1
  • y = cos(x) — same wave shifted left by π/2; starts at 1
  • y = tan(x) — has vertical asymptotes at x = ±π/2, ±3π/2…

💡 The calculator uses radians by default. π ≈ 3.14159. Type pi to use π in expressions.

The General Form: y = A·sin(Bx + C) + D

Each constant transforms the wave differently:

A
Amplitude

The peak height. |A| = max distance from centre. A < 0 flips the wave vertically.

y = 3*sin(x) — amplitude 3
B
Period

Controls how quickly the wave repeats. Period = 2π / |B|.

y = sin(2*x) — period π (twice as fast)
C
Phase Shift

Horizontal shift = −C/B. Positive C shifts left; negative C shifts right.

y = sin(x - pi/2) — shifts right by π/2
D
Vertical Shift

Moves the entire wave up or down. The midline becomes y = D.

y = sin(x) + 2 — midline at y = 2

Explore With Sliders

Type the general form into the calculator:

y = A * sin(B*x + C) + D

Sliders for A, B, C, D appear automatically. Drag each one to see how it transforms the sine wave in real time — the most intuitive way to build understanding.

The Cosine Function

Cosine is identical to sine but shifted left by π/2. This relationship is: cos(x) = sin(x + π/2). Verify it by graphing both:

  • y = cos(x)
  • y = sin(x + pi/2)

The two curves will overlap perfectly.

The Tangent Function

Tangent = sin(x) / cos(x). It has vertical asymptotes wherever cos(x) = 0 (at x = π/2 + nπ). The function repeats with period π.

  • y = tan(x) — basic tangent
  • y = tan(2*x) — period π/2 (faster)

Inverse Trig Functions

The inverse functions (arcsine, arccosine, arctangent) reverse the operation:

  • y = asin(x) — defined for −1 ≤ x ≤ 1, outputs −π/2 to π/2
  • y = acos(x) — defined for −1 ≤ x ≤ 1, outputs 0 to π
  • y = atan(x) — defined for all x, outputs −π/2 to π/2

Pythagorean Identity on the Graph

The identity sin²(x) + cos²(x) = 1 means that sin(x)^2 + cos(x)^2 is always equal to 1. Graph it:

y = sin(x)^2 + cos(x)^2

You'll see a perfectly horizontal line at y = 1 — a beautiful visual proof of the identity.

Real-World Application: Sound Waves

A sound wave at 440 Hz (the musical note A4) can be modelled as: y = sin(2*pi*440*x)

At this frequency the wave oscillates too fast to see at normal zoom. Zoom in on the x-axis (zoom in many times or use a smaller multiplier like 2 instead of 2π×440) to observe the wave shape.

📝 Practice problems
  1. Graph y = 2*sin(x) - 1. What is the amplitude? What is the midline?
  2. Graph y = cos(3*x). What is the period?
  3. Graph y = sin(x) and y = sin(x + pi/4). How much is the shift?
  4. Use sliders on y = A*sin(B*x) to find what values produce exactly 3 complete cycles between x = 0 and x = 2π.