Graphing Multiple Periods of f(x)=cos 2x

Graphing Multiple Periods of f(x)=cos 2x
Loading the math board and drawing, please wait…
2014-09-13 03:55
This example demonstrates the graph of the cosine function f(x)=cos 2x over several periods, illustrating its period, amplitude, and symmetry. Core mathematical concepts include trigonometric periodicity, frequency scaling, and transformations of function graphs. Construction highlights: LaTeX for formula rendering, Corner for text placement, If and Mirror for conditional drawing and reflection, stepMax/stepper/steps/counter for animation stepping, button1 to trigger Randomize and ZoomFit, and text objects (text0, text1, etc.) for step‑by‑step annotations. Suitable for high‑school trigonometry lessons, college‑prep review, and interactive GeoGebra courseware development.

GeoGebra Commands & Parameters

  1. LaTeX(steps) → counter
  2. LaTeX("\text{Move the slider to solve the problem.}") → text0
  3. Corner(1) → A
  4. Corner(3) → B
  5. If(choose ≟ 1, Simplify[(a * sin((b * x)))], Simplify[(a * cos((b * x)))]) → f
  6. LaTeX((("\textcolor{#000099}{f(x)=" * f) * "}")) → Problem
  7. LaTeX("\text{Graph several periods of }\textcolor{#000099}{f(x)}.") → text1
  8. If(choose ≟ 1, ((-π)) / ((2 * b)), 0) → left
  9. If(choose ≟ 1, π / ((2 * b)), π / b) → right
  10. If(choose ≟ 1, "-", "") → posneg
  11. If(choose ≟ 1, LaTeX[(("-\frac{\pi}{" * Simplify[(2 * b)]) * "}")], "0") → leftText
  12. If(choose ≟ 1, LaTeX[(("\frac{\pi}{" * Simplify[(2 * b)]) * "}")], LaTeX[(("\frac{\pi}{" * Simplify[b]) * "}")]) → rightText
  13. LaTeX("\text{Solve for the inverse function }\textcolor{#006633}{g(x)}\text{ algebraically.}") → text11
  14. LaTeX((("\textcolor{#000099}{f(x)=" * f) * "}")) → text14
  15. LaTeX("\text{Switch }\textcolor{#000099}{x}\text{ and }\textcolor{#000099}{f(x)}.") → text15
  16. If(choose ≟ 1, "sin", "cos") → functext
  17. LaTeX((("\text{Take the inverse " * functext) * " of both sides.}")) → text21
  18. LaTeX("\text{Simplify and use symmetry of equality.}") → text23
  19. If(b ≠ 1, LaTeX[Simplify[1 / b]], "") → invCoeff
  20. Mirror(h, y = x) → Inverse
  21. LaTeX((((((("\textcolor{#006633}{g(x)=\frac{" * functext) * "^{-1}\left(\frac{x}{") * a) * "}\right)}{") * b) * "}}")) → text26
  22. LaTeX((((((("\textcolor{#006633}{" * b) * "g(x)=") * functext) * "^{-1}\left(\frac{x}{") * a) * "}\right)}")) → text24
  23. LaTeX((((((((((("\textcolor{#006633}{" * functext) * "^{-1}\left(\frac{x}{") * a) * "}\right)=") * functext) * "^{-1}\left(") * functext) * "(") * b) * "g(x))\right)}")) → text22
  24. LaTeX((((("\textcolor{#006633}{\frac{x}{" * a) * "}=") * functext) * "(g(x))}")) → text20
  25. LaTeX("\text{Rename }\textcolor{#000099}{f(x)}\text{ as }\textcolor{#006633}{g(x)}.") → text17
  26. LaTeX((((((("\textcolor{#006633}{x=" * a) * "") * functext) * "(") * b) * "g(x))}")) → text18
  27. LaTeX((((((("\textcolor{#006633}{g(x)=" * invCoeff) * "") * functext) * "^{-1}\left(\frac{x}{") * a) * "}\right)}")) → invlabel
  28. LaTeX((("\text{Divide both sides by }\textcolor{#006633}{" * b) * "}.")) → text25
  29. LaTeX((("\textcolor{#000099}{f(x)=" * f) * "}")) → restrictlabel
  30. LaTeX((((((("\textcolor{#000099}{x=" * a) * " ") * functext) * "(") * b) * "f(x))}")) → text16
  31. If(choose ≟ 1, "sine", "cosine") → name
  32. If(choose ≟ 1, (((-3) * a / 4), asin((((-3) * a / 4)) / a) / b), (((-3) * a / 4), acos((((-3) * a / 4)) / a) / b)) → C
  33. LaTeX((("\text{The trigonometric function }\textcolor{#000099}{f(x) = " * f) * "}\text{ is not fully invertible because of its }\cr\text{periodic nature. Viewing several periods of the function is the first step toward }\cr\text{identifying a restricted domain on which the function is invertible.}")) → text2
  34. LaTeX("\text{Restrict the domain until there is a one-to-one correspondence. }") → text3
  35. LaTeX("\text{Determine the range of }\textcolor{#000099}{f(x)}\text{ within the restricted domain.}") → text8
  36. LaTeX((((((((("\text{The inverse function of }\textcolor{#000099}{f(x)=" * f) * "}\text{ is }\textcolor{#006633}{g(x)=") * invCoeff) * "") * functext) * "^{-1}\left(\frac{x}{") * a) * "}\right)}.")) → text27
  37. LaTeX("\text{Determine the domain and range of the inverse function }\textcolor{#006633}{g(x)}.") → text28
  38. LaTeX("\text{The domain and range of an inverse function are the range and (restricted) }\cr\text{domain of the original function.}") → text29
  39. LaTeX((((((((((((((((((((((((("\text{For the original function } \textcolor{#000099}{f(x) = " * f) * "} \text{, the restricted domain is } \textcolor{#000099}{\left[") * leftText) * ",") * rightText) * "\right]} \cr\text{and the range is }\textcolor{#000099}{[-") * a) * ",") * a) * "]} \text{. }\cr\text{Therefore, for the inverse function }\textcolor{#006633}{g(x)=") * invCoeff) * "") * functext) * "^{-1}\left(\frac{x}{") * a) * "}\right)} \text{, the domain is } \cr \textcolor{#006633}{[–") * a) * ", ") * a) * "]} \text{ and the range is } \textcolor{#006633}{\left[") * leftText) * ",") * rightText) * "\right]}.")) → text30
  40. LaTeX("\text{Use the buttons below to return to the original problem or}\cr\text{randomly generate a similar practice problem.}") → RandomizationText
  41. LaTeX("\text{Look at the graph of }\textcolor{#000099}{f(x)}\text{ to find the widest possible }\textcolor{#000099}{x}\text{-interval containing }\cr\textcolor{#000099}{x = 0}\text{ for which no }\textcolor{#000099}{y}\text{-value is repeated.}") → text4
  42. LaTeX((((((("\text{For the function }\textcolor{#000099}{f(x) = " * f) * "}\text{, this restricted domain is }\textcolor{#CC0000}{\left[") * leftText) * ",") * rightText) * "\right]}.")) → text5
  43. LaTeX((((("\text{Notice that multiplying the " * name) * " function by }\textcolor{#000099}{") * a) * "}\text{ does not affect the}\cr\text{restricted domain.}")) → text6
  44. LaTeX("\text{Adjust the window properties to display the graph only for }\textcolor{#000099}{x}\text{-values in the }\cr\text{restricted domain. Make sure you do not change the }\textcolor{#000099}{y}\text{-axis window settings.}") → text7
  45. LaTeX("\text{Look at the graph of }\textcolor{#000099}{f(x)}\text{ on its restricted domain, and identify the range of }\cr\textcolor{#000099}{y}\text{-values }\text{that are visible for the function.}") → text9
  46. LaTeX((((((((((((((("\text{For the function }\textcolor{#000099}{f(x) = " * f) * "}\text{ on the restricted domain }\textcolor{#000099}{\left[") * leftText) * ",") * rightText) * "\right]}\text{, }\cr\textcolor{#000099}{y}\text{-values on the visible part of the function range from }\textcolor{#000099}{–") * a) * "}\text{ to }\textcolor{#000099}{") * a) * "}\text{.}\cr\text{Therefore, the range of }\textcolor{#000099}{f(x)}\text{ within the restricted domain is }\textcolor{#000099}{\left[–") * a) * ", ") * a) * "\right]}.")) → text10
  47. LaTeX((("\text{Divide both sides by }\textcolor{#006633}{" * a) * "}.")) → text19
  48. LaTeX("\text{Original function }\textcolor{#000099}{f(x)}") → text13
  49. LaTeX("\text{Recall that you can find the inverse of a function }\textcolor{#000099}{f(x)}\text{ by switching the domain }\cr\text{and function variables, renaming the function as }\textcolor{#006633}{g(x)}\text{, and then solving for }\textcolor{#006633}{g(x)}.") → text12

AI Drawing Prompt Reference

Draw the graph of f(x)=cos 2x over multiple periods to illustrate its period, amplitude, and symmetry. The graph should show complete cycles of the cosine function, with annotations for the function formula, period length, and amplitude. Highlight key points such as peaks and troughs. Use clear lines and appropriate axes to make the graph easy to understand.
The prompt above was compiled from the original drawing commands and is for reference only.