\definecolor{wqwqwq}{rgb}{0.3764705882352941,0.3764705882352941,0.3764705882352941}
\definecolor{yqyqyq}{rgb}{0.5019607843137255,0.5019607843137255,0.5019607843137255}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.5cm,y=0.5cm]
\begin{axis}[
x=0.5cm,y=0.5cm,
axis lines=middle,
ymajorgrids=true,
xmajorgrids=true,
xmin=-3.800000000000002,
xmax=14.660000000000005,
ymin=-2.4399999999999977,
ymax=6.039999999999998,
xtick={-3.0,-2.0,...,14.0},
ytick={-2.0,-1.0,...,6.0},]
\clip(-3.8,-2.44) rectangle (14.66,6.04);

%fonction f
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,domain=-3.0:1.0)] plot (\x,{(-0.01062*(\x)^3+-0.17812*(\x)^2+-0.78187*(\x)+2.97062)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,domain=1.0:5.0)] plot (\x,{(0.05187*(\x)^3+-0.32062*(\x)^2+-0.68437*(\x)+2.95312)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,domain=5.0:10.0)] plot (\x,{(-0.0*(\x)^3+0.2*(\x)^2+-2.0*(\x)+3.0)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,domain=10.0:13.0)] plot (\x,{(0.07407*(\x)^3+-2.88889*(\x)^2+37.55556*(\x)+-157.74074)/1.0}););

% Fonction g

\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,color=yqyqyq, domain=-3.0:1.0)] plot (\x,{(0.02312*(\x)^3+0.13812*(\x)^2+0.36438*(\x)+1.47437)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,color=yqyqyq, domain=1.0:6.0)] plot (\x,{(-0.0196*(\x)^3+0.1348*(\x)^2+0.4992*(\x)+1.3856)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,color=yqyqyq, domain=6.0:10.0)] plot (\x,{(0.01*(\x)^3+-0.345*(\x)^2+3.06*(\x)+-3.1)/1.0}););
\draw [samples=50,rotate around={0.:(0.,0.)},xshift=0.cm,yshift=0.cm,line width=1.pt,color=yqyqyq, domain=10.0:13.0)] plot (\x,{(0.00815*(\x)^3+-0.21111*(\x)^2+0.93778*(\x)+6.58519)/1.0}););

\end{axis}
\end{tikzpicture}
