I have an error in a function with trace tikz I draw three functions of the form 1/2 (Acos (w * t + phi) + abs (Acos (w * t + phi))). the three functions are shifted 120 ° the route of these three functions is correct, for against the sum is false
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning, calc,intersections}
\begin{document}
{\centering
\begin{tikzpicture}[xscale=50]
\draw[-latex] (0,0) -- (0.16,0) node[above]{$t$};
\draw[-latex] (0,0) -- (0,3.2) node[right]{$v(t)$};
\foreach \xx in {02,04,06,08,10,12,14,16}
{\draw (0.\xx,0)node[below]{\small{0.\xx}} --+(0,0.1);
}
\draw (0.1,0)node[below]{\small{0.1}} --+(0,0.1);
\foreach \yy in{0.5,1,1.5,2,2.5,3}{
\draw[dashed] (0, \yy) node[left]{${\yy}$} -- ++(0.16,0);
}
\draw[domain=0:0.16,smooth,variable=\x,blue,samples={200}] plot (\x,{1/2*(2.52*cos(188*\x*180/3.14) + abs( 2.52*cos(188*\x*180/3.14) )});
\draw[domain=0:0.16,smooth,variable=\x,red,samples={200}] plot (\x,{1/2*(2.52*cos(188*\x*180/3.14+120) + abs( 2.52*cos(188*\x*180/3.14+120) )});
\draw[domain=0:0.16,smooth,variable=\x,green,samples={200}] plot (\x,{1/2*(2.52*cos(188*\x*180/3.14+240) + abs( 2.52*cos(188*\x*180/3.14+240) )});
\draw[domain=0:0.15,smooth,variable=\x,black,samples={200}] plot (\x,{
1/2*(2.52*cos(188*\x*180/3.14) + abs(2.52*cos(188*\x*180/3.14) )
+1/2*(2.52*cos(188*\x*180/3.14+120) + abs(2.52*cos(188*\x*180/3.14+120) )
+1/2*(2.52*cos(188*\x*180/3.14+240) + abs(2.52*cos(188*\x*180/3.14+240) )
}
);
\end{tikzpicture}\par
}
\end{document}