standarddeviationcalculator.net SD Calculator

Trigonometric graph calculator

Share this page

Favorites

    No favorites yet. Press Favorite on any page to keep it here.

    Methodology

    Choose a function and the four constants A, B, C and D to draw the transformed graph over its parent curve, with every feature a textbook asks for. Or pick “Any expression” and type your own function of x.

    π works: pi/2, π/3.

    y = 2 sin(2x − π/2) + 1 amplitude 2, period π
    Amplitude2
    Periodπ = 2π ÷ |B|
    Phase shiftπ/4 to the right
    Vertical shift (midline)y = 1
    Range[−1, 3]
    −2π−3π/2−π−π/20π/2π3π/22π-10123

    ┄ y = sin(x)   ━ y = 2 sin(2x − π/2) + 1

    Pale curves: the parent graph y = sin(x) and the midline y = 1. Dots: the key points in the table.

    Key points over one period
    xBx − Cy
    π/401
    π/2π/23
    3π/4π1
    π3π/2−1
    5π/42π1
    Show the working, step by step
    1. Match the equation to y = A·f(Bx − C) + D.

      A = 2, B = 2, C = π/2, D = 1

    2. The amplitude is |A|, half the distance from the lowest point to the highest.

      amplitude = |2| = 2

    3. The period of sin is 2π; dividing by |B| squeezes or stretches it.

      period = 2π ÷ |2| = π

    4. The phase shift is C ÷ B (right if positive). Write Bx − C as B(x − C/B) to see it.

      phase shift = π/2 ÷ 2 = π/4

    5. D moves the whole graph up or down. The midline is y = D.

      y = 1

    The general form

    y = A·sin(Bx − C) + D

    ConstantEffectFormula
    AVertical stretch. A negative A flips the graph upside downamplitude = |A| (sin and cos only)
    BHorizontal squeeze. A larger B means more cyclesperiod = 2π ÷ |B| (π ÷ |B| for tan, cot)
    CHorizontal shiftphase shift = C ÷ B, right if positive
    DVertical shiftmidline y = D

    The same four constants work for cos, tan, csc, sec and cot. Some books write the shift inside as B(x − h), in which case h is the phase shift directly. Enter C = B·h here.

    Trig graph: a worked example

    The default is y = 2 sin(2x − π/2) + 1, so A = 2, B = 2, C = π/2 and D = 1.

    1. Amplitude = |2| = 2. The curve rises 2 above and falls 2 below its midline.
    2. Period = 2π ÷ 2 = π: one full wave every π.
    3. Phase shift = (π/2) ÷ 2 = π/4 to the right.
    4. Midline y = 1, so the range is [1 − 2, 1 + 2] = [−1, 3].
    5. One cycle starts at x = π/4 on the midline, peaks at (π/2, 3), crosses the midline at 3π/4, bottoms out at (π, −1) and returns to the midline at 5π/4.

    Those five key points, a quarter period apart, are all you need to sketch any sine or cosine graph by hand. This particular curve is the same as y = 1 − 2cos 2x, which shows that a phase shift can turn a sine into a cosine.

    Tangent, cotangent, secant and cosecant

    These have no amplitude, and they have vertical asymptotes where their denominator is zero. For y = 2 tan(2x − π/2) + 1 the period is π/2, the asymptotes are at x = (π/2 + π/2 + kπ) ÷ 2, which is every multiple of π/2, and each branch passes through the midline y = 1 halfway between two asymptotes. The secant and cosecant graphs are U-shaped branches that touch the peaks and troughs of the matching cosine and sine curves, so their range leaves out the band between D − |A| and D + |A|.

    Graphing your own expression

    Pick “Any expression in x” to plot things like sin(x) + sin(2x)/2, x·sin x or sin²x. The calculator reports the highest and lowest values in the window, the x-intercepts, and the period when there is one. The default sum sin x + ½ sin 2x repeats every 2π and reaches a maximum of 1.29904 at x = π/3. For general functions of x, not just trig ones, use the graphing calculator.

    Common mistakes

    • Phase shift of C instead of C/B. Factor out B first.
    • Sign of the shift. sin(x + π/3) moves left by π/3, not right.
    • Amplitude for tan. There is none. Say “vertical stretch” instead.
    Trig graph calculator: the worked example on this page, with its result and chart
    Trig graph calculator: the worked example above, at a glance.

    Common questions

    How do I find the period of a trig function?

    Divide the parent period by |B|. sin and cos (and csc, sec) repeat every 2π, tan and cot every π. So y = 3 sin(4x) has period 2π ÷ 4 = π/2, and y = tan(x/2) has period π ÷ ½ = 2π.

    Why is the phase shift C/B and not C?

    Because B multiplies x as well. Factor it out: sin(2x − π/2) = sin(2(x − π/4)), so the graph of sin 2x moves π/4 to the right, not π/2. If the equation is written as sin(Bx + C), the shift is −C/B, to the left for positive C.

    Does tan x have an amplitude?

    No. Amplitude is half the distance from the maximum to the minimum, and tan, cot, sec and csc are unbounded. For them, A is still a vertical stretch. In y = 2 tan x the point at π/4 is at height 2 instead of 1.

    Where are the asymptotes of y = tan(Bx − C)?

    Where cos(Bx − C) = 0, which is Bx − C = π/2 + kπ, so x = (C + π/2 + kπ) ÷ B. For y = tan x they are at x = ±π/2, ±3π/2 and so on. sec shares tan’s asymptotes. Csc and cot have theirs where sin(Bx − C) = 0.

    Is x in degrees or radians?

    Radians, and the axis is labelled in multiples of π/2 when the window is 8π wide or less. To think in degrees, remember π = 180°. A period of π is a period of 180°.