Visualize Trig Functions

vh42720
09/28/2017

Why?

Teaching highschool students to graph trigonometry functions is hard. One of the main problem is it hard for them to understand the domain and range each function has. And that is without going into the inverse. Thus, with this tiny app, students can:

  • Interactively learn by themselves
  • Experience some tricky scenarios such as 0 and asymptope values
  • have fun !

Small Examples

Lets try to graph y = sin(x) without any further inputs.

plot1 <- curve(sin,from = -2*pi, to =2*pi)

plot of chunk plot

Amplitude

Lets alter the function to become y = 2*sin(x)

x <- seq(-2*pi, 2*pi, by = pi/128); y = 2*sin(x)
plot(x,y)

plot of chunk unnamed-chunk-1

As we can see the amplitude is double! Range of y goes from [-1,1] to [-2,2]. Next, lets us again alter our function

Period

Now lets y = 2*sin(2x)

x <- seq(-2*pi, 2*pi, by = pi/128); y = 2*sin(2*x)
plot(x,y)

plot of chunk unnamed-chunk-2 Hrm…Looks like our plots get much more crowded. As you can imagine the more we expand our function the more complicated our graph become.

Thus, our app allows the student to simultaneously adjust all the parameters with the form:

y = 2*f(b(x-c)) + d