The local maximum occurs at \( x = \frac{\pi}{6} \) with \( f\left(\frac{\pi}{6}\right) = 1 \). The local minimum occurs at \( x = \frac{\pi}{2} \) with \( f\left(\frac{\pi}{2}\right) = -1 \).
{"axisType": 3, "coordSystem": {"xmin": 0, "xmax": 2.1, "ymin": -1.5, "ymax": 1.5}, "commands": ["y = sin(3_x)", "y = 3_cos(3*x)"], "latex_expressions": ["$f(x) = \\sin(3x)$", "$f'(x) = 3\\cos(3x)$"]}