I was wondering if there is a way I can add a function to a tikz drawing without it having to be with the pgfplots package in the axis environment. Im looking to add a sine function along the dashed line in this image:
\begin{center}
\begin{tikzpicture}[scale=0.5]
\draw (0,4) -- (2,4);
\draw (8,4) -- (10,4);
\draw[line width=3, color=blue] (2,0) -- (8,0);
\draw (2,0) -- (2,-0.5);
\draw (8,0) -- (8,-0.5);
\draw[line width=3, color=blue] (2,-0.1) -- (2,4);
\draw[line width=3, color=blue] (8,-0.1) -- (8,4);
\draw[dashed] (1.5,2) -- (9,2);
\node [left] at (1.5,2) {$E<U_o$};
\node [below] at (2,-0.5) {$0$};
\node [below] at (8,-0.5) {$a$};
\node [left] at (0,4) {$U_o$};
\end{tikzpicture}
\end{center}
If it is also possible, I would like to add other functions like exponential functions too. Thanks.
