Your code is quit fine, so maybe some minor changes:
- you not need to load
tikz
twice
- I would use tikz libraries
arrows.meta
and quotes
for a bit nicer arrows heads and simpler draw labels on edge
- using option
trig format=rad,
make writing equation more simpler
- I wouldn't use
smooth
option, rather increase number of samples
\documentclass[tikz, border=5pt]{standalone}
\usetikzlibrary{arrows.meta,
quotes}
\begin{document}
\begin{tikzpicture}[scale=0.5,
>=Stealth,%Latex,
trig format=rad, % or deg <------
samples=201 ]
% Axes
\draw[->] (-1.1*pi,0) -- ++ (4.3*pi,0) node[below left] {$f$};
\draw[->] (0,-2) -- ++ (0,4.4) node[below left] {$A$};
% Fonction (courbe périodique)
\draw[thick] plot [domain=-pi:3*pi]
(\x,{0.5*sin(2*\x) + sin(3*\x) + 0.2*sin(4*\x)});
% Indication de la période p (approximative)
\draw[|<->|] (0.53, 2) to ["$p$"] ++ (2*pi,0);
\end{tikzpicture}
\end{document}

Addendum:
First version of answer just show what OP can do better with result as (s)he show in question. However, idra presented in @Raffaele Santoro answer is interesting. Based on it, I would draw your image on the following way:
\documentclass[tikz, border=5pt]{standalone}
\usetikzlibrary{arrows.meta,
quotes}
\begin{document}
\begin{tikzpicture}[scale=0.5,
>=Stealth,%Latex,
trig format=rad, % or deg <------
samples=201 ]
% Axes
\draw[->] (-1.1*pi,0) -- ++ (4.3*pi,0) node[below left] {$f$};
\draw[->] (0,-2) -- ++ (0,4.4) node[below left] {$A$};
% Fonction (courbe périodique)
\draw[thick,densely dotted] plot [domain=-pi:3*pi]
(\x,{0.5*sin(2*\x) + sin(3*\x) + 0.2*sin(4*\x)});
\draw[thick] plot [domain=0:2*pi]
(\x,{0.5*sin(2*\x) + sin(3*\x) + 0.2*sin(4*\x)});
% Indication de la période p (approximative)
\draw[<->|, very thin] (0, 1.9) to ["$p$"] ++ (2*pi,0);
\end{tikzpicture}
\end{document}

sin
andcos
and piece your function together. Though, they only plot a specific segment (a quarter circle). You could adjust the start and end with\pgfpathcurvebetweentime
but that's a lot of manual fiddling around. You can always save the diagram as a PDF and import it in your document: standalone, externalize, memoize.