I'm trying to generate the picture that I created on Geogebra in Tikz code.

The picture came as luck as I was playing with some functions. Now, I'm using the following code to produce the picture on Tikz, but it does not compile the coordinates. Maybe it is something else it does not compile, that I can't see.
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (0.7333308390918073,0.0) -- (5.239998617966438,0.0);
\foreach \x in {,1.0,2.0,3.0,4.0,5.0}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt);
\clip(0.7333308390918073,-0.6933333333333337) rectangle (5.239998617966438,3.040000000000002);
\draw[smooth,samples=100,domain=2.0400031082342736:4.039997101821316] plot(\x, ((\x)-3.04)^(5)-2*((\x)-3.04)^(3)+(\x)-3.04+1.0]+0.66});
\draw [line width=1.2000000000000002pt,dash pattern=on 1pt off 1pt] (2.04,1.6600000000000001)-- (2.04,0.0);
\draw [line width=1.2000000000000002pt,dash pattern=on 1pt off 1pt] (4.04,1.6600000000000001)-- (4.04,0.0);
\draw (1.933331135241857,-0.026666666666666682) node[anchor=north west] {$a$};
\draw (3.9333316288252727,-0.04000000000000002) node[anchor=north west] {$\beta$};
\draw[smooth,samples=100,domain=4.066665128397554:5.066663234885912] plot(\x,((\x)-0.013333333333333641-5.05333)^(5)-2.0*((\x)-0.013333333333333641-5.05333)^(3)+(\x)-0.013333333333333641-5.05333-1.0]+1.8000033333333345});
\draw [line width=1.2000000000000002pt,dash pattern=on 1pt off 1pt] (2.04,1.6600000000000001)-- (2.04,2.84);
\draw[smooth,samples=100,domain=1.040000568108668:2.039999103789556] plot(\x, ((\x)-1.04)^(2)]+1.5733333333333346});
\begin{scriptsize}
\draw [fill=black] (2.04,1.6600000000000001) circle (1.5pt);
\draw [fill=black] (4.04,1.6600000000000001) circle (1.5pt);
\draw [color=black] (4.04,0.8181088825214906) circle (2.0pt);
\draw [color=black] (2.0399999999999996,2.5733333333333337) circle (2.0pt);
\end{scriptsize}
\end{tikzpicture}
Any suggestions?
By the way, how do we create random functions (graphs) in Tikz? Thanks!
