Sine and Cosine Graphs Practice: Amplitude, Period and Phase Shift

A sine or cosine graph is the basic wave moved by four numbers: how tall it is, how long one cycle takes, how far it slides sideways and where its midline sits. Drag the sliders below and watch each number change the curve and the readout.

Under the explorer, a generator gives you new problems at three levels, with a box for your answer, a Check button and the full steps. If you need the theory first, read graph of the sine function and come back.

Sine and cosine explorer

Choose sine or cosine and move the sliders. The gray curve is the parent curve. The blue curve is y = A sin(B(x − C)) + D, or y = A cos(B(x − C)) + D when you choose cosine. The dot marks the point x = C, and the dotted lines mark the midline, the maximum and the minimum.

Amplitude
Period
Phase shift
Midline
Maximum
Minimum

Contents

  1. How to read the explorer
  2. Finding the shift in Bx + E
  3. Worked examples
  4. Practice generator
  5. Tips for each type of problem
  6. Common mistakes
  7. Frequently asked questions
  8. See also

How to read the explorer

The explorer draws the parent curve, $latex y=\sin x$ or $latex y=\cos x$, in gray and your curve in blue. Your curve is built from one formula:

$$y=A\sin\big(B(x-C)\big)+D$$

  • A is the amplitude factor. The amplitude is $latex |A|$, so a negative A flips the curve upside down without changing its height.
  • B sets the period, $latex \frac{2\pi}{B}$. A bigger B puts more cycles in the same space.
  • C is the phase shift. We write $latex x-C$, so a positive C moves the graph to the right and a negative C moves it to the left.
  • D is the vertical shift. The midline is $latex y=D$, the maximum is $latex D+|A|$ and the minimum is $latex D-|A|$.

The sliders take A from −4 to 4 (zero is skipped, because the wave would disappear), B from 1/2 to 4, C from −2π to 2π in steps of π/4 and D from −3 to 3 in steps of 0.5. The readout gives the same numbers in exact form, with multiples of π, and the line below shows the function written as $latex y=A\sin(Bx+E)+D$. Press Cosine to change the curve: a cosine is a sine shifted $latex \frac{\pi}{2}$ to the left.

Other pages on this site write the general form as $latex y=A\sin(Bx-C)+D$, and call the shift $latex \frac{C}{B}$ the phase. It is the same family, with the shift left inside the argument: $latex Bx-C=B\left(x-\frac{C}{B}\right)$. Here we always factor B out, so our C is the $latex \frac{C}{B}$ of those pages: the shift itself. As on the rest of the site, we write sin and cos.

Finding the shift in Bx + E

Many exercises give the function as $latex y=A\sin(Bx+E)+D$ and ask for the shift. E is not the shift. Factor B out of the argument:

$$Bx+E=B\left(x+\frac{E}{B}\right)=B\big(x-C\big)\qquad\text{so}\qquad C=-\frac{E}{B}$$

The rule has two steps: divide E by B, then change the sign. A positive result is a shift to the right and a negative result is a shift to the left. The same rule works for cosine.

Worked examples

Example 1. Analyze $latex y=3\sin(2(x-\frac{\pi}{4}))+1$. The number multiplying the sine is $latex A=3$, so the amplitude is $latex 3$. With $latex B=2$ the period is $latex \frac{2\pi}{2}=\pi$. Inside the parentheses we have $latex x-\frac{\pi}{4}$, so $latex C=\frac{\pi}{4}$ and the graph moves $latex \frac{\pi}{4}$ to the right. At the end, $latex D=1$, so the midline is $latex y=1$. The maximum is $latex 1+3=4$ and the minimum is $latex 1-3=-2$.

Example 2. Analyze $latex y=-2\cos(\frac{x}{2})+3$. Here $latex A=-2$. The minus sign flips the curve, but the amplitude is a distance: $latex |A|=2$. With $latex B=\frac{1}{2}$ the period is $latex 2\pi\div \frac{1}{2}=4\pi$. Nothing is added to x, so there is no phase shift. The midline is $latex y=3$, the maximum is $latex 3+2=5$ and the minimum is $latex 3-2=1$. Because A is negative, the curve starts at x = 0 at its minimum, $latex y=1$, instead of its maximum.

Example 3. Find the period and the phase shift of $latex y=4\sin(3x+\pi)-1$. The shift is hidden, so factor: $latex 3x+\pi=3\left(x+\frac{\pi}{3}\right)$. That is $latex x-C$ with $latex C=-\frac{\pi}{3}$, so the graph moves $latex \frac{\pi}{3}$ to the left. The period is $latex \frac{2\pi}{3}$. The same answer comes from $latex C=-\frac{E}{B}=-\frac{\pi}{3}$. The amplitude is $latex 4$, the midline is $latex y=-1$, the maximum is $latex 3$ and the minimum is $latex -5$.

Example 4. A cosine curve has a maximum of $latex 5$ at $latex x=\frac{\pi}{6}$, a minimum of $latex -1$, and its next maximum at $latex x=\frac{5\pi}{6}$. Find its equation. The midline is halfway between the extremes: $latex D=\frac{5+(-1)}{2}=2$, and the amplitude is $latex \frac{5-(-1)}{2}=3$. Two maxima are one period apart: $latex \frac{5\pi}{6}-\frac{\pi}{6}=\frac{2\pi}{3}$, so $latex B=2\pi\div \frac{2\pi}{3}=3$. A cosine with positive A has a maximum at $latex x=C$, so $latex C=\frac{\pi}{6}$. The equation is $latex y=3\cos(3(x-\frac{\pi}{6}))+2$. Check at $latex x=\frac{\pi}{2}$: the argument is $latex \pi$, so $latex y=3\cos(\pi)+2=-1$, the minimum.

Practice generator

Every problem is new. Show steps solves the current problem one line at a time, and it counts as a miss in your score.

Write π as pi, for example 3pi/4, or tap the π button. Answers with π must be exact: 0.785 is not accepted for π/4. A shift to the right is positive and a shift to the left is negative, in every problem.

Level 1 uses whole numbers and no phase shift (except in the Factor first type). Level 2 adds shifts and negative A. Level 3 uses fractional B, shifts such as 5π/6 and halves in A and D.

Practice generator

Choose a type and a level, solve it and press Check. Write π as pi (for example 3pi/4) or tap the π button. Fractions such as 3/2 and decimals such as 1.5 are fine.

Level

Tips for each type of problem

  • Read the equation. Compare it with $latex A\sin(B(x-C))+D$. The number next to x is B, the number added to x inside the parentheses is C with the opposite sign, and the number at the end is D.
  • Factor first. Divide E by B and change the sign: $latex C=-\frac{E}{B}$. Then the period is $latex \frac{2\pi}{B}$.
  • Equation from the graph. Start with the midline, halfway between the highest and the lowest points. The amplitude is half the distance between them. Then measure one cycle for the period and find where a cycle starts.
  • Maximum and minimum. Only A and D matter: $latex D+|A|$ and $latex D-|A|$. The range of the function is the interval $latex [D-|A|, D+|A|]$.
  • Write the equation. Find the four numbers one at a time: $latex B=\frac{2\pi}{\text{period}}$, C from the direction of the shift, and a negative A only when the problem says so.

Common mistakes

  • Reading E as the shift. In $latex y=\sin(2x-\pi)$ the shift is not $latex \pi$. Factor: $latex 2x-\pi=2\left(x-\frac{\pi}{2}\right)$, so the graph moves $latex \frac{\pi}{2}$ to the right.
  • Mixing up left and right. $latex x+c$ inside the parentheses is a shift to the left, even though there is a plus sign.
  • Calling the amplitude negative. In $latex y=-2\cos x$ the amplitude is 2. The minus sign flips the curve and does not change its height.
  • Multiplying for the period. The period of $latex \sin(3x)$ is $latex \frac{2\pi}{3}$, not $latex 6\pi$. A bigger B gives a shorter period.
  • Swapping the maximum and the minimum when A is negative. For $latex y=-2\cos(\frac{x}{2})+3$ the maximum is still $latex 3+2=5$.

Frequently asked questions

What is the phase shift of a sine or cosine?

It is the horizontal distance the graph moves compared with $latex y=\sin x$ or $latex y=\cos x$. In $latex y=A\sin(B(x-C))+D$ it is C: to the right when it is positive, to the left when it is negative.

Why is the amplitude never negative?

The amplitude is a distance: half the vertical span between the maximum and the minimum. A negative A only flips the curve over its midline.

How do I find B from the period?

Use $latex B=\frac{2\pi}{\text{period}}$. A curve with period $latex \pi$ has $latex B=2$, and a curve with period $latex 4\pi$ has $latex B=\frac{1}{2}$.

How do I turn a sine into a cosine?

Shift the sine $latex \frac{\pi}{2}$ to the left: $latex \sin\left(x+\frac{\pi}{2}\right)=\cos x$. In the other direction, $latex \cos\left(x-\frac{\pi}{2}\right)=\sin x$.

Do the tools use degrees or radians?

Radians, the standard for these graphs. To convert, remember that $latex \pi$ radians is 180 degrees, so a shift of $latex \frac{\pi}{4}$ is 45 degrees.

See also