2*\cos(x-1) 的图

2*\cos(x-1) 的图

如何 2*cos (x-1)在中绘制图形LaTeX。使用GeoGebra命令,形状无法映射到LaTeX

\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm,scale=.5]
\draw[>=latex,->,color=black,] (-5,0) -- (3,0);
\foreach \x in {-2,-1,1}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[>=latex,->,color=black] (0,-3) -- (0,4);
\foreach \y in {-2,2}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt);
\draw[color=black] (0pt,-1pt) node[above left] {\footnotesize $0$};
\node at (3,0) [right ] {\small $x$};
\node at (0,4) [above ] {\small $y$};
\draw[color=red,smooth,thick] plot[domain=-4:2.5]
\x,{(2*cos(\x-1)) r)}) node[right] {$f(x) = 2\cos(x-1)$};
\draw [color=red] (-2,-2) circle (4pt);
\end{tikzpicture}

相关内容