0
\begin{tikzpicture}[scale=0.5]
        \draw [<->,thin] (-5,0) - - (5,0) node [right] {$x$};
        \draw [<->,thin] (0,-3) - - (0,3) node [above] {$y$};


      \draw[color=blue]   plot (\x,{sin(\x r)})   node[right] {$f(x) = \sin x$};
       \draw[color=red]   **plot (\x,{sin(\x r)})**   node[right] {$f(x) = \sin (x+2)$};       
       \end{tikzpicture} 

how can I draw the sin2x!!!!I already draw the sinx!! please help!!!

  • 1
    Welcome! \draw[color=red,smooth] plot (\x,{sin(2+\x r)}) node[right] {$f(x) = \sin (x+2)$}; or \draw[color=orange,smooth] plot (\x,{sin(2*\x r)}) node[right] {$f(x) = \sin (x+2)$};? Note that in order to multiply two variables you need to use a *. – user194703 May 5 '20 at 4:18
  • 1
    Try \documentclass[tikz,border=3mm]{standalone} \begin{document} \begin{tikzpicture}[scale=0.5] \draw [<->,thin] (-5,0) -- (5,0) node [right] {$x$}; \draw [<->,thin] (0,-3) -- (0,3) node [above] {$y$}; \draw[color=blue] plot (\x,{sin(\x r)}) node[right] {$f(x) = \sin x$}; \draw[color=red,smooth] plot (\x,{sin(2+\x r)}) node[right] {$f(x) = \sin (x+2)$}; \draw[color=orange,smooth] plot (\x,{sin(2*\x r)}) node[right] {$f(x) = \sin (x+2)$}; \end{tikzpicture} \end{document}. – user194703 May 5 '20 at 4:21
  • 1
    Maybe \draw[color=red,smooth] plot (\x,{sin(deg(2+\x))}) node[right] {$f(x) = \sin (x+2)$}; since TikZ uses degrees for the arguments of trigonometric functions? – user194703 May 5 '20 at 4:40
  • 1
    Great! Would you agree that your question is basically the same as this one? – user194703 May 5 '20 at 4:48
  • 1
    No worries! So unless you say otherwise this question will then be closed as a duplicate. – user194703 May 5 '20 at 4:50

Browse other questions tagged or ask your own question.