Skip to content

Trigonometric Function Grapher - Visualize Sin, Cos, Tan

Interactive trigonometric function grapher. Adjust amplitude, frequency, and phase shift in real-time to visualize sine, cosine, and tangent waves instantly.

Trigonometric Function Grapher

Function Parameters

Function Formula:
f(x) = sin(x)

Function Graph

f(x) = sin(x)
Graph of trigonometric function-1-0.500.51y-6-4-20246x
Adjust the parameters to see how they affect the graph.
Loading calculator...
πŸ“š

Documentation

What Is a Trigonometric Function Grapher?

A trigonometric function grapher is a tool that draws the curve of a sine, cosine, or tangent function and lets a user change its shape by adjusting a few numbers, called parameters. Moving a slider redraws the graph instantly, which makes it easier to see how amplitude, frequency, and phase shift change the wave.

The Three Basic Trigonometric Functions

Sine, cosine, and tangent come from the ratios of the sides of a right triangle. On a circle of radius 1, centred at the origin (the unit circle), sin(x) is the height of a point at angle x, and cos(x) is that point's horizontal position. Tangent is the ratio sin(x) / cos(x).

FunctionDomainRangePeriod
sin(x)all real numbersβˆ’1 to 12Ο€
cos(x)all real numbersβˆ’1 to 12Ο€
tan(x)all real numbers except Ο€/2 + nΟ€all real numbersΟ€

Sine is an odd function: sin(βˆ’x) = βˆ’sin(x). Cosine is an even function: cos(βˆ’x) = cos(x). Cosine is simply sine shifted left by Ο€/2 radians (90 degrees).

Tangent has vertical asymptotes: lines the curve gets closer and closer to but never touches. They sit at x = Ο€/2 + nΟ€, where n is any whole number. Since tan(x) = sin(x) / cos(x), and cos(x) equals 0 at those points, the ratio is undefined there.

Trigonometric Function Formula

The grapher plots functions in this form:

f(x) = A sin(Bx + C)

The same form is used for cosine and tangent, with sin replaced by cos or tan. Each letter is a parameter that can be adjusted:

  • A (amplitude) sets the height of the wave, measured from its centre line to a peak. The grapher allows values from 0.1 to 5 for sine and cosine, and 0.1 to 2 for tangent.
  • B (frequency) sets how many complete cycles fit into a stretch of the x-axis. A larger B compresses the wave. The grapher allows values from 0.1 to 5.
  • C (phase shift) slides the whole curve left or right without changing its shape. The grapher allows values from βˆ’Ο€ to Ο€, roughly βˆ’3.14 to 3.14.

A positive phase shift moves the graph left; a negative one moves it right.

How to Use the Trigonometric Function Grapher

  1. Pick a function β€” sine, cosine, or tangent β€” from the selector.
  2. Move the amplitude slider to change how tall the wave is.
  3. Move the frequency slider to compress or stretch the wave.
  4. Move the phase shift slider to slide the curve sideways.
  5. Read the formula shown under the sliders, and press "Copy" to copy it as text.

The graph updates as soon as a slider moves. For tangent, small gaps appear in the line at each asymptote. That is expected, not an error.

Testing the edges of the sliders

To see how tall a wave can get, set amplitude to the highest value the tool allows: 5 for sine or cosine, 2 for tangent. To see a wave stretched almost flat, set frequency to its lowest value, 0.1. Changing one slider at a time makes it easier to tell which parameter caused which change.

How to Calculate a Value by Hand

Take a sine function with amplitude A = 2, frequency B = 3, and phase shift C = Ο€/4:

f(x) = 2 sin(3x + Ο€/4)

To find f(Ο€/6), first work out the angle inside the sine:

3 Γ— (Ο€/6) = Ο€/2

Ο€/2 + Ο€/4 = 3Ο€/4

Then evaluate the sine and multiply by the amplitude:

f(Ο€/6) = 2 Γ— sin(3Ο€/4) = 2 Γ— (√2/2) β‰ˆ 1.414

Where Trigonometric Waves Show Up

Many things that repeat in a smooth, back-and-forth pattern follow a curve close to a sine wave: sound, alternating electrical current, ocean tides, the swing of a pendulum, and the length of daylight across a year. Engineers use sine and cosine to describe and predict patterns like these. Computer animators use the same curves to make motion look smooth, such as a bobbing walk cycle or an easing camera move.

Frequently Asked Questions

What is the difference between sine, cosine, and tangent?

Sine and cosine both swing between βˆ’1 and 1 with a period of 2Ο€, but cosine reaches each point in its cycle a quarter turn (Ο€/2) earlier than sine. Tangent equals sine divided by cosine. It has a period of Ο€, is unbounded, and has vertical asymptotes wherever cosine equals 0.

What does amplitude control?

Amplitude (A) sets how far the wave stretches above and below its centre line. In this grapher it ranges from 0.1 to 5 for sine and cosine, and 0.1 to 2 for tangent.

What does frequency control?

Frequency (B) sets how many wave cycles appear over a fixed stretch of the x-axis. A higher frequency packs more cycles into the same space. The grapher allows values from 0.1 to 5.

Why does a positive phase shift move the graph left instead of right?

Because the phase shift C is added before the angle is measured, inside the function: f(x) = sin(Bx + C). A positive C means the angle reaches a given value at a smaller x, so the same point on the curve appears earlier β€” shifted left, not right.

Why are there gaps in the tangent graph?

Tangent is undefined wherever cosine equals 0, which happens at x = Ο€/2 + nΟ€. The grapher breaks the line at those points instead of drawing a false connection straight through the gap.

Does the grapher use degrees or radians?

Radians. A full turn equals 2Ο€ radians, the same as 360 degrees. To convert degrees to radians, multiply by Ο€/180.