Trigonometric Graph Plotter

Analyze & graph trigonometric functions y = a·f(bx + c) + d

Pick a basic function, then drag the sliders or type the coefficients a, b, c, d. The graph and the property table update instantly. Coefficient c accepts forms such as pi/3 or -pi/4.

Hover or tap along the graph to read coordinates. When the canvas has focus, the left and right arrow keys move in steps of π/12.

The tool above plots the four basic trigonometric functions and the extended form y = a·sin(bx + c) + d (replace sin with cos, tan or cot). Drag the sliders to watch the graph stretch and shift on screen. The table under the graph follows the selected function: domain, range, period, parity, monotonicity, maximum and minimum or vertical asymptotes. Move the mouse along the curve to read the coordinates of each point in radians and decimals. The article ends with an 8-question quiz to apply the theory.

Definitions of the four trigonometric functions

In the grade 11 curriculum, each trigonometric function is a rule that assigns to every real number x (the radian measure of a trigonometric angle) exactly one real number:

  • Sine function: y = sin x, defined for every real x.
  • Cosine function: y = cos x, defined for every real x.
  • Tangent function: y = tan x = sin x / cos x, defined only when cos x ≠ 0, that is x ≠ π/2 + kπ.
  • Cotangent function: y = cot x = cos x / sin x, defined only when sin x ≠ 0, that is x ≠ kπ.

On the unit circle, the point M associated with the real number x has x-coordinate cos x and y-coordinate sin x. Since M always lies on a circle of radius 1, sine and cosine only take values from −1 to 1. Tangent and cotangent are quotients of these two numbers, so they take every real value.

FunctionDomainRangePeriodEven or odd
y = sin xD = ℝ[−1; 1]2πodd
y = cos xD = ℝ[−1; 1]2πeven
y = tan xℝ \ {π/2 + kπ}ℝπodd
y = cot xℝ \ {kπ}ℝπodd

Periodic functions and the period

A function y = f(x) with domain D is called periodic if there is a number T ≠ 0 such that for every x in D, x ± T ∈ D and

f(x + T) = f(x)

The smallest positive T with this property is the period of the function. After every stretch of length T, the graph repeats itself exactly. So it is enough to draw the graph on one interval of length T, then translate it parallel to the x-axis by kT to get the whole graph.

periods of the four functions

Sine and cosine have period 2π because the point M returns to where it started after one full turn. Tangent and cotangent have period π because after half a turn both sine and cosine change sign, so their quotient stays the same.

The period of the sine wave π 2π 3π 4π O 1 −1 x y Period T = 2π amplitude 1 one period [0; 2π] y = sin x
Two consecutive peaks of the sine wave are exactly one period 2π apart. The shaded part is one period; the rest is a translated copy of it. The amplitude is the distance from the x-axis to a peak, here 1.

Even and odd functions and the symmetry of the graph

All four domains above are symmetric about 0. Use the formulas for opposite angles:

opposite-angle formulas
  • y = sin x, y = tan x and y = cot x are odd functions. Their graphs are symmetric about the origin O.
  • y = cos x is an even function. Its graph is symmetric about the y-axis.

Turn on the comparison option in the tool and you will see the cosine curve (orange) mirrored on both sides of the y-axis, while the sine curve (blue) maps onto itself under a 180° rotation about O.

Variation tables over one period

The function y = sin x on [−π; π]

The function is increasing on each interval (−π/2 + k2π; π/2 + k2π) and decreasing on each interval (π/2 + k2π; 3π/2 + k2π).

x−π−π/2π/2π
y0↘−1↗1↘0

The function y = cos x on [−π; π]

The function is increasing on each interval (−π + k2π; k2π) and decreasing on each interval (k2π; π + k2π).

x−π0π
y−1↗1↘−1

The function y = tan x on (−π/2; π/2)

The function is increasing on each interval (−π/2 + kπ; π/2 + kπ). The lines x = π/2 + kπ are vertical asymptotes.

x−π/20π/2
y−∞↗0↗+∞

The function y = cot x on (0; π)

The function is decreasing on each interval (kπ; π + kπ). The lines x = kπ are vertical asymptotes.

x0π/2π
y+∞↘0↘−∞

The graphs of tangent and cotangent consist of infinitely many identical branches, each lying between two consecutive vertical asymptotes. The tool draws these asymptotes as dashed lines.

Shifting and stretching the graph of y = a sin(bx + c) + d

The general form y = a·sin(bx + c) + d (with a ≠ 0, b ≠ 0) describes every simple harmonic oscillation in physics. Each coefficient has its own job:

CoefficientNameEffect on the graph of y = sin x
aamplitude |a|Vertical stretch (|a| > 1) or compression (|a| < 1). If a < 0, the graph is also reflected across the x-axis.
bangular frequencyHorizontal compression (|b| > 1) or stretch (|b| < 1). The new period is T = 2π/|b|.
cphaseHorizontal shift by |c/b|: to the left if c/b > 0, to the right if c/b < 0.
dvertical shiftShift up d units if d > 0, down |d| units if d < 0. The new midline is y = d.

The table gives at once:

period, maximum, minimum

For tangent and cotangent, b still changes the period to π/|b|, while a and d leave the range ℝ unchanged.

Recommended order of construction. Write bx + c = b(x + c/b). Starting from the graph of y = sin x: stretch or compress horizontally by b, shift horizontally by −c/b, stretch or compress vertically by a, and finally shift vertically by d. The tool above lists exactly these steps for the function you enter.

Amplitude and period when a and b change π/2 π 3π/2 2π O 2 1 −1 −2 T = 2π/2 = π y = 2sin 2x y = sin x
The blue curve y = 2sin 2x has amplitude 2 (twice as large) and period π (half as long) compared with the orange curve y = sin x. On the same interval [0; 2π], the blue curve completes two full periods.

Four worked examples

Example 1. Find the domain of y = tan(2x − π/3)

Tangent is defined when the expression inside is not π/2 + kπ:

domain condition

So D = ℝ \ {5π/12 + kπ/2}. The period is π/2. The same family of points can be written differently, for example −π/12 + kπ/2, because 5π/12 − π/2 = −π/12. Choose tan and enter a = 1, b = 2, c = -pi/3, d = 0 to let the tool draw the vertical asymptotes at these points.

Example 2. Period, maximum and minimum of y = 3sin(2x + π/4) − 1

Here a = 3, b = 2, c = π/4, d = −1. The period is T = 2π/2 = π. Since −1 ≤ sin(2x + π/4) ≤ 1,

−4 ≤ y ≤ 2

The maximum 2 is reached when 2x + π/4 = π/2 + k2π, that is x = π/8 + kπ. The minimum −4 is reached when 2x + π/4 = −π/2 + k2π, that is x = −3π/8 + kπ. The range is [−4; 2].

Example 3. Even or odd?

a) f(x) = sin 2x + tan x. The domain ℝ \ {π/2 + kπ} is symmetric about 0. We have f(−x) = −f(x), so f is odd.

b) g(x) = cos x + sin²x. The domain is ℝ. g(−x) = g(x), so g is even.

c) h(x) = sin x + cos x. Try x = π/4: h(π/4) = √2, while h(−π/4) = 0. These two values are neither equal nor opposite, so h is neither even nor odd. In fact h(x) = √2·sin(x + π/4); enter a = sqrt(2), c = pi/4 in the tool to see that the graph is symmetric neither about O nor about the y-axis.

Example 4. Build the graph of y = 2sin(2x − π/3) + 1 and find where it increases

Write 2x − π/3 = 2(x − π/6). Starting from the graph of y = sin x, do in order:

  1. Compress horizontally by the factor 1/2 to get y = sin 2x with period π.
  2. Shift right by π/6 to get y = sin(2x − π/3).
  3. Stretch vertically by the factor 2 to get y = 2sin(2x − π/3).
  4. Shift up 1 unit to get the required graph, which oscillates between −1 and 3.

Since a·b = 4 > 0, the function increases when the inner expression lies in an increasing interval of sine:

increasing intervals

The function is increasing on each interval (−π/12 + kπ; 5π/12 + kπ) and reaches its maximum 3 at x = 5π/12 + kπ. Enter a = 2, b = 2, c = -pi/3, d = 1 to let the tool redraw it and check every step.

Common mistakes

  1. Computing the period as 2π/b when b is negative. A period is always positive: T = 2π/|b|.
  2. Shifting horizontally by c instead of c/b. For y = sin(2x − π) the graph moves right by π/2, not by π.
  3. Forgetting the domain condition of tan and cot. Remove the points where the cosine (for tan) or the sine (for cot) of the inner expression is 0.
  4. Joining two tangent branches across an asymptote. The graphs of tangent and cotangent break at every vertical asymptote; no point lies on those lines.
  5. Deciding even or odd from a single pair of points. One pair of points is enough to rule out evenness or oddness, but to prove it you must establish the identity for every x.

🎯 Practice quiz: applying the theory of trigonometric graphs

Eight questions cover the domain, the period, even and odd functions, maximum and minimum, monotonicity, vertical asymptotes and translating a graph. Pick one answer for each question: the correct answer turns green, a wrong one turns red, and the worked solution appears right below with a ⚠️ Traps section explaining why the distractors are tempting.

🟢 Domain Question 1. The domain of y = tan x is:

⏱️ Period Question 2. The period of y = 2tan(3x + π/4) − 1 is:

⚖️ Even or odd Question 3. Which of the following functions is even:

📏 Maximum and minimum Question 4. The maximum M and the minimum m of y = 3 − 2cos x are:

📈 Monotonicity Question 5. On which interval is y = cos x increasing:

🧱 Asymptotes Question 6. The vertical asymptotes of the graph of y = cot x are:

↔️ Translation Question 7. The graph of y = sin(2x − π/3) is obtained from the graph of y = sin 2x by the translation by the vector:

🔁 Periodic functions Question 8. Which of the following functions has period π:

Frequently asked questions

How do I find the period of y = a sin(bx + c) + d?

The period equals 2π divided by the absolute value of b. For tangent and cotangent, the period equals π divided by the absolute value of b. The coefficients a, c and d do not change the period. For example y = 3sin(2x + π/4) − 1 has period π.

Why do the graphs of y = tan x and y = cot x have vertical asymptotes?

tan x equals sin x divided by cos x, so as x approaches π/2 + kπ the denominator cos x tends to 0 and tan x increases or decreases without bound. The lines x = π/2 + kπ are the vertical asymptotes of tangent. Similarly, cotangent has vertical asymptotes x = kπ, where sin x equals 0.

Which trigonometric functions are even and which are odd?

Only y = cos x is even; its graph is symmetric about the y-axis. The three functions y = sin x, y = tan x and y = cot x are odd; their graphs are symmetric about the origin O. After a shift, the new function may be neither even nor odd.

What is the range of y = a sin(bx + c) + d?

Since sin(bx + c) lies between −1 and 1, y lies between d − |a| and d + |a|. The maximum is d + |a| and the minimum is d − |a|. The same holds when sine is replaced by cosine. For tangent and cotangent, the range is always ℝ.

How can I get the graph of y = cos x from the graph of y = sin x?

Since cos x = sin(x + π/2), the graph of y = cos x is the graph of y = sin x shifted π/2 units to the left. In the tool, choose sine, set c = pi/2 and turn on the cosine comparison curve to see the two curves coincide.