Graphing Transformations of Sine and Cosine Functions

Graphing Transformations of Sine and Cosine Functions
Loading the math board and drawing, please wait…
2019-03-13 04:27
This example demonstrates the transformations of sine and cosine functions, involving key mathematical concepts such as sine and cosine functions and their transformations. Using GeoGebra commands like Sequence, If, Point, etc., you can dynamically adjust the phase, amplitude, and period of the functions to observe changes in their graphs. Suitable for high school mathematics education and learning.

GeoGebra Commands & Parameters

  1. Sequence(Sequence[(i, j), i, -45, 735, 15], j, -5, 5, 0.5) → gridSpace
  2. If(isSinFunc, sin(x°), cos(x°)) → parentFunc
  3. Point(Union[gridSpace, {Element[homeBase, 5]}]) → B6
  4. Point(Union[gridSpace, {Element[homeBase, 4]}]) → B5
  5. Point(Union[gridSpace, {Element[homeBase, 3]}]) → B4
  6. Point(Union[gridSpace, {Element[homeBase, 2]}]) → B3
  7. Point(Union[gridSpace, {Element[homeBase, 1]}]) → B2
  8. Shuffle(F2:F13) → aVals
  9. Element(aVals, 1) → aVal
  10. Shuffle(D2:D8) → bVals
  11. Element(bVals, 1) → bVal
  12. UnicodeToLetter(10003) → cmark
  13. UnicodeToLetter(10007) → xmark
  14. LaTeX(FractionText[abs(bVal)]) → fmtAbsBval
  15. NumToFracNoPhantom(1 / abs(bVal)) → currentStretchFactor
  16. LaTeX(If[isSinFunc, "y=\sin(x°)", "y=\cos(x°)"]) → lblParent
  17. NumToFrac(bVal) → latexBval
  18. Polygon({(left, bottom), (left, top), (right, top), (right, bottom)}) → viewbox
  19. Point(Union[gridSpace, homeBase]) → activePt
  20. LaTeX((((("\text{\(y=" * NumToFrac[aVal]) * If[isSinFunc, "\sin(", "\cos("]) * NumToFrac[bVal]) * "x°)\)}")) → lblFx
  21. Sequence(startXPos + (i * quarterPeriod), i, 0, 4) → correctXvals
  22. LaTeX(If[bVal > 0, "", "\text{Since \(b \lt 0\), there is a reflection\\in the \(y\)-axis.}"]) → fbHReflection
  23. LaTeX((((("\text{There is a horizontal stretch by a factor \\of \(" * currentStretchFactor) * "\), and the graph has the same \\\(y\)-intercept as \(") * lblParent) * "\).}")) → fbHStretch
  24. If(showFeedback, E21:E22, {"", ""}) → questionMarks
  25. LaTeX((((((("\text{Since \(b =" * latexBval) * "\), the period is \\\(\dfrac{360}{\mid b \mid} °=\dfrac{360}{") * fmtAbsBval) * "}°=") * abs(periodValue)) * "^\circ\).}")) → fbPeriod
  26. LaTeX((("\text{The base function is \(" * lblParent) * "\)}.")) → fbBase
  27. Textfield(C22) → B22
  28. If(D22 ≟ periodValue, correct, incorrect) → E22
  29. If(isSinFunc, (aVal * sin(((bVal * x))°)), (aVal * cos(((bVal * x))°))) → translatedFunc
  30. Zip((A, translatedFunc(A)), A, correctXvals) → correctPts
  31. Textfield(C21) → B21
  32. If(amplitudeCorrect, correct, incorrect) → E21
  33. LaTeX((((("\text{The amplitude is \(\left\vert a \right\vert = \left\vert " * NumToFracNoPhantom[aVal]) * "\right\vert = ") * NumToFracNoPhantom[abs(aVal)]) * "\)}")) → fbAmplitude
  34. LaTeX(If[aVal > 0, "", "\text{Since \(a<0\), there is a reflection\\in the \(x\)-axis.}"]) → fbVReflection
  35. LaTeX(If[isCorrect, "\text{The points you graphed are correct.}", "\text{You did not graph a correct set of points.}"]) → fbCorrect
  36. LaTeX(If[bVal < 0, "\text{Note that this reflection has no effect for a\\cosine function, since the cosine function\\is symmetric about the \(y-\)axis.}", ""]) → fbCosReflection
  37. LaTeX(If[aVal < 0 ∧ bVal < 0, "\text{Note that for a sine function, the reflections \\in the \(x\)-axis and the \(y-\)axis cancel\\each other out.}", If[aVal < 0 ∨ bVal < 0, (("\text{For a sine function, this reflection has the\\same effect as a reflection in the \(" * If[aVal < 0, "y", "x"]) * "\)-axis.}"), ""]]) → fbSinReflection
  38. LaTeX((((("\text{\textbf{Question: }" * MainInstruc) * "\\\textbf{Instructions: }") * SpecInstruc) * "}")) → allInstruc
  39. LaTeX(((((((((((fbAmplitude * "\\") * fbPeriod) * "\\") * fbBase) * "\\") * fbVReflection) * "\\") * fbHReflection) * "\\") * If[isSinFunc, fbSinReflection, fbCosReflection])) → fbAll
  40. Segment(Element[legendPoints, 1], Element[legendPoints, 1] + (60, 0)) → legendParent
  41. Segment(Element[legendPoints, 2], Element[legendPoints, 2] + (60, 0)) → legendTransformed
  42. TableText({questionLbls, questionSpacers, questionMarks}, "vr") → tblInput