topic badge

5.07 Graphing sine and cosine

Lesson

In our last lesson we identified transformations and key features of sine and cosine functions. We now want to use those skills to sketch graphs. Through understanding the transformations the graph has undergone we can start with a base form of the function ($y=\sin x$y=sinx or $y=\cos x$y=cosx) and transform it in stages to achieve the final sketch. We could also use the following steps to assist in sketching:

  1. Ensure you formula is in the required format: $y=a\sin\left(b\left(x-c\right)\right)+d$y=asin(b(xc))+d Rearrange if necessary, for example you may need to factor the $b$b out to clearly read the value of $c$c for the phase shift.
  2. Write down $a$a, $b$b, $c$c and $d$d.
  3. Sketch in dotted lines for the principal axis: $y=d$y=d, the maximum value: $y=d+a$y=d+a and the minimum value: $y=d-a$y=da
  4.  Find the period: $Period=\frac{2\pi}{b}$Period=2πb
  5. For convenience divide the period by 4 and label the $x$x-axis in multiples of this. The key features/points in the next step will occur at these values.
  6. Sketch in points in the following fashion:
  • For sine graphs: the pattern starts in the middle (principal axis), then up, middle, down, middle. The pattern then repeats. If $a$a is negative the pattern will start in the middle and then go downwards.
  • For cosine graphs: the pattern starts at the top (maximum value), then middle, bottom, middle, top. The pattern then repeats. If $a$a is negative the pattern will start at the bottom and then go upwards.

     7. Shift the points by $c$c units horizontally and then join the points with a smooth curve.

Worked example

Sketch the graph of $y=3\sin2x+1$y=3sin2x+1 for the interval $0\le x\le2\pi$0x2π

Think: What transformations would take $y=\sin x$y=sinx to $y=3\sin2x+1$y=3sin2x+1? Remember "dilate then translate horizontally, dilate then translate vertically".

  • Start inside the brackets. We need to dilate the graph by a factor of $\frac{1}{2}$12 horizontally. Hence, the period becomes $\frac{2\pi}{2}=\pi$2π2=π.
  • There is no horizontal translation. 
  • We would dilate the graph by a factor of 3 from the x-axis. That is, increase the amplitude to $3$3.

  • We need to translate the graph by $1$1 unit vertically.

Do: List the parameters $a=3$a=3$b=2$b=2$c=0$c=0 and $d=1$d=1. Sketch dotted lines for the principal axis: $y=1$y=1, the maximum value: $y=4$y=4 and the minimum value: $y=-2$y=2.

Find the period: $period=\frac{2\pi}{b}$period=2πb$=\pi$=π. Put tick marks on the $x$x-axis at multiples of the $\frac{period}{4}$period4. So here we will mark our axis at each $\frac{\pi}{4}$π4 (You don't need to label each).

Mark the pattern on the graph. Since we are graphing a sine graph with a positive $a$a value, the pattern will start in the middle then next point will be at the top.

As $c=0$c=0 we do not have to horizontally shift the points. Lastly, join the points with a smooth curve.

Reflect: Does the graph match how it should look after transformations? Does its cycle repeat the correct number of times for the domain given?

Practice questions

Question 1

Consider the functions $f\left(x\right)=\sin x$f(x)=sinx and $g\left(x\right)=\sin5x$g(x)=sin5x.

  1. State the period of $f\left(x\right)$f(x) in degrees.

  2. Complete the table of values for $g\left(x\right)$g(x).

    $x$x $0^\circ$0° $18^\circ$18° $36^\circ$36° $54^\circ$54° $72^\circ$72° $90^\circ$90° $108^\circ$108° $126^\circ$126° $144^\circ$144°
    $g\left(x\right)$g(x) $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  3. State the period of $g\left(x\right)$g(x)in degrees.

  4. What transformation of the graph of $f\left(x\right)$f(x) results in the graph of $g\left(x\right)$g(x)?

    Horizontal dilation by a factor of $5$5.

    A

    Horizontal dilation by a factor of $\frac{1}{5}$15.

    B

    Vertical dilation by a factor of $5$5.

    C

    Vertical dilation by a factor of $\frac{1}{5}$15.

    D
  5. The graph of $f\left(x\right)$f(x) has been provided below.

    By moving the points, graph $g\left(x\right)$g(x).

    Loading Graph...

Question 2

Consider the given graph of $y=\sin x$y=sinx.

Loading Graph...

  1. How can we transform the graph of $y=\sin x$y=sinx to create the graph of $y=\sin\left(x-\frac{\pi}{2}\right)+3$y=sin(xπ2)+3?

    Move the graph to the left by $\frac{\pi}{2}$π2 radians and up by $3$3 units.

    A

    Move the graph to the right by $\frac{\pi}{2}$π2 radians and up by $3$3 units.

    B

    Move the graph to the right by $\frac{\pi}{2}$π2 radians and down by $3$3 units.

    C

    Move the graph to the left by $\frac{\pi}{2}$π2 radians and down by $3$3 units.

    D
  2. Hence graph $y=\sin\left(x-\frac{\pi}{2}\right)+3$y=sin(xπ2)+3 on the same set of axes.

    Loading Graph...

  3. What is the period of the curve $y=\sin\left(x-\frac{\pi}{2}\right)+3$y=sin(xπ2)+3 in radians?

Question 3

Consider the function $f\left(x\right)=\cos x$f(x)=cosx and $g\left(x\right)=\cos\left(x-\frac{\pi}{2}\right)$g(x)=cos(xπ2).

  1. Complete the table of values for both functions.

    $x$x $0$0 $\frac{\pi}{2}$π2 $\pi$π $\frac{3\pi}{2}$3π2 $2\pi$2π
    $f\left(x\right)$f(x) $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
    $g\left(x\right)$g(x) $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Using the table of values, what transformation of the graph of $f\left(x\right)$f(x) results in the graph of $g\left(x\right)$g(x)?

    vertical translation $\frac{\pi}{2}$π2 units downwards

    A

    horizontal translation $\frac{\pi}{2}$π2 units to the left

    B

    horizontal translation $\frac{\pi}{2}$π2 units to the right

    C

    vertical translation $\frac{\pi}{2}$π2 units upwards

    D
  3. The graph of $f\left(x\right)$f(x) has been provided below.

    By moving the points, graph $g\left(x\right)$g(x).

    Loading Graph...

Question 4

Consider the function $f\left(x\right)=\cos5x$f(x)=cos5x.

  1. Determine the period of the function in radians.

  2. What is the maximum value of the function?

  3. What is the minimum value of the function?

  4. Graph the function for $0\le x\le\frac{4}{5}\pi$0x45π.

    Loading Graph...

Outcomes

1.1.26

examine translations and the graphs of y=f(x)+a and y=f(x-b)

1.2.10

examine amplitude changes and the graphs of y=asin⁡x and y=acosx

1.2.11

examine period changes and the graphs of y=sin ⁡bx,y=cos bx, and y=tan ⁡bx

1.2.12

examine phase changes and the graphs of y=sin⁡(x-c), y=cos⁡(x-c) and y=tan⁡(x-c)

1.2.13

examine the relationships sin⁡(x+π/2)=cos⁡x and cos⁡(x−π/2)=sin⁡x

What is Mathspace

About Mathspace